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

Side by Side Diff: content/browser/frame_host/frame_tree_browsertest.cc

Issue 1411073005: Migrating tests to use EmbeddedTestServer (/content) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 5 years, 1 month 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "content/browser/frame_host/frame_tree.h" 5 #include "content/browser/frame_host/frame_tree.h"
6 #include "content/browser/frame_host/frame_tree_node.h" 6 #include "content/browser/frame_host/frame_tree_node.h"
7 #include "content/browser/renderer_host/render_view_host_impl.h" 7 #include "content/browser/renderer_host/render_view_host_impl.h"
8 #include "content/browser/web_contents/web_contents_impl.h" 8 #include "content/browser/web_contents/web_contents_impl.h"
9 #include "content/public/browser/notification_service.h" 9 #include "content/public/browser/notification_service.h"
10 #include "content/public/browser/notification_types.h" 10 #include "content/public/browser/notification_types.h"
(...skipping 15 matching lines...) Expand all
26 #endif 26 #endif
27 27
28 namespace content { 28 namespace content {
29 29
30 class FrameTreeBrowserTest : public ContentBrowserTest { 30 class FrameTreeBrowserTest : public ContentBrowserTest {
31 public: 31 public:
32 FrameTreeBrowserTest() {} 32 FrameTreeBrowserTest() {}
33 33
34 void SetUpOnMainThread() override { 34 void SetUpOnMainThread() override {
35 host_resolver()->AddRule("*", "127.0.0.1"); 35 host_resolver()->AddRule("*", "127.0.0.1");
36 ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady()); 36 ASSERT_TRUE(embedded_test_server()->Start());
37 SetupCrossSiteRedirector(embedded_test_server()); 37 SetupCrossSiteRedirector(embedded_test_server());
38 } 38 }
39 39
40 private: 40 private:
41 DISALLOW_COPY_AND_ASSIGN(FrameTreeBrowserTest); 41 DISALLOW_COPY_AND_ASSIGN(FrameTreeBrowserTest);
42 }; 42 };
43 43
44 // Ensures FrameTree correctly reflects page structure during navigations. 44 // Ensures FrameTree correctly reflects page structure during navigations.
45 IN_PROC_BROWSER_TEST_F(FrameTreeBrowserTest, FrameTreeShape) { 45 IN_PROC_BROWSER_TEST_F(FrameTreeBrowserTest, FrameTreeShape) {
46 GURL base_url = embedded_test_server()->GetURL("A.com", "/site_isolation/"); 46 GURL base_url = embedded_test_server()->GetURL("A.com", "/site_isolation/");
(...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after
315 class CrossProcessFrameTreeBrowserTest : public ContentBrowserTest { 315 class CrossProcessFrameTreeBrowserTest : public ContentBrowserTest {
316 public: 316 public:
317 CrossProcessFrameTreeBrowserTest() {} 317 CrossProcessFrameTreeBrowserTest() {}
318 318
319 void SetUpCommandLine(base::CommandLine* command_line) override { 319 void SetUpCommandLine(base::CommandLine* command_line) override {
320 IsolateAllSitesForTesting(command_line); 320 IsolateAllSitesForTesting(command_line);
321 } 321 }
322 322
323 void SetUpOnMainThread() override { 323 void SetUpOnMainThread() override {
324 host_resolver()->AddRule("*", "127.0.0.1"); 324 host_resolver()->AddRule("*", "127.0.0.1");
325 ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady()); 325 ASSERT_TRUE(embedded_test_server()->Start());
326 SetupCrossSiteRedirector(embedded_test_server()); 326 SetupCrossSiteRedirector(embedded_test_server());
327 } 327 }
328 328
329 private: 329 private:
330 DISALLOW_COPY_AND_ASSIGN(CrossProcessFrameTreeBrowserTest); 330 DISALLOW_COPY_AND_ASSIGN(CrossProcessFrameTreeBrowserTest);
331 }; 331 };
332 332
333 // Ensure that we can complete a cross-process subframe navigation. 333 // Ensure that we can complete a cross-process subframe navigation.
334 IN_PROC_BROWSER_TEST_F(CrossProcessFrameTreeBrowserTest, 334 IN_PROC_BROWSER_TEST_F(CrossProcessFrameTreeBrowserTest,
335 CreateCrossProcessSubframeProxies) { 335 CreateCrossProcessSubframeProxies) {
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
424 GURL data_url("data:text/html,foo"); 424 GURL data_url("data:text/html,foo");
425 NavigateFrameToURL(root->child_at(1), data_url); 425 NavigateFrameToURL(root->child_at(1), data_url);
426 426
427 // Navigating to a data URL should set a unique origin. This is represented 427 // Navigating to a data URL should set a unique origin. This is represented
428 // as "null" per RFC 6454. 428 // as "null" per RFC 6454.
429 EXPECT_EQ(root->child_at(1)->current_replication_state().origin.Serialize(), 429 EXPECT_EQ(root->child_at(1)->current_replication_state().origin.Serialize(),
430 "null"); 430 "null");
431 } 431 }
432 432
433 } // namespace content 433 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698