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

Side by Side Diff: chrome/browser/ui/autofill/autofill_dialog_controller_browsertest.cc

Issue 232353003: Boldly refuse to show rAc dialog if cc info is not requested. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: update browsertest Created 6 years, 8 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 | « no previous file | chrome/browser/ui/autofill/autofill_dialog_controller_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "base/bind.h" 5 #include "base/bind.h"
6 #include "base/command_line.h" 6 #include "base/command_line.h"
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/memory/ref_counted.h" 8 #include "base/memory/ref_counted.h"
9 #include "base/memory/weak_ptr.h" 9 #include "base/memory/weak_ptr.h"
10 #include "base/message_loop/message_loop.h" 10 #include "base/message_loop/message_loop.h"
(...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after
347 347
348 FormData form; 348 FormData form;
349 form.name = ASCIIToUTF16("TestForm"); 349 form.name = ASCIIToUTF16("TestForm");
350 form.method = ASCIIToUTF16("POST"); 350 form.method = ASCIIToUTF16("POST");
351 form.user_submitted = true; 351 form.user_submitted = true;
352 352
353 FormFieldData field; 353 FormFieldData field;
354 field.autocomplete_attribute = "shipping tel"; 354 field.autocomplete_attribute = "shipping tel";
355 form.fields.push_back(field); 355 form.fields.push_back(field);
356 356
357 FormFieldData cc;
358 cc.autocomplete_attribute = "cc-number";
359 form.fields.push_back(cc);
360
357 test_generated_bubble_controller_ = 361 test_generated_bubble_controller_ =
358 new testing::NiceMock<TestGeneratedCreditCardBubbleController>( 362 new testing::NiceMock<TestGeneratedCreditCardBubbleController>(
359 GetActiveWebContents()); 363 GetActiveWebContents());
360 ASSERT_TRUE(test_generated_bubble_controller_->IsInstalled()); 364 ASSERT_TRUE(test_generated_bubble_controller_->IsInstalled());
361 365
362 message_loop_runner_ = new content::MessageLoopRunner; 366 message_loop_runner_ = new content::MessageLoopRunner;
363 controller_ = new TestAutofillDialogController( 367 controller_ = new TestAutofillDialogController(
364 GetActiveWebContents(), 368 GetActiveWebContents(),
365 form, 369 form,
366 metric_logger_, 370 metric_logger_,
(...skipping 1362 matching lines...) Expand 10 before | Expand all | Expand 10 after
1729 // Relevant country loaded but revalidation already happened, no further 1733 // Relevant country loaded but revalidation already happened, no further
1730 // validation should occur. 1734 // validation should occur.
1731 controller()->OnAddressValidationRulesLoaded("DE", false); 1735 controller()->OnAddressValidationRulesLoaded("DE", false);
1732 1736
1733 // Cancelling the dialog causes additional validation to see if the user 1737 // Cancelling the dialog causes additional validation to see if the user
1734 // cancelled with invalid fields, so verify and clear here. 1738 // cancelled with invalid fields, so verify and clear here.
1735 testing::Mock::VerifyAndClearExpectations(controller()->GetMockValidator()); 1739 testing::Mock::VerifyAndClearExpectations(controller()->GetMockValidator());
1736 } 1740 }
1737 1741
1738 } // namespace autofill 1742 } // namespace autofill
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/autofill/autofill_dialog_controller_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698