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

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

Issue 9559016: Fix pyauto breakage. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 9 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/instant.py ('k') | chrome/test/functional/shortcuts.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright (c) 2011 The Chromium Authors. All rights reserved. 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 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 import pyauto_functional 6 import pyauto_functional
7 import pyauto 7 import pyauto
8 8
9 9
10 class MultiprofileTest(pyauto.PyUITest): 10 class MultiprofileTest(pyauto.PyUITest):
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 new_profile = multi_profile['profiles'][1] 46 new_profile = multi_profile['profiles'][1]
47 self.assertTrue(new_profile['name']) 47 self.assertTrue(new_profile['name'])
48 48
49 # Verify browser windows. 49 # Verify browser windows.
50 self.assertEqual(2, self.GetBrowserWindowCount(), 50 self.assertEqual(2, self.GetBrowserWindowCount(),
51 msg='New browser window did not open') 51 msg='New browser window did not open')
52 info = self.GetBrowserInfo() 52 info = self.GetBrowserInfo()
53 new_profile_window = info['windows'][1] 53 new_profile_window = info['windows'][1]
54 self.assertEqual('Profile 1', new_profile_window['profile_path']) 54 self.assertEqual('Profile 1', new_profile_window['profile_path'])
55 self.assertEqual(1, len(new_profile_window['tabs'])) 55 self.assertEqual(1, len(new_profile_window['tabs']))
56 self.assertEqual('about:blank', new_profile_window['tabs'][0]['url']) 56 self.assertEqual('chrome://newtab/', new_profile_window['tabs'][0]['url'])
57 57
58 def test20NewProfiles(self): 58 def test20NewProfiles(self):
59 """Verify we can create 20 new profiles.""" 59 """Verify we can create 20 new profiles."""
60 for index in range(1, 21): 60 for index in range(1, 21):
61 self.OpenNewBrowserWindowWithNewProfile() 61 self.OpenNewBrowserWindowWithNewProfile()
62 # Wait until the profile has been created. 62 # Wait until the profile has been created.
63 # TODO: Remove when crbug.com/108761 is fixed. 63 # TODO: Remove when crbug.com/108761 is fixed.
64 self.WaitUntil(self._CheckNumProfiles, args=[index + 1]) 64 self.WaitUntil(self._CheckNumProfiles, args=[index + 1])
65 multi_profile = self.GetMultiProfileInfo() 65 multi_profile = self.GetMultiProfileInfo()
66 self.assertEqual(index + 1, len(multi_profile['profiles']), 66 self.assertEqual(index + 1, len(multi_profile['profiles']),
67 msg='Expected %d profiles after adding %d new users. Got %d' % ( 67 msg='Expected %d profiles after adding %d new users. Got %d' % (
68 index + 1, index, len(multi_profile['profiles']))) 68 index + 1, index, len(multi_profile['profiles'])))
69 69
70 70
71 if __name__ == '__main__': 71 if __name__ == '__main__':
72 pyauto_functional.Main() 72 pyauto_functional.Main()
OLDNEW
« no previous file with comments | « chrome/test/functional/instant.py ('k') | chrome/test/functional/shortcuts.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698