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

Side by Side Diff: content/browser/site_per_process_browsertest.cc

Issue 2156883002: Use content::FrameOwnerProperties instead of blink::WebFrameOwnerProperties in content/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@permission-delegation-frame-owner-properties
Patch Set: Use this everywhere Created 4 years, 5 months 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 (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 7359 matching lines...) Expand 10 before | Expand all | Expand 10 after
7370 bool fullscreen_allowed = false; 7370 bool fullscreen_allowed = false;
7371 EXPECT_TRUE(ExecuteScriptAndExtractBool( 7371 EXPECT_TRUE(ExecuteScriptAndExtractBool(
7372 ftn, 7372 ftn,
7373 "window.domAutomationController.send(document.webkitFullscreenEnabled)", 7373 "window.domAutomationController.send(document.webkitFullscreenEnabled)",
7374 &fullscreen_allowed)); 7374 &fullscreen_allowed));
7375 return fullscreen_allowed; 7375 return fullscreen_allowed;
7376 }; 7376 };
7377 7377
7378 EXPECT_TRUE(is_fullscreen_allowed(root)); 7378 EXPECT_TRUE(is_fullscreen_allowed(root));
7379 EXPECT_TRUE(is_fullscreen_allowed(root->child_at(0))); 7379 EXPECT_TRUE(is_fullscreen_allowed(root->child_at(0)));
7380 EXPECT_TRUE(root->child_at(0)->frame_owner_properties().allowFullscreen); 7380 EXPECT_TRUE(root->child_at(0)->frame_owner_properties().allow_fullscreen);
7381 7381
7382 // Now navigate to a page with two <iframe>'s, both without allowFullscreen. 7382 // Now navigate to a page with two <iframe>'s, both without allowFullscreen.
7383 GURL url_2(embedded_test_server()->GetURL( 7383 GURL url_2(embedded_test_server()->GetURL(
7384 "a.com", "/cross_site_iframe_factory.html?a(b,c)")); 7384 "a.com", "/cross_site_iframe_factory.html?a(b,c)"));
7385 EXPECT_TRUE(NavigateToURL(shell(), url_2)); 7385 EXPECT_TRUE(NavigateToURL(shell(), url_2));
7386 EXPECT_FALSE(root->child_at(0)->frame_owner_properties().allowFullscreen); 7386 EXPECT_FALSE(root->child_at(0)->frame_owner_properties().allow_fullscreen);
7387 EXPECT_FALSE(root->child_at(1)->frame_owner_properties().allowFullscreen); 7387 EXPECT_FALSE(root->child_at(1)->frame_owner_properties().allow_fullscreen);
7388 7388
7389 EXPECT_TRUE(is_fullscreen_allowed(root)); 7389 EXPECT_TRUE(is_fullscreen_allowed(root));
7390 EXPECT_FALSE(is_fullscreen_allowed(root->child_at(0))); 7390 EXPECT_FALSE(is_fullscreen_allowed(root->child_at(0)));
7391 EXPECT_FALSE(is_fullscreen_allowed(root->child_at(1))); 7391 EXPECT_FALSE(is_fullscreen_allowed(root->child_at(1)));
7392 7392
7393 // Dynamically enable fullscreen for first subframe and check that the 7393 // Dynamically enable fullscreen for first subframe and check that the
7394 // fullscreen property was updated on the FrameTreeNode. 7394 // fullscreen property was updated on the FrameTreeNode.
7395 EXPECT_TRUE(ExecuteScript( 7395 EXPECT_TRUE(ExecuteScript(
7396 root, "document.getElementById('child-0').allowFullscreen='true'")); 7396 root, "document.getElementById('child-0').allowFullscreen='true'"));
7397 EXPECT_TRUE(root->child_at(0)->frame_owner_properties().allowFullscreen); 7397 EXPECT_TRUE(root->child_at(0)->frame_owner_properties().allow_fullscreen);
7398 7398
7399 // Check that the first subframe is now allowed to go fullscreen. Other 7399 // Check that the first subframe is now allowed to go fullscreen. Other
7400 // frames shouldn't be affected. 7400 // frames shouldn't be affected.
7401 EXPECT_TRUE(is_fullscreen_allowed(root)); 7401 EXPECT_TRUE(is_fullscreen_allowed(root));
7402 EXPECT_TRUE(is_fullscreen_allowed(root->child_at(0))); 7402 EXPECT_TRUE(is_fullscreen_allowed(root->child_at(0)));
7403 EXPECT_FALSE(is_fullscreen_allowed(root->child_at(1))); 7403 EXPECT_FALSE(is_fullscreen_allowed(root->child_at(1)));
7404 7404
7405 // Now navigate to a page with two levels of nesting. 7405 // Now navigate to a page with two levels of nesting.
7406 GURL url_3(embedded_test_server()->GetURL( 7406 GURL url_3(embedded_test_server()->GetURL(
7407 "a.com", "/cross_site_iframe_factory.html?a(b(c))")); 7407 "a.com", "/cross_site_iframe_factory.html?a(b(c))"));
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
7502 7502
7503 shell()->web_contents()->WasShown(); 7503 shell()->web_contents()->WasShown();
7504 7504
7505 EXPECT_TRUE(ExecuteScriptAndExtractInt( 7505 EXPECT_TRUE(ExecuteScriptAndExtractInt(
7506 root->child_at(0)->current_frame_host(), 7506 root->child_at(0)->current_frame_host(),
7507 "window.domAutomationController.send(event_fired);", &event_fired)); 7507 "window.domAutomationController.send(event_fired);", &event_fired));
7508 EXPECT_EQ(2, event_fired); 7508 EXPECT_EQ(2, event_fired);
7509 } 7509 }
7510 7510
7511 } // namespace content 7511 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/frame_host/render_frame_proxy_host.cc ('k') | content/common/frame_owner_properties.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698