OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/site_per_process_browsertest.h" | 5 #include "content/browser/site_per_process_browsertest.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <algorithm> | 10 #include <algorithm> |
(...skipping 9724 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
9735 // the renderer when navigating cross-origin. The policy should be unchanged | 9735 // the renderer when navigating cross-origin. The policy should be unchanged |
9736 // when modified dynamically in the parent frame. When the frame is navigated, | 9736 // when modified dynamically in the parent frame. When the frame is navigated, |
9737 // the new renderer should have the correct container policy. | 9737 // the new renderer should have the correct container policy. |
9738 // | 9738 // |
9739 // TODO(iclelland): Once there is a proper JS inspection API from the renderer, | 9739 // TODO(iclelland): Once there is a proper JS inspection API from the renderer, |
9740 // use that to check the policy. Until then, we test webkitFullscreenEnabled, | 9740 // use that to check the policy. Until then, we test webkitFullscreenEnabled, |
9741 // which conveniently just returns the result of calling isFeatureEnabled on | 9741 // which conveniently just returns the result of calling isFeatureEnabled on |
9742 // the fullscreen feature. Since there are no HTTP header policies involved, | 9742 // the fullscreen feature. Since there are no HTTP header policies involved, |
9743 // this verifies the presence of the container policy in the iframe. | 9743 // this verifies the presence of the container policy in the iframe. |
9744 // https://crbug.com/703703 | 9744 // https://crbug.com/703703 |
| 9745 // TODO(lunalu): Currently feature policy is shipped without fullscreen (e.g., |
| 9746 // the implementation of allowfullscreen does not use feature policy |
| 9747 // information). Once allowfullscreen is controlled by feature policy, re-enable |
| 9748 // this test. |
9745 IN_PROC_BROWSER_TEST_F(SitePerProcessFeaturePolicyBrowserTest, | 9749 IN_PROC_BROWSER_TEST_F(SitePerProcessFeaturePolicyBrowserTest, |
9746 ContainerPolicyCrossOriginNavigation) { | 9750 DISABLED_ContainerPolicyCrossOriginNavigation) { |
9747 WebContentsImpl* contents = web_contents(); | 9751 WebContentsImpl* contents = web_contents(); |
9748 FrameTreeNode* root = contents->GetFrameTree()->root(); | 9752 FrameTreeNode* root = contents->GetFrameTree()->root(); |
9749 | 9753 |
9750 // Helper to check if a frame is allowed to go fullscreen on the renderer | 9754 // Helper to check if a frame is allowed to go fullscreen on the renderer |
9751 // side. | 9755 // side. |
9752 auto is_fullscreen_allowed = [](FrameTreeNode* ftn) { | 9756 auto is_fullscreen_allowed = [](FrameTreeNode* ftn) { |
9753 bool fullscreen_allowed = false; | 9757 bool fullscreen_allowed = false; |
9754 EXPECT_TRUE(ExecuteScriptAndExtractBool( | 9758 EXPECT_TRUE(ExecuteScriptAndExtractBool( |
9755 ftn, | 9759 ftn, |
9756 "window.domAutomationController.send(document.webkitFullscreenEnabled)", | 9760 "window.domAutomationController.send(document.webkitFullscreenEnabled)", |
(...skipping 410 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10167 names.insert(root->children[0]->frame_entry->frame_unique_name()); | 10171 names.insert(root->children[0]->frame_entry->frame_unique_name()); |
10168 } | 10172 } |
10169 | 10173 |
10170 // More than one entry in the set means that the subframe frame navigation | 10174 // More than one entry in the set means that the subframe frame navigation |
10171 // entries didn't have a consistent unique name. This will break history | 10175 // entries didn't have a consistent unique name. This will break history |
10172 // navigations =( | 10176 // navigations =( |
10173 EXPECT_THAT(names, SizeIs(1)) << "Mismatched names for subframe!"; | 10177 EXPECT_THAT(names, SizeIs(1)) << "Mismatched names for subframe!"; |
10174 } | 10178 } |
10175 | 10179 |
10176 } // namespace content | 10180 } // namespace content |
OLD | NEW |