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

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

Issue 2870153002: [Payments] Record navigations that close the Payment Request as aborts. (Closed)
Patch Set: Fixed Windows error Created 3 years, 7 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/views/payments/payment_request_can_make_payment_metrics_browsertest.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 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 #include "chrome/browser/ui/views/payments/payment_request_browsertest_base.h" 5 #include "chrome/browser/ui/views/payments/payment_request_browsertest_base.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <iostream> 8 #include <iostream>
9 #include <memory> 9 #include <memory>
10 #include <string> 10 #include <string>
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 // HTTPS server only serves a valid cert for localhost, so this is needed to 72 // HTTPS server only serves a valid cert for localhost, so this is needed to
73 // load pages from "a.com" without an interstitial. 73 // load pages from "a.com" without an interstitial.
74 command_line->AppendSwitch(switches::kIgnoreCertificateErrors); 74 command_line->AppendSwitch(switches::kIgnoreCertificateErrors);
75 } 75 }
76 76
77 void PaymentRequestBrowserTestBase::SetUpOnMainThread() { 77 void PaymentRequestBrowserTestBase::SetUpOnMainThread() {
78 // Setup the https server. 78 // Setup the https server.
79 https_server_ = base::MakeUnique<net::EmbeddedTestServer>( 79 https_server_ = base::MakeUnique<net::EmbeddedTestServer>(
80 net::EmbeddedTestServer::TYPE_HTTPS); 80 net::EmbeddedTestServer::TYPE_HTTPS);
81 host_resolver()->AddRule("a.com", "127.0.0.1"); 81 host_resolver()->AddRule("a.com", "127.0.0.1");
82 host_resolver()->AddRule("b.com", "127.0.0.1");
82 ASSERT_TRUE(https_server_->InitializeAndListen()); 83 ASSERT_TRUE(https_server_->InitializeAndListen());
83 https_server_->ServeFilesFromSourceDirectory("chrome/test/data/payments"); 84 https_server_->ServeFilesFromSourceDirectory("chrome/test/data/payments");
84 https_server_->StartAcceptingConnections(); 85 https_server_->StartAcceptingConnections();
85 86
86 NavigateTo(test_file_path_); 87 NavigateTo(test_file_path_);
87 88
88 // Starting now, PaymentRequest Mojo messages sent by the renderer will 89 // Starting now, PaymentRequest Mojo messages sent by the renderer will
89 // create PaymentRequest objects via this test's CreatePaymentRequestForTest, 90 // create PaymentRequest objects via this test's CreatePaymentRequestForTest,
90 // allowing the test to inject itself as a dialog observer. 91 // allowing the test to inject itself as a dialog observer.
91 content::WebContents* web_contents = GetActiveWebContents(); 92 content::WebContents* web_contents = GetActiveWebContents();
(...skipping 658 matching lines...) Expand 10 before | Expand all | Expand 10 after
750 break; 751 break;
751 case DialogEvent::CVC_PROMPT_SHOWN: 752 case DialogEvent::CVC_PROMPT_SHOWN:
752 out << "CVC_PROMPT_SHOWN"; 753 out << "CVC_PROMPT_SHOWN";
753 break; 754 break;
754 case DialogEvent::NOT_SUPPORTED_ERROR: 755 case DialogEvent::NOT_SUPPORTED_ERROR:
755 out << "NOT_SUPPORTED_ERROR"; 756 out << "NOT_SUPPORTED_ERROR";
756 break; 757 break;
757 } 758 }
758 return out; 759 return out;
759 } 760 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/views/payments/payment_request_can_make_payment_metrics_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698