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

Side by Side Diff: chrome/browser/ui/views/payments/payment_request_browsertest_base.h

Issue 2772103002: [Payments] Desktop: never return false in incognito mode for canMakePayment (Closed)
Patch Set: Created 3 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
OLDNEW
1 // Copyright 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 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 #ifndef CHROME_BROWSER_UI_VIEWS_PAYMENTS_PAYMENT_REQUEST_BROWSERTEST_BASE_H_ 5 #ifndef CHROME_BROWSER_UI_VIEWS_PAYMENTS_PAYMENT_REQUEST_BROWSERTEST_BASE_H_
6 #define CHROME_BROWSER_UI_VIEWS_PAYMENTS_PAYMENT_REQUEST_BROWSERTEST_BASE_H_ 6 #define CHROME_BROWSER_UI_VIEWS_PAYMENTS_PAYMENT_REQUEST_BROWSERTEST_BASE_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 public views::WidgetObserver { 62 public views::WidgetObserver {
63 protected: 63 protected:
64 // Test will open a browser window to |test_file_path| (relative to 64 // Test will open a browser window to |test_file_path| (relative to
65 // chrome/test/data/payments). 65 // chrome/test/data/payments).
66 explicit PaymentRequestBrowserTestBase(const std::string& test_file_path); 66 explicit PaymentRequestBrowserTestBase(const std::string& test_file_path);
67 ~PaymentRequestBrowserTestBase() override; 67 ~PaymentRequestBrowserTestBase() override;
68 68
69 void SetUpCommandLine(base::CommandLine* command_line) override; 69 void SetUpCommandLine(base::CommandLine* command_line) override;
70 void SetUpOnMainThread() override; 70 void SetUpOnMainThread() override;
71 71
72 void SetIncognitoForTesting();
73
72 // PaymentRequestDialogView::ObserverForTest 74 // PaymentRequestDialogView::ObserverForTest
73 void OnDialogOpened() override; 75 void OnDialogOpened() override;
74 void OnOrderSummaryOpened() override; 76 void OnOrderSummaryOpened() override;
75 void OnPaymentMethodOpened() override; 77 void OnPaymentMethodOpened() override;
76 void OnShippingSectionOpened() override; 78 void OnShippingSectionOpened() override;
77 void OnCreditCardEditorOpened() override; 79 void OnCreditCardEditorOpened() override;
78 void OnShippingAddressEditorOpened() override; 80 void OnShippingAddressEditorOpened() override;
79 void OnBackNavigation() override; 81 void OnBackNavigation() override;
80 void OnContactInfoOpened() override; 82 void OnContactInfoOpened() override;
81 void OnEditorViewUpdated() override; 83 void OnEditorViewUpdated() override;
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 void ResetEventObserver(DialogEvent event); 202 void ResetEventObserver(DialogEvent event);
201 // Wait for the event passed to ResetEventObserver() to occur. 203 // Wait for the event passed to ResetEventObserver() to occur.
202 void WaitForObservedEvent(); 204 void WaitForObservedEvent();
203 205
204 private: 206 private:
205 std::unique_ptr<DialogEventObserver> event_observer_; 207 std::unique_ptr<DialogEventObserver> event_observer_;
206 const std::string test_file_path_; 208 const std::string test_file_path_;
207 std::unique_ptr<net::EmbeddedTestServer> https_server_; 209 std::unique_ptr<net::EmbeddedTestServer> https_server_;
208 // Weak, owned by the PaymentRequest object. 210 // Weak, owned by the PaymentRequest object.
209 TestChromePaymentRequestDelegate* delegate_; 211 TestChromePaymentRequestDelegate* delegate_;
212 bool incognito_for_testing_;
210 213
211 DISALLOW_COPY_AND_ASSIGN(PaymentRequestBrowserTestBase); 214 DISALLOW_COPY_AND_ASSIGN(PaymentRequestBrowserTestBase);
212 }; 215 };
213 216
214 } // namespace payments 217 } // namespace payments
215 218
216 #endif // CHROME_BROWSER_UI_VIEWS_PAYMENTS_PAYMENT_REQUEST_BROWSERTEST_BASE_H_ 219 #endif // CHROME_BROWSER_UI_VIEWS_PAYMENTS_PAYMENT_REQUEST_BROWSERTEST_BASE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698