OLD | NEW |
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 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 # Must be imported before pyauto | 6 import pyauto_functional # Must be imported before pyauto |
7 import pyauto | 7 import pyauto |
8 import test_utils | 8 import test_utils |
9 | 9 |
10 | 10 |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 self.assertTrue(self.WaitUntil( | 68 self.assertTrue(self.WaitUntil( |
69 lambda: self.FindInPage(default_text, tab_index=1)['match_count'], | 69 lambda: self.FindInPage(default_text, tab_index=1)['match_count'], |
70 expect_retval=1), | 70 expect_retval=1), |
71 'No default sync text.') | 71 'No default sync text.') |
72 self.assertTrue(self.WaitUntil( | 72 self.assertTrue(self.WaitUntil( |
73 lambda: self.FindInPage(set_up_button, tab_index=1)['match_count'], | 73 lambda: self.FindInPage(set_up_button, tab_index=1)['match_count'], |
74 expect_retval=1), | 74 expect_retval=1), |
75 'No set up sync button.') | 75 'No set up sync button.') |
76 | 76 |
77 self.assertTrue(self.SignInToSync(username, password)) | 77 self.assertTrue(self.SignInToSync(username, password)) |
78 self.GetBrowserWindow(0).GetTab(1).Reload() | 78 self.ReloadTab(1) |
79 self.assertTrue(self.WaitUntil( | 79 self.assertTrue(self.WaitUntil( |
80 lambda: self.FindInPage(username, tab_index=1)['match_count'], | 80 lambda: self.FindInPage(username, tab_index=1)['match_count'], |
81 expect_retval=1), | 81 expect_retval=1), |
82 'No sync user account information.') | 82 'No sync user account information.') |
83 self.assertTrue(self.WaitUntil( | 83 self.assertTrue(self.WaitUntil( |
84 lambda: self.FindInPage(signed_in_text, tab_index=1)['match_count'], | 84 lambda: self.FindInPage(signed_in_text, tab_index=1)['match_count'], |
85 expect_retval=1), | 85 expect_retval=1), |
86 'No Google Dashboard information after signing in.') | 86 'No Google Dashboard information after signing in.') |
87 self.assertTrue(self.WaitUntil( | 87 self.assertTrue(self.WaitUntil( |
88 lambda: self.FindInPage(stop_button, tab_index=1)['match_count'], | 88 lambda: self.FindInPage(stop_button, tab_index=1)['match_count'], |
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
216 | 216 |
217 # Verify browser 2 does not contain credit card info. | 217 # Verify browser 2 does not contain credit card info. |
218 browser2_profile = browser2.GetAutofillProfile() | 218 browser2_profile = browser2.GetAutofillProfile() |
219 num_cc_profiles = len(browser2_profile['credit_cards']) | 219 num_cc_profiles = len(browser2_profile['credit_cards']) |
220 self.assertEqual(0, num_cc_profiles, | 220 self.assertEqual(0, num_cc_profiles, |
221 msg='Browser 2 unexpectedly contains credit card info.') | 221 msg='Browser 2 unexpectedly contains credit card info.') |
222 | 222 |
223 | 223 |
224 if __name__ == '__main__': | 224 if __name__ == '__main__': |
225 pyauto_functional.Main() | 225 pyauto_functional.Main() |
OLD | NEW |