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

Unified 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/test/functional/PYAUTO_TESTS ('k') | chrome/test/pyautolib/pyauto.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/functional/themes.py
diff --git a/chrome/test/functional/themes.py b/chrome/test/functional/themes.py
new file mode 100644
index 0000000000000000000000000000000000000000..855e85df2e93606728619dcda24d9e449a244359
--- /dev/null
+++ b/chrome/test/functional/themes.py
@@ -0,0 +1,45 @@
+#!/usr/bin/python
+# Copyright (c) 2010 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+import os
+
+import pyauto_functional # Must be imported before pyauto
+import pyauto
+
+
+class ThemesTest(pyauto.PyUITest):
+ """TestCase for Themes."""
+
+ def Debug(self):
+ """Test method for experimentation.
+
+ This method will not run automatically.
+ """
+ import pprint
+ pp = pprint.PrettyPrinter(indent=2)
+ while True:
+ raw_input('Hit <enter> to dump info.. ')
+ pp.pprint(self.GetThemeInfo())
+
+ def testSetTheme(self):
+ """Verify theme install."""
+ self.assertFalse(self.GetThemeInfo()) # Verify there's no theme at startup
+ crx_file = os.path.join(self.DataDir(), 'extensions', 'theme.crx')
+ self.assertTrue(self.SetTheme(pyauto.FilePath(crx_file)))
+ theme = self.GetThemeInfo()
+ self.assertEqual('camo theme', theme['name'])
+ # TODO: verify "theme installed" infobar
+
+ def testThemeReset(self):
+ """Verify theme reset."""
+ crx_file = os.path.join(self.DataDir(), 'extensions', 'theme.crx')
+ self.assertTrue(self.SetTheme(pyauto.FilePath(crx_file)))
+ self.assertTrue(self.ResetToDefaultTheme())
+ self.assertFalse(self.GetThemeInfo())
+
+
+if __name__ == '__main__':
+ pyauto_functional.Main()
+
« 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