| 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()
|
| +
|
|
|