| OLD | NEW |
| 1 # Copyright 2014 The Chromium Authors. All rights reserved. | 1 # Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 | 4 |
| 5 """WebsiteTest testing class.""" | 5 """WebsiteTest testing class.""" |
| 6 | 6 |
| 7 import logging | 7 import logging |
| 8 import sys | 8 import sys |
| 9 import time | 9 import time |
| 10 | 10 |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 # Username of the website. | 59 # Username of the website. |
| 60 self.username = None | 60 self.username = None |
| 61 # Password of the website. | 61 # Password of the website. |
| 62 self.password = None | 62 self.password = None |
| 63 # Username is not automatically filled. | 63 # Username is not automatically filled. |
| 64 self.username_not_auto = username_not_auto | 64 self.username_not_auto = username_not_auto |
| 65 # Autofilling mode. | 65 # Autofilling mode. |
| 66 self.mode = self.Mode.NOT_AUTOFILLED | 66 self.mode = self.Mode.NOT_AUTOFILLED |
| 67 # The |remaining_time_to_wait| limits the total time in seconds spent in | 67 # The |remaining_time_to_wait| limits the total time in seconds spent in |
| 68 # potentially infinite loops. | 68 # potentially infinite loops. |
| 69 self.remaining_time_to_wait = 200 | 69 self.remaining_time_to_wait = 150 |
| 70 # The testing Environment. | 70 # The testing Environment. |
| 71 self.environment = None | 71 self.environment = None |
| 72 # The webdriver. | 72 # The webdriver. |
| 73 self.driver = None | 73 self.driver = None |
| 74 # Whether or not the test was run. | 74 # Whether or not the test was run. |
| 75 self.was_run = False | 75 self.was_run = False |
| 76 | 76 |
| 77 # Mouse/Keyboard actions. | 77 # Mouse/Keyboard actions. |
| 78 | 78 |
| 79 def Click(self, selector): | 79 def Click(self, selector): |
| (...skipping 322 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 402 | 402 |
| 403 self.LoginWhenNotAutofilled() | 403 self.LoginWhenNotAutofilled() |
| 404 self.Wait(2) | 404 self.Wait(2) |
| 405 self.environment.SwitchToInternals() | 405 self.environment.SwitchToInternals() |
| 406 self.environment.CheckForNewMessage( | 406 self.environment.CheckForNewMessage( |
| 407 environment.MESSAGE_ASK, | 407 environment.MESSAGE_ASK, |
| 408 True, | 408 True, |
| 409 "Error: password manager thinks that a login with wrong password was " | 409 "Error: password manager thinks that a login with wrong password was " |
| 410 "successful for the following website : %s \n" % self.name) | 410 "successful for the following website : %s \n" % self.name) |
| 411 self.environment.SwitchFromInternals() | 411 self.environment.SwitchFromInternals() |
| OLD | NEW |