OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/command_line.h" | 5 #include "base/command_line.h" |
6 #include "chrome/browser/ui/browser.h" | 6 #include "chrome/browser/ui/browser.h" |
7 #include "chrome/browser/ui/browser_tabstrip.h" | 7 #include "chrome/browser/ui/browser_tabstrip.h" |
8 #include "chrome/browser/ui/tabs/tab_strip_model.h" | 8 #include "chrome/browser/ui/tabs/tab_strip_model.h" |
9 #include "chrome/test/base/in_process_browser_test.h" | 9 #include "chrome/test/base/in_process_browser_test.h" |
10 #include "chrome/test/base/ui_test_utils.h" | 10 #include "chrome/test/base/ui_test_utils.h" |
(...skipping 11 matching lines...) Expand all Loading... |
22 #include "url/url_constants.h" | 22 #include "url/url_constants.h" |
23 | 23 |
24 namespace payments { | 24 namespace payments { |
25 | 25 |
26 class SitePerProcessPaymentsBrowserTest : public InProcessBrowserTest { | 26 class SitePerProcessPaymentsBrowserTest : public InProcessBrowserTest { |
27 public: | 27 public: |
28 SitePerProcessPaymentsBrowserTest() {} | 28 SitePerProcessPaymentsBrowserTest() {} |
29 ~SitePerProcessPaymentsBrowserTest() override {} | 29 ~SitePerProcessPaymentsBrowserTest() override {} |
30 | 30 |
31 void SetUpCommandLine(base::CommandLine* command_line) override { | 31 void SetUpCommandLine(base::CommandLine* command_line) override { |
32 InProcessBrowserTest::SetUpCommandLine(command_line); | |
33 // HTTPS server only serves a valid cert for localhost, so this is needed | 32 // HTTPS server only serves a valid cert for localhost, so this is needed |
34 // to load pages from other hosts without an error. | 33 // to load pages from other hosts without an error. |
35 command_line->AppendSwitch(switches::kIgnoreCertificateErrors); | 34 command_line->AppendSwitch(switches::kIgnoreCertificateErrors); |
36 | 35 |
37 // Append --site-per-process flag. | 36 // Append --site-per-process flag. |
38 content::IsolateAllSitesForTesting(command_line); | 37 content::IsolateAllSitesForTesting(command_line); |
39 } | 38 } |
40 | 39 |
41 void SetUpOnMainThread() override { | 40 void SetUpOnMainThread() override { |
42 https_server_.reset( | 41 https_server_.reset( |
(...skipping 22 matching lines...) Expand all Loading... |
65 https_server_->GetURL("b.com", "/payment_request_iframe.html"); | 64 https_server_->GetURL("b.com", "/payment_request_iframe.html"); |
66 EXPECT_TRUE(content::NavigateIframeToURL(tab, "test", iframe_url)); | 65 EXPECT_TRUE(content::NavigateIframeToURL(tab, "test", iframe_url)); |
67 | 66 |
68 EXPECT_TRUE(tab->GetRenderWidgetHostView()->IsShowing()); | 67 EXPECT_TRUE(tab->GetRenderWidgetHostView()->IsShowing()); |
69 content::RenderFrameHost* frame = ChildFrameAt(tab->GetMainFrame(), 0); | 68 content::RenderFrameHost* frame = ChildFrameAt(tab->GetMainFrame(), 0); |
70 EXPECT_TRUE(frame); | 69 EXPECT_TRUE(frame); |
71 EXPECT_NE(frame->GetSiteInstance(), tab->GetMainFrame()->GetSiteInstance()); | 70 EXPECT_NE(frame->GetSiteInstance(), tab->GetMainFrame()->GetSiteInstance()); |
72 } | 71 } |
73 | 72 |
74 } // namespace payments | 73 } // namespace payments |
OLD | NEW |