OLD | NEW |
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 "base/macros.h" | 5 #include "base/macros.h" |
6 #include "build/build_config.h" | 6 #include "build/build_config.h" |
7 #include "content/browser/frame_host/frame_tree.h" | 7 #include "content/browser/frame_host/frame_tree.h" |
8 #include "content/browser/frame_host/frame_tree_node.h" | 8 #include "content/browser/frame_host/frame_tree_node.h" |
9 #include "content/browser/renderer_host/render_view_host_impl.h" | 9 #include "content/browser/renderer_host/render_view_host_impl.h" |
10 #include "content/browser/web_contents/web_contents_impl.h" | 10 #include "content/browser/web_contents/web_contents_impl.h" |
(...skipping 681 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
692 | 692 |
693 GURL data_url("data:text/html,foo"); | 693 GURL data_url("data:text/html,foo"); |
694 NavigateFrameToURL(root->child_at(1), data_url); | 694 NavigateFrameToURL(root->child_at(1), data_url); |
695 | 695 |
696 // Navigating to a data URL should set a unique origin. This is represented | 696 // Navigating to a data URL should set a unique origin. This is represented |
697 // as "null" per RFC 6454. | 697 // as "null" per RFC 6454. |
698 EXPECT_EQ(root->child_at(1)->current_origin().Serialize(), "null"); | 698 EXPECT_EQ(root->child_at(1)->current_origin().Serialize(), "null"); |
699 } | 699 } |
700 | 700 |
701 // FrameTreeBrowserTest variant where we isolate http://*.is, Iceland's top | 701 // FrameTreeBrowserTest variant where we isolate http://*.is, Iceland's top |
702 // level domain. This is an analogue to --isolate-extensions that we use inside | 702 // level domain. This is an analogue to isolating extensions, which we can use |
703 // of content_browsertests, where extensions don't exist. Iceland, like an | 703 // inside content_browsertests, where extensions don't exist. Iceland, like an |
704 // extension process, is a special place with magical powers; we want to protect | 704 // extension process, is a special place with magical powers; we want to protect |
705 // it from outsiders. | 705 // it from outsiders. |
706 class IsolateIcelandFrameTreeBrowserTest : public ContentBrowserTest { | 706 class IsolateIcelandFrameTreeBrowserTest : public ContentBrowserTest { |
707 public: | 707 public: |
708 IsolateIcelandFrameTreeBrowserTest() {} | 708 IsolateIcelandFrameTreeBrowserTest() {} |
709 | 709 |
710 void SetUpCommandLine(base::CommandLine* command_line) override { | 710 void SetUpCommandLine(base::CommandLine* command_line) override { |
711 command_line->AppendSwitchASCII(switches::kIsolateSitesForTesting, "*.is"); | 711 command_line->AppendSwitchASCII(switches::kIsolateSitesForTesting, "*.is"); |
712 } | 712 } |
713 | 713 |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
755 // Make sure we did a process transfer back to "b.is". | 755 // Make sure we did a process transfer back to "b.is". |
756 EXPECT_EQ( | 756 EXPECT_EQ( |
757 " Site A ------------ proxies for B\n" | 757 " Site A ------------ proxies for B\n" |
758 " +--Site B ------- proxies for A\n" | 758 " +--Site B ------- proxies for A\n" |
759 "Where A = http://a.com/\n" | 759 "Where A = http://a.com/\n" |
760 " B = http://b.is/", | 760 " B = http://b.is/", |
761 FrameTreeVisualizer().DepictFrameTree(root)); | 761 FrameTreeVisualizer().DepictFrameTree(root)); |
762 } | 762 } |
763 | 763 |
764 } // namespace content | 764 } // namespace content |
OLD | NEW |