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

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

Issue 222873002: Remove pyauto tests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: sync Created 6 years, 8 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 | Annotate | Revision Log
OLDNEW
(Empty)
1 #!/usr/bin/env python
2 # Copyright (c) 2011 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 pyauto_functional
7 import pyauto
8
9
10 class ChromeosBasic(pyauto.PyUITest):
11 """Basic tests for ChromeOS.
12
13 Requires ChromeOS to be logged in.
14 """
15
16 def testAppendTabs(self):
17 """Basic test for primary chrome on ChromeOS (named testing interface)."""
18 self.AppendTab(pyauto.GURL('about:version'))
19 self.assertEqual(self.GetTabCount(), 2, msg='Expected 2 tabs')
20
21 def testRestart(self):
22 """Basic test which involves restarting chrome on ChromeOS."""
23 file_url = self.GetFileURLForDataPath('title2.html')
24 self.NavigateToURL(file_url)
25 self.assertEqual(1, len(self.GetHistoryInfo().History()))
26 self.RestartBrowser(clear_profile=False)
27 self.assertEqual(1, len(self.GetHistoryInfo().History()))
28
29 def testSetDownloadShelfVisible(self):
30 self.assertFalse(self.IsDownloadShelfVisible())
31 self.SetDownloadShelfVisible(True)
32 self.assertTrue(self.IsDownloadShelfVisible())
33 self.SetDownloadShelfVisible(False)
34 self.assertFalse(self.IsDownloadShelfVisible())
35
36 def testSetVolume(self):
37 """Basic test for setting and getting the volume and mute state."""
38 volume_info = self.GetVolumeInfo()
39 for mute_setting in (False, True, False):
40 self.SetMute(mute_setting)
41 self.assertEqual(mute_setting, self.GetVolumeInfo()['is_mute'])
42 for volume_setting in (40, 0, 100, 70):
43 self.SetVolume(volume_setting)
44 self.assertEqual(volume_setting, round(self.GetVolumeInfo()['volume']))
45
46 self.SetVolume(volume_info['volume'])
47 self.SetMute(volume_info['is_mute'])
48 self.assertEqual(volume_info, self.GetVolumeInfo())
49
50
51 if __name__ == '__main__':
52 pyauto_functional.Main()
OLDNEW
« no previous file with comments | « chrome/test/functional/chromeos_accessibility.py ('k') | chrome/test/functional/chromeos_battery.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698