| 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 6395 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6406 embedded_test_server()->GetURL("/cross_site_iframe_factory.html?a(a)")); | 6406 embedded_test_server()->GetURL("/cross_site_iframe_factory.html?a(a)")); |
| 6407 EXPECT_TRUE(NavigateToURL(shell(), main_url)); | 6407 EXPECT_TRUE(NavigateToURL(shell(), main_url)); |
| 6408 | 6408 |
| 6409 FrameTreeNode* root = web_contents()->GetFrameTree()->root(); | 6409 FrameTreeNode* root = web_contents()->GetFrameTree()->root(); |
| 6410 | 6410 |
| 6411 #if !defined(OS_MACOSX) && !defined(OS_ANDROID) | 6411 #if !defined(OS_MACOSX) && !defined(OS_ANDROID) |
| 6412 // Unused variable on Mac and Android. | 6412 // Unused variable on Mac and Android. |
| 6413 RenderWidgetHostViewBase* rwhv_root = static_cast<RenderWidgetHostViewBase*>( | 6413 RenderWidgetHostViewBase* rwhv_root = static_cast<RenderWidgetHostViewBase*>( |
| 6414 root->current_frame_host()->GetRenderWidgetHost()->GetView()); | 6414 root->current_frame_host()->GetRenderWidgetHost()->GetView()); |
| 6415 #endif | 6415 #endif |
| 6416 web_contents()->SendScreenRects(); | |
| 6417 | 6416 |
| 6418 content::TestNavigationObserver navigation_observer(shell()->web_contents()); | |
| 6419 FrameTreeNode* child_node = root->child_at(0); | 6417 FrameTreeNode* child_node = root->child_at(0); |
| 6420 GURL site_url(embedded_test_server()->GetURL( | 6418 GURL site_url(embedded_test_server()->GetURL( |
| 6421 "baz.com", "/site_isolation/page-with-select.html")); | 6419 "baz.com", "/site_isolation/page-with-select.html")); |
| 6422 NavigateFrameToURL(child_node, site_url); | 6420 NavigateFrameToURL(child_node, site_url); |
| 6423 navigation_observer.Wait(); | 6421 |
| 6422 web_contents()->SendScreenRects(); |
| 6423 |
| 6424 WaitForChildFrameSurfaceReady(child_node->current_frame_host()); |
| 6424 | 6425 |
| 6425 RenderWidgetHostViewBase* rwhv_child = static_cast<RenderWidgetHostViewBase*>( | 6426 RenderWidgetHostViewBase* rwhv_child = static_cast<RenderWidgetHostViewBase*>( |
| 6426 child_node->current_frame_host()->GetRenderWidgetHost()->GetView()); | 6427 child_node->current_frame_host()->GetRenderWidgetHost()->GetView()); |
| 6427 | 6428 |
| 6428 EXPECT_NE(shell()->web_contents()->GetSiteInstance(), | 6429 EXPECT_NE(shell()->web_contents()->GetSiteInstance(), |
| 6429 child_node->current_frame_host()->GetSiteInstance()); | 6430 child_node->current_frame_host()->GetSiteInstance()); |
| 6430 | 6431 |
| 6431 scoped_refptr<ShowWidgetMessageFilter> filter = new ShowWidgetMessageFilter(); | 6432 scoped_refptr<ShowWidgetMessageFilter> filter = new ShowWidgetMessageFilter(); |
| 6432 child_node->current_frame_host()->GetProcess()->AddFilter(filter.get()); | 6433 child_node->current_frame_host()->GetProcess()->AddFilter(filter.get()); |
| 6433 | 6434 |
| (...skipping 3711 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10145 // the body of the page. | 10146 // the body of the page. |
| 10146 std::string body; | 10147 std::string body; |
| 10147 EXPECT_TRUE(ExecuteScriptAndExtractString(root->child_at(0), R"( | 10148 EXPECT_TRUE(ExecuteScriptAndExtractString(root->child_at(0), R"( |
| 10148 var body = document.getElementsByTagName('pre')[0].innerText; | 10149 var body = document.getElementsByTagName('pre')[0].innerText; |
| 10149 window.domAutomationController.send(body);)", | 10150 window.domAutomationController.send(body);)", |
| 10150 &body)); | 10151 &body)); |
| 10151 EXPECT_EQ("my_token=my_value\n", body); | 10152 EXPECT_EQ("my_token=my_value\n", body); |
| 10152 } | 10153 } |
| 10153 | 10154 |
| 10154 } // namespace content | 10155 } // namespace content |
| OLD | NEW |