| OLD | NEW |
| 1 # -*- coding: utf-8 -*- | 1 # -*- coding: utf-8 -*- |
| 2 # Copyright 2014 The Chromium Authors. All rights reserved. | 2 # Copyright 2014 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 """Automated tests for many websites""" | 6 """Automated tests for many websites""" |
| 7 | 7 |
| 8 import argparse | 8 import argparse |
| 9 import logging | 9 import logging |
| 10 | 10 |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 64 | 64 |
| 65 | 65 |
| 66 class Nytimes(WebsiteTest): | 66 class Nytimes(WebsiteTest): |
| 67 | 67 |
| 68 def Login(self): | 68 def Login(self): |
| 69 self.GoTo("https://myaccount.nytimes.com/auth/login") | 69 self.GoTo("https://myaccount.nytimes.com/auth/login") |
| 70 self.FillUsernameInto("#userid") | 70 self.FillUsernameInto("#userid") |
| 71 self.FillPasswordInto("#password") | 71 self.FillPasswordInto("#password") |
| 72 self.Submit("#password") | 72 self.Submit("#password") |
| 73 | 73 |
| 74 class Odnoklassniki(WebsiteTest): |
| 75 |
| 76 def Login(self): |
| 77 self.GoTo("https://ok.ru") |
| 78 self.FillUsernameInto("#field_email") |
| 79 self.FillPasswordInto("#field_password") |
| 80 self.Submit("#field_password") |
| 74 | 81 |
| 75 class Pinterest(WebsiteTest): | 82 class Pinterest(WebsiteTest): |
| 76 | 83 |
| 77 def Login(self): | 84 def Login(self): |
| 78 self.GoTo("https://www.pinterest.com/login/") | 85 self.GoTo("https://www.pinterest.com/login/") |
| 79 self.FillUsernameInto("[name='username_or_email']") | 86 self.FillUsernameInto("[name='username_or_email']") |
| 80 self.FillPasswordInto("[name='password']") | 87 self.FillPasswordInto("[name='password']") |
| 81 self.Submit("[name='password']") | 88 self.Submit("[name='password']") |
| 82 | 89 |
| 83 | 90 |
| (...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 266 environment.AddWebsiteTest(Facebook("facebook")) | 273 environment.AddWebsiteTest(Facebook("facebook")) |
| 267 | 274 |
| 268 environment.AddWebsiteTest(Google("google")) | 275 environment.AddWebsiteTest(Google("google")) |
| 269 | 276 |
| 270 environment.AddWebsiteTest(Linkedin("linkedin")) | 277 environment.AddWebsiteTest(Linkedin("linkedin")) |
| 271 | 278 |
| 272 environment.AddWebsiteTest(Mailru("mailru")) | 279 environment.AddWebsiteTest(Mailru("mailru")) |
| 273 | 280 |
| 274 environment.AddWebsiteTest(Nytimes("nytimes")) | 281 environment.AddWebsiteTest(Nytimes("nytimes")) |
| 275 | 282 |
| 283 environment.AddWebsiteTest(Odnoklassniki("odnoklassniki")) |
| 284 |
| 276 environment.AddWebsiteTest(Pinterest("pinterest")) | 285 environment.AddWebsiteTest(Pinterest("pinterest")) |
| 277 | 286 |
| 278 environment.AddWebsiteTest(Reddit("reddit", username_not_auto=True)) | 287 environment.AddWebsiteTest(Reddit("reddit", username_not_auto=True)) |
| 279 | 288 |
| 280 environment.AddWebsiteTest(Tumblr("tumblr", username_not_auto=True)) | 289 environment.AddWebsiteTest(Tumblr("tumblr", username_not_auto=True)) |
| 281 | 290 |
| 282 environment.AddWebsiteTest(Twitter("twitter")) | 291 environment.AddWebsiteTest(Twitter("twitter")) |
| 283 | 292 |
| 284 environment.AddWebsiteTest(Wikipedia("wikipedia", username_not_auto=True)) | 293 environment.AddWebsiteTest(Wikipedia("wikipedia", username_not_auto=True)) |
| 285 | 294 |
| (...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 480 args.profile_path[0], | 489 args.profile_path[0], |
| 481 passwords_path, | 490 passwords_path, |
| 482 True, | 491 True, |
| 483 numeric_level, | 492 numeric_level, |
| 484 args.log_screen, | 493 args.log_screen, |
| 485 log_file, | 494 log_file, |
| 486 tested_websites, | 495 tested_websites, |
| 487 args.tests) | 496 args.tests) |
| 488 | 497 |
| 489 saveResults(tests_results, save_path) | 498 saveResults(tests_results, save_path) |
| OLD | NEW |