Chromium Code Reviews| 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 14 matching lines...) Expand all Loading... | |
| 25 class SitePerProcessPaymentsBrowserTest : public InProcessBrowserTest { | 25 class SitePerProcessPaymentsBrowserTest : public InProcessBrowserTest { |
| 26 public: | 26 public: |
| 27 SitePerProcessPaymentsBrowserTest() {} | 27 SitePerProcessPaymentsBrowserTest() {} |
| 28 ~SitePerProcessPaymentsBrowserTest() override {} | 28 ~SitePerProcessPaymentsBrowserTest() override {} |
| 29 | 29 |
| 30 void SetUpCommandLine(base::CommandLine* command_line) override { | 30 void SetUpCommandLine(base::CommandLine* command_line) override { |
| 31 InProcessBrowserTest::SetUpCommandLine(command_line); | 31 InProcessBrowserTest::SetUpCommandLine(command_line); |
| 32 // 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 |
| 33 // to load pages from other hosts without an error. | 33 // to load pages from other hosts without an error. |
| 34 command_line->AppendSwitch(switches::kIgnoreCertificateErrors); | 34 command_line->AppendSwitch(switches::kIgnoreCertificateErrors); |
| 35 command_line->AppendSwitch("enable-experimental-web-platform-features"); | 35 command_line->AppendSwitch( |
| 36 switches::kEnableExperimentalWebPlatformFeatures); | |
|
please use gerrit instead
2017/01/09 14:50:13
thx! :-)
Mathieu
2017/01/09 16:54:19
Acknowledged.
| |
| 36 // Append --site-per-process flag. | 37 // Append --site-per-process flag. |
| 37 content::IsolateAllSitesForTesting(command_line); | 38 content::IsolateAllSitesForTesting(command_line); |
| 38 } | 39 } |
| 39 | 40 |
| 40 void SetUpOnMainThread() override { | 41 void SetUpOnMainThread() override { |
| 41 https_server_.reset( | 42 https_server_.reset( |
| 42 new net::EmbeddedTestServer(net::EmbeddedTestServer::TYPE_HTTPS)); | 43 new net::EmbeddedTestServer(net::EmbeddedTestServer::TYPE_HTTPS)); |
| 43 host_resolver()->AddRule("*", "127.0.0.1"); | 44 host_resolver()->AddRule("*", "127.0.0.1"); |
| 44 ASSERT_TRUE(https_server_->InitializeAndListen()); | 45 ASSERT_TRUE(https_server_->InitializeAndListen()); |
| 45 content::SetupCrossSiteRedirector(https_server_.get()); | 46 content::SetupCrossSiteRedirector(https_server_.get()); |
| (...skipping 18 matching lines...) Expand all Loading... | |
| 64 https_server_->GetURL("b.com", "/payment_request_iframe.html"); | 65 https_server_->GetURL("b.com", "/payment_request_iframe.html"); |
| 65 EXPECT_TRUE(content::NavigateIframeToURL(tab, "test", iframe_url)); | 66 EXPECT_TRUE(content::NavigateIframeToURL(tab, "test", iframe_url)); |
| 66 | 67 |
| 67 EXPECT_TRUE(tab->GetRenderWidgetHostView()->IsShowing()); | 68 EXPECT_TRUE(tab->GetRenderWidgetHostView()->IsShowing()); |
| 68 content::RenderFrameHost* frame = ChildFrameAt(tab->GetMainFrame(), 0); | 69 content::RenderFrameHost* frame = ChildFrameAt(tab->GetMainFrame(), 0); |
| 69 EXPECT_TRUE(frame); | 70 EXPECT_TRUE(frame); |
| 70 EXPECT_NE(frame->GetSiteInstance(), tab->GetMainFrame()->GetSiteInstance()); | 71 EXPECT_NE(frame->GetSiteInstance(), tab->GetMainFrame()->GetSiteInstance()); |
| 71 } | 72 } |
| 72 | 73 |
| 73 } // namespace payments | 74 } // namespace payments |
| OLD | NEW |