Chromium Code Reviews| Index: content/browser/site_per_process_browsertest.cc |
| diff --git a/content/browser/site_per_process_browsertest.cc b/content/browser/site_per_process_browsertest.cc |
| index c8fa716929efe53b4a79d82206f6b7027f69d236..17820abc7ff4420bcce22958cca54ed9e2b0a702 100644 |
| --- a/content/browser/site_per_process_browsertest.cc |
| +++ b/content/browser/site_per_process_browsertest.cc |
| @@ -5256,4 +5256,33 @@ IN_PROC_BROWSER_TEST_F(SitePerProcessBrowserTest, CrossSiteIframeDisplayNone) { |
| observer->Wait(); |
| } |
| +IN_PROC_BROWSER_TEST_F(SitePerProcessBrowserTest, ScreenCoordinates) { |
| + GURL main_url(embedded_test_server()->GetURL( |
| + "a.com", "/cross_site_iframe_factory.html?a(b)")); |
| + NavigateToURL(shell(), main_url); |
| + |
| + FrameTreeNode* root = static_cast<WebContentsImpl*>(shell()->web_contents()) |
| + ->GetFrameTree() |
| + ->root(); |
| + FrameTreeNode* child = root->child_at(0); |
| + |
| + const char* properties[] = {"screenX", "screenY", "outerWidth", |
| + "outerHeight"}; |
| + |
| + for (const char* property : properties) { |
| + std::string script = "window.domAutomationController.send(window."; |
| + script += property; |
| + script += ");"; |
| + int root_value = 1; |
|
nasko
2016/02/12 18:14:08
Are the tests always positioned the same way? I'm
lfg
2016/03/02 18:29:08
This shouldn't be an issue. The important point of
|
| + int child_value = 2; |
| + EXPECT_TRUE(ExecuteScriptAndExtractInt(root->current_frame_host(), |
| + script.c_str(), &root_value)); |
| + |
| + EXPECT_TRUE(ExecuteScriptAndExtractInt(child->current_frame_host(), |
| + script.c_str(), &child_value)); |
| + |
| + EXPECT_EQ(root_value, child_value); |
| + } |
| +} |
| + |
| } // namespace content |