Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(62)

Side by Side Diff: chrome/test/functional/themes.py

Issue 2827048: PyAuto: Automation hooks to get/set theme (Closed)
Patch Set: use existing ResetToDefaultTheme Created 10 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « chrome/test/functional/PYAUTO_TESTS ('k') | chrome/test/pyautolib/pyauto.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 #!/usr/bin/python
2 # Copyright (c) 2010 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file.
5
6 import os
7
8 import pyauto_functional # Must be imported before pyauto
9 import pyauto
10
11
12 class ThemesTest(pyauto.PyUITest):
13 """TestCase for Themes."""
14
15 def Debug(self):
16 """Test method for experimentation.
17
18 This method will not run automatically.
19 """
20 import pprint
21 pp = pprint.PrettyPrinter(indent=2)
22 while True:
23 raw_input('Hit <enter> to dump info.. ')
24 pp.pprint(self.GetThemeInfo())
25
26 def testSetTheme(self):
27 """Verify theme install."""
28 self.assertFalse(self.GetThemeInfo()) # Verify there's no theme at startup
29 crx_file = os.path.join(self.DataDir(), 'extensions', 'theme.crx')
30 self.assertTrue(self.SetTheme(pyauto.FilePath(crx_file)))
31 theme = self.GetThemeInfo()
32 self.assertEqual('camo theme', theme['name'])
33 # TODO: verify "theme installed" infobar
34
35 def testThemeReset(self):
36 """Verify theme reset."""
37 crx_file = os.path.join(self.DataDir(), 'extensions', 'theme.crx')
38 self.assertTrue(self.SetTheme(pyauto.FilePath(crx_file)))
39 self.assertTrue(self.ResetToDefaultTheme())
40 self.assertFalse(self.GetThemeInfo())
41
42
43 if __name__ == '__main__':
44 pyauto_functional.Main()
45
OLDNEW
« no previous file with comments | « chrome/test/functional/PYAUTO_TESTS ('k') | chrome/test/pyautolib/pyauto.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698