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

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

Issue 929293005: Autofill: Add contents of CVC unmask prompt dialog on OSX. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@cup_01_initial_add
Patch Set: Fix failing browser test by calling test::SetCreditCardInfo. Created 5 years, 9 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
« no previous file with comments | « no previous file | chrome/browser/ui/cocoa/autofill/card_unmask_prompt_view_bridge.h » ('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) 2015 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2015 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/guid.h" 5 #include "base/guid.h"
6 #include "base/message_loop/message_loop.h" 6 #include "base/message_loop/message_loop.h"
7 #include "chrome/browser/ui/autofill/card_unmask_prompt_controller_impl.h" 7 #include "chrome/browser/ui/autofill/card_unmask_prompt_controller_impl.h"
8 #include "chrome/browser/ui/browser.h" 8 #include "chrome/browser/ui/browser.h"
9 #include "chrome/browser/ui/tabs/tab_strip_model.h" 9 #include "chrome/browser/ui/tabs/tab_strip_model.h"
10 #include "chrome/test/base/in_process_browser_test.h" 10 #include "chrome/test/base/in_process_browser_test.h"
11 #include "components/autofill/core/browser/autofill_test_utils.h"
11 #include "components/autofill/core/browser/card_unmask_delegate.h" 12 #include "components/autofill/core/browser/card_unmask_delegate.h"
12 #include "content/public/browser/web_contents.h" 13 #include "content/public/browser/web_contents.h"
13 #include "content/public/test/test_utils.h" 14 #include "content/public/test/test_utils.h"
14 15
15 namespace autofill { 16 namespace autofill {
16 17
17 namespace { 18 namespace {
18 19
19 class TestCardUnmaskDelegate : public CardUnmaskDelegate { 20 class TestCardUnmaskDelegate : public CardUnmaskDelegate {
20 public: 21 public:
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 // This member must outlive the controller. 92 // This member must outlive the controller.
92 scoped_refptr<content::MessageLoopRunner> runner_; 93 scoped_refptr<content::MessageLoopRunner> runner_;
93 94
94 scoped_ptr<TestCardUnmaskPromptController> controller_; 95 scoped_ptr<TestCardUnmaskPromptController> controller_;
95 scoped_ptr<TestCardUnmaskDelegate> delegate_; 96 scoped_ptr<TestCardUnmaskDelegate> delegate_;
96 97
97 DISALLOW_COPY_AND_ASSIGN(CardUnmaskPromptViewBrowserTest); 98 DISALLOW_COPY_AND_ASSIGN(CardUnmaskPromptViewBrowserTest);
98 }; 99 };
99 100
100 IN_PROC_BROWSER_TEST_F(CardUnmaskPromptViewBrowserTest, DisplayUI) { 101 IN_PROC_BROWSER_TEST_F(CardUnmaskPromptViewBrowserTest, DisplayUI) {
101 CreditCard credit_card(base::GenerateGUID(), "https://www.example.com/"); 102 CreditCard credit_card(CreditCard::MASKED_SERVER_CARD, "a123");
103 test::SetCreditCardInfo(&credit_card, "Bonnie Parker",
104 "2109" /* Mastercard */, "12", "2012");
105 credit_card.SetTypeForMaskedCard(kMasterCard);
bondd 2015/03/06 23:57:15 estade@ emailed me this as a fix for the broken br
102 106
103 controller()->ShowPrompt(credit_card, delegate()->GetWeakPtr()); 107 controller()->ShowPrompt(credit_card, delegate()->GetWeakPtr());
104 controller()->RunMessageLoop(); 108 controller()->RunMessageLoop();
105 } 109 }
106 110
107 } // namespace 111 } // namespace
108 112
109 } // namespace autofill 113 } // namespace autofill
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/cocoa/autofill/card_unmask_prompt_view_bridge.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698