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

Side by Side Diff: chrome/test/functional/chromeos_browser.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
« no previous file with comments | « chrome/test/functional/chromeos_battery.py ('k') | chrome/test/functional/chromeos_crosh.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/env python
2 # Copyright (c) 2012 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 # pyauto_functional must come before pyauto.
7 import pyauto
8 import test_utils
9
10
11 class ChromeosBrowserTest(pyauto.PyUITest):
12
13 def testCannotCloseLastIncognito(self):
14 """Verify that last incognito window cannot be closed if it's the
15 last window"""
16 self.RunCommand(pyauto.IDC_NEW_INCOGNITO_WINDOW)
17 self.assertTrue(self.GetBrowserInfo()['windows'][1]['incognito'],
18 msg='Incognito window is not displayed')
19
20 self.CloseBrowserWindow(0)
21 info = self.GetBrowserInfo()['windows']
22 self.assertEqual(1, len(info))
23 url = info[0]['tabs'][0]['url']
24 self.assertEqual('chrome://newtab/', url,
25 msg='Unexpected URL: %s' % url)
26 self.assertTrue(info[0]['incognito'],
27 msg='Incognito window is not displayed.')
28
29 def testCrashBrowser(self):
30 """Verify that after broswer crash is recovered, user can still navigate
31 to other URL."""
32 test_utils.CrashBrowser(self)
33 self.RestartBrowser(clear_profile=False)
34 url = self.GetHttpURLForDataPath('english_page.html')
35 self.NavigateToURL(url)
36 self.assertEqual('This page is in English', self.GetActiveTabTitle())
37
38 def testFullScreen(self):
39 """Verify that a browser window can enter and exit full screen mode."""
40 self.ApplyAccelerator(pyauto.IDC_FULLSCREEN)
41 self.assertTrue(self.WaitUntil(lambda:
42 self.GetBrowserInfo()['windows'][0]['fullscreen']),
43 msg='Full Screen is not displayed.')
44
45 self.ApplyAccelerator(pyauto.IDC_FULLSCREEN)
46 self.assertTrue(self.WaitUntil(lambda: not
47 self.GetBrowserInfo()['windows'][0]['fullscreen']),
48 msg='Normal screen is not displayed.')
49
50
51 if __name__ == '__main__':
52 pyauto_functional.Main()
OLDNEW
« no previous file with comments | « chrome/test/functional/chromeos_battery.py ('k') | chrome/test/functional/chromeos_crosh.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698