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. Iceland is a special place with magical powers; we want to |
703 // of content_browsertests, where extensions don't exist. Iceland, like an | 703 // protect it from outsiders :). |
ncarter (slow)
2017/05/01 20:15:19
Removing the mention of 'extension' from this comm
nasko
2017/05/01 21:25:37
Done.
| |
704 // extension process, is a special place with magical powers; we want to protect | |
705 // it from outsiders. | |
706 class IsolateIcelandFrameTreeBrowserTest : public ContentBrowserTest { | 704 class IsolateIcelandFrameTreeBrowserTest : public ContentBrowserTest { |
707 public: | 705 public: |
708 IsolateIcelandFrameTreeBrowserTest() {} | 706 IsolateIcelandFrameTreeBrowserTest() {} |
709 | 707 |
710 void SetUpCommandLine(base::CommandLine* command_line) override { | 708 void SetUpCommandLine(base::CommandLine* command_line) override { |
711 command_line->AppendSwitchASCII(switches::kIsolateSitesForTesting, "*.is"); | 709 command_line->AppendSwitchASCII(switches::kIsolateSitesForTesting, "*.is"); |
712 } | 710 } |
713 | 711 |
714 void SetUpOnMainThread() override { | 712 void SetUpOnMainThread() override { |
715 host_resolver()->AddRule("*", "127.0.0.1"); | 713 host_resolver()->AddRule("*", "127.0.0.1"); |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
755 // Make sure we did a process transfer back to "b.is". | 753 // Make sure we did a process transfer back to "b.is". |
756 EXPECT_EQ( | 754 EXPECT_EQ( |
757 " Site A ------------ proxies for B\n" | 755 " Site A ------------ proxies for B\n" |
758 " +--Site B ------- proxies for A\n" | 756 " +--Site B ------- proxies for A\n" |
759 "Where A = http://a.com/\n" | 757 "Where A = http://a.com/\n" |
760 " B = http://b.is/", | 758 " B = http://b.is/", |
761 FrameTreeVisualizer().DepictFrameTree(root)); | 759 FrameTreeVisualizer().DepictFrameTree(root)); |
762 } | 760 } |
763 | 761 |
764 } // namespace content | 762 } // namespace content |
OLD | NEW |