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

Side by Side Diff: chrome/renderer/autofill/password_generation_agent_browsertest.cc

Issue 1409293007: new URL('') should throw TypeError (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Updated testcase Created 5 years 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 #include <string.h> 5 #include <string.h>
6 6
7 #include "base/memory/scoped_ptr.h" 7 #include "base/memory/scoped_ptr.h"
8 #include "base/strings/utf_string_conversions.h" 8 #include "base/strings/utf_string_conversions.h"
9 #include "base/test/histogram_tester.h" 9 #include "base/test/histogram_tester.h"
10 #include "chrome/renderer/autofill/password_generation_test_utils.h" 10 #include "chrome/renderer/autofill/password_generation_test_utils.h"
(...skipping 431 matching lines...) Expand 10 before | Expand all | Expand 10 after
442 autofill::password_generation::GENERATION_POPUP_SHOWN, 442 autofill::password_generation::GENERATION_POPUP_SHOWN,
443 1); 443 1);
444 } 444 }
445 445
446 TEST_F(PasswordGenerationAgentTest, DynamicFormTest) { 446 TEST_F(PasswordGenerationAgentTest, DynamicFormTest) {
447 LoadHTMLWithUserGesture(kSigninFormHTML); 447 LoadHTMLWithUserGesture(kSigninFormHTML);
448 SetNotBlacklistedMessage(password_generation_, kSigninFormHTML); 448 SetNotBlacklistedMessage(password_generation_, kSigninFormHTML);
449 449
450 ExecuteJavaScriptForTests( 450 ExecuteJavaScriptForTests(
451 "var form = document.createElement('form');" 451 "var form = document.createElement('form');"
452 "form.action='http://www.random.com';"
452 "var username = document.createElement('input');" 453 "var username = document.createElement('input');"
453 "username.type = 'text';" 454 "username.type = 'text';"
454 "username.id = 'dynamic_username';" 455 "username.id = 'dynamic_username';"
455 "var first_password = document.createElement('input');" 456 "var first_password = document.createElement('input');"
456 "first_password.type = 'password';" 457 "first_password.type = 'password';"
457 "first_password.id = 'first_password';" 458 "first_password.id = 'first_password';"
458 "first_password.name = 'first_password';" 459 "first_password.name = 'first_password';"
459 "var second_password = document.createElement('input');" 460 "var second_password = document.createElement('input');"
460 "second_password.type = 'password';" 461 "second_password.type = 'password';"
461 "second_password.id = 'second_password';" 462 "second_password.id = 'second_password';"
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
553 ExpectGenerationAvailable("first_password", false); 554 ExpectGenerationAvailable("first_password", false);
554 555
555 LoadHTMLWithUserGesture(kNewPasswordAutocompleteAttributeFormHTML); 556 LoadHTMLWithUserGesture(kNewPasswordAutocompleteAttributeFormHTML);
556 SetNotBlacklistedMessage(password_generation_, 557 SetNotBlacklistedMessage(password_generation_,
557 kNewPasswordAutocompleteAttributeFormHTML); 558 kNewPasswordAutocompleteAttributeFormHTML);
558 559
559 ExpectGenerationAvailable("first_password", false); 560 ExpectGenerationAvailable("first_password", false);
560 } 561 }
561 562
562 } // namespace autofill 563 } // namespace autofill
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698