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

Side by Side Diff: content/browser/renderer_host/render_view_host_manager_browsertest.cc

Issue 10827078: Support frame tree propagation between renderers in the same browsing instance. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixes based on feedback from Charlie. Created 8 years, 4 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 | Annotate | Revision Log
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 "base/file_util.h" 5 #include "base/file_util.h"
6 #include "base/json/json_reader.h"
6 #include "base/memory/ref_counted.h" 7 #include "base/memory/ref_counted.h"
7 #include "base/path_service.h" 8 #include "base/path_service.h"
8 #include "base/utf_string_conversions.h" 9 #include "base/utf_string_conversions.h"
10 #include "content/common/content_constants_internal.h"
9 #include "content/browser/renderer_host/render_view_host_impl.h" 11 #include "content/browser/renderer_host/render_view_host_impl.h"
10 #include "content/browser/site_instance_impl.h" 12 #include "content/browser/site_instance_impl.h"
11 #include "content/browser/web_contents/web_contents_impl.h" 13 #include "content/browser/web_contents/web_contents_impl.h"
12 #include "content/public/browser/navigation_controller.h" 14 #include "content/public/browser/navigation_controller.h"
13 #include "content/public/browser/navigation_entry.h" 15 #include "content/public/browser/navigation_entry.h"
14 #include "content/public/browser/notification_details.h" 16 #include "content/public/browser/notification_details.h"
15 #include "content/public/browser/notification_observer.h" 17 #include "content/public/browser/notification_observer.h"
16 #include "content/public/browser/notification_registrar.h" 18 #include "content/public/browser/notification_registrar.h"
17 #include "content/public/browser/notification_types.h" 19 #include "content/public/browser/notification_types.h"
18 #include "content/public/browser/render_process_host.h" 20 #include "content/public/browser/render_process_host.h"
19 #include "content/public/browser/render_view_host_observer.h" 21 #include "content/public/browser/render_view_host_observer.h"
20 #include "content/public/browser/web_contents.h" 22 #include "content/public/browser/web_contents.h"
21 #include "content/public/common/url_constants.h" 23 #include "content/public/common/url_constants.h"
22 #include "content/public/test/browser_test_utils.h" 24 #include "content/public/test/browser_test_utils.h"
23 #include "content/public/test/test_utils.h" 25 #include "content/public/test/test_utils.h"
24 #include "content/shell/shell.h" 26 #include "content/shell/shell.h"
25 #include "content/test/content_browser_test.h" 27 #include "content/test/content_browser_test.h"
26 #include "content/test/content_browser_test_utils.h" 28 #include "content/test/content_browser_test_utils.h"
27 #include "net/base/net_util.h" 29 #include "net/base/net_util.h"
28 #include "net/test/test_server.h" 30 #include "net/test/test_server.h"
29 31
32 namespace {
33
34 bool CompareTrees(base::DictionaryValue* first, base::DictionaryValue* second) {
35 string16 name1;
36 string16 name2;
37 if (!first->GetString(content::kFrameTreeNodeNameKey, &name1) ||
38 !second->GetString(content::kFrameTreeNodeNameKey, &name2))
39 return false;
40 if (name1 != name2)
41 return false;
42
43 int id1 = 0;
44 int id2 = 0;
45 if (!first->GetInteger(content::kFrameTreeNodeIdKey, &id1) ||
46 !second->GetInteger(content::kFrameTreeNodeIdKey, &id2)) {
47 return false;
48 }
49 if (id1 != id2)
50 return false;
51
52 ListValue* subtree1 = NULL;
53 ListValue* subtree2 = NULL;
54 bool result1 = first->GetList(content::kFrameTreeNodeSubtreeKey, &subtree1);
55 bool result2 = second->GetList(content::kFrameTreeNodeSubtreeKey, &subtree2);
56 if (!result1 && !result2)
57 return true;
58 if (!result1 || !result2)
59 return false;
60
61 if (subtree1->GetSize() != subtree2->GetSize())
62 return false;
63
64 base::DictionaryValue* child1 = NULL;
65 base::DictionaryValue* child2 = NULL;
66 for (size_t i = 0; i < subtree1->GetSize(); ++i) {
67 if (!subtree1->GetDictionary(i, &child1) ||
68 !subtree2->GetDictionary(i, &child2)) {
69 return false;
70 }
71 if (!CompareTrees(child1, child2))
72 return false;
73 }
74
75 return true;
76 }
77
78 base::DictionaryValue* GetTree(content::RenderViewHostImpl* rvh) {
79 std::string frame_tree = rvh->frame_tree();
80 EXPECT_FALSE(frame_tree.empty());
81 base::Value* v = base::JSONReader::Read(frame_tree);
82 base::DictionaryValue* tree = NULL;
83 EXPECT_TRUE(v->IsType(base::Value::TYPE_DICTIONARY));
84 EXPECT_TRUE(v->GetAsDictionary(&tree));
85 return tree;
86 }
87
88 } // namespace
89
30 namespace content { 90 namespace content {
31 91
32 class RenderViewHostManagerTest : public ContentBrowserTest { 92 class RenderViewHostManagerTest : public ContentBrowserTest {
33 public: 93 public:
34 RenderViewHostManagerTest() {} 94 RenderViewHostManagerTest() {}
35 95
36 static bool GetFilePathWithHostAndPortReplacement( 96 static bool GetFilePathWithHostAndPortReplacement(
37 const std::string& original_file_path, 97 const std::string& original_file_path,
38 const net::HostPortPair& host_port_pair, 98 const net::HostPortPair& host_port_pair,
39 std::string* replacement_path) { 99 std::string* replacement_path) {
(...skipping 355 matching lines...) Expand 10 before | Expand all | Expand 10 after
395 close_observer.Wait(); 455 close_observer.Wait();
396 } 456 }
397 457
398 // Test for crbug.com/99202. PostMessage calls should still work after 458 // Test for crbug.com/99202. PostMessage calls should still work after
399 // navigating the source and target windows to different sites. 459 // navigating the source and target windows to different sites.
400 // Specifically: 460 // Specifically:
401 // 1) Create 3 windows (opener, "foo", and _blank) and send "foo" cross-process. 461 // 1) Create 3 windows (opener, "foo", and _blank) and send "foo" cross-process.
402 // 2) Fail to post a message from "foo" to opener with the wrong target origin. 462 // 2) Fail to post a message from "foo" to opener with the wrong target origin.
403 // 3) Post a message from "foo" to opener, which replies back to "foo". 463 // 3) Post a message from "foo" to opener, which replies back to "foo".
404 // 4) Post a message from _blank to "foo". 464 // 4) Post a message from _blank to "foo".
465 // 5) Post a message from "foo" to a subframe of opener, which replies back.
466 // 6) Post a message from _blank to a subframe of "foo".
405 IN_PROC_BROWSER_TEST_F(RenderViewHostManagerTest, 467 IN_PROC_BROWSER_TEST_F(RenderViewHostManagerTest,
406 SupportCrossProcessPostMessage) { 468 SupportCrossProcessPostMessage) {
407 // Start two servers with different sites. 469 // Start two servers with different sites.
408 ASSERT_TRUE(test_server()->Start()); 470 ASSERT_TRUE(test_server()->Start());
409 net::TestServer https_server( 471 net::TestServer https_server(
410 net::TestServer::TYPE_HTTPS, 472 net::TestServer::TYPE_HTTPS,
411 net::TestServer::kLocalhost, 473 net::TestServer::kLocalhost,
412 FilePath(FILE_PATH_LITERAL("content/test/data"))); 474 FilePath(FILE_PATH_LITERAL("content/test/data")));
413 ASSERT_TRUE(https_server.Start()); 475 ASSERT_TRUE(https_server.Start());
414 476
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
479 541
480 // 2) Fail to post a message from the foo window to the opener if the target 542 // 2) Fail to post a message from the foo window to the opener if the target
481 // origin is wrong. We won't see an error, but we can check for the right 543 // origin is wrong. We won't see an error, but we can check for the right
482 // number of received messages below. 544 // number of received messages below.
483 EXPECT_TRUE(ExecuteJavaScriptAndExtractBool( 545 EXPECT_TRUE(ExecuteJavaScriptAndExtractBool(
484 foo_contents->GetRenderViewHost(), L"", 546 foo_contents->GetRenderViewHost(), L"",
485 L"window.domAutomationController.send(postToOpener('msg'," 547 L"window.domAutomationController.send(postToOpener('msg',"
486 L"'http://google.com'));", 548 L"'http://google.com'));",
487 &success)); 549 &success));
488 EXPECT_TRUE(success); 550 EXPECT_TRUE(success);
551 ASSERT_FALSE(opener_manager->GetSwappedOutRenderViewHost(orig_site_instance));
489 552
490 // 3) Post a message from the foo window to the opener. The opener will 553 // 3) Post a message from the foo window to the opener. The opener will
491 // reply, causing the foo window to update its own title. 554 // reply, causing the foo window to update its own title.
492 WindowedNotificationObserver title_observer( 555 WindowedNotificationObserver title_observer(
493 NOTIFICATION_WEB_CONTENTS_TITLE_UPDATED, 556 NOTIFICATION_WEB_CONTENTS_TITLE_UPDATED,
494 Source<WebContents>(foo_contents)); 557 Source<WebContents>(foo_contents));
495 EXPECT_TRUE(ExecuteJavaScriptAndExtractBool( 558 EXPECT_TRUE(ExecuteJavaScriptAndExtractBool(
496 foo_contents->GetRenderViewHost(), L"", 559 foo_contents->GetRenderViewHost(), L"",
497 L"window.domAutomationController.send(postToOpener('msg','*'));", 560 L"window.domAutomationController.send(postToOpener('msg','*'));",
498 &success)); 561 &success));
499 EXPECT_TRUE(success); 562 EXPECT_TRUE(success);
563 ASSERT_FALSE(opener_manager->GetSwappedOutRenderViewHost(orig_site_instance));
500 title_observer.Wait(); 564 title_observer.Wait();
501 565
502 // We should have received only 1 message in the opener and "foo" tabs, 566 // We should have received only 1 message in the opener and "foo" tabs,
503 // and updated the title. 567 // and updated the title.
504 int opener_received_messages = 0; 568 int opener_received_messages = 0;
505 EXPECT_TRUE(ExecuteJavaScriptAndExtractInt( 569 EXPECT_TRUE(ExecuteJavaScriptAndExtractInt(
506 opener_contents->GetRenderViewHost(), L"", 570 opener_contents->GetRenderViewHost(), L"",
507 L"window.domAutomationController.send(window.receivedMessages);", 571 L"window.domAutomationController.send(window.receivedMessages);",
508 &opener_received_messages)); 572 &opener_received_messages));
509 int foo_received_messages = 0; 573 int foo_received_messages = 0;
(...skipping 14 matching lines...) Expand all
524 new_contents->GetRenderViewHost(), L"", 588 new_contents->GetRenderViewHost(), L"",
525 L"window.domAutomationController.send(postToFoo('msg2'));", 589 L"window.domAutomationController.send(postToFoo('msg2'));",
526 &success)); 590 &success));
527 EXPECT_TRUE(success); 591 EXPECT_TRUE(success);
528 title_observer2.Wait(); 592 title_observer2.Wait();
529 EXPECT_EQ(ASCIIToUTF16("msg2"), foo_contents->GetTitle()); 593 EXPECT_EQ(ASCIIToUTF16("msg2"), foo_contents->GetTitle());
530 594
531 // This postMessage should have created a swapped out RVH for the new 595 // This postMessage should have created a swapped out RVH for the new
532 // SiteInstance in the target=_blank window. 596 // SiteInstance in the target=_blank window.
533 EXPECT_TRUE(new_manager->GetSwappedOutRenderViewHost(foo_site_instance)); 597 EXPECT_TRUE(new_manager->GetSwappedOutRenderViewHost(foo_site_instance));
598
599 NavigateToURL(new_shell, https_server.GetURL("files/post_message2.html"));
600
601 // 5) Now verify that posting a message from the foo window to a subframe of
602 // the opener window works fine. The opener subframe will reply, causing the
603 // foo window to update its own title.
604 WindowedNotificationObserver title_observer3(
605 NOTIFICATION_WEB_CONTENTS_TITLE_UPDATED,
606 Source<WebContents>(new_shell->web_contents()));
607 EXPECT_TRUE(ExecuteJavaScriptAndExtractBool(
608 foo_contents->GetRenderViewHost(), L"",
609 L"window.domAutomationController.send(postToOpenerFrame('msg3','*'));",
610 &success));
611 EXPECT_TRUE(success);
612 title_observer3.Wait();
613 EXPECT_EQ(ASCIIToUTF16("msg3"), new_shell->web_contents()->GetTitle());
614
615 // 6) Lastly, verify that the _blank window can post a message to a subframe
616 // of the foo window. The subframe of foo will set the foo window title and
617 // will reply, setting the _blank window title.
618 WindowedNotificationObserver title_observer4(
619 NOTIFICATION_WEB_CONTENTS_TITLE_UPDATED,
620 Source<WebContents>(new_shell2->web_contents()));
621 EXPECT_TRUE(ExecuteJavaScriptAndExtractBool(
622 new_contents->GetRenderViewHost(), L"",
623 L"window.domAutomationController.send(postToFooFrame('msg4'));",
624 &success));
625 EXPECT_TRUE(success);
626 title_observer4.Wait();
627 EXPECT_EQ(ASCIIToUTF16("msg4"), new_shell2->web_contents()->GetTitle());
534 } 628 }
535 629
536 // Test for crbug.com/116192. Navigations to a window's opener should 630 // Test for crbug.com/116192. Navigations to a window's opener should
537 // still work after a process swap. 631 // still work after a process swap.
538 IN_PROC_BROWSER_TEST_F(RenderViewHostManagerTest, 632 IN_PROC_BROWSER_TEST_F(RenderViewHostManagerTest,
539 AllowTargetedNavigationsInOpenerAfterSwap) { 633 AllowTargetedNavigationsInOpenerAfterSwap) {
540 // Start two servers with different sites. 634 // Start two servers with different sites.
541 ASSERT_TRUE(test_server()->Start()); 635 ASSERT_TRUE(test_server()->Start());
542 net::TestServer https_server( 636 net::TestServer https_server(
543 net::TestServer::TYPE_HTTPS, 637 net::TestServer::TYPE_HTTPS,
(...skipping 488 matching lines...) Expand 10 before | Expand all | Expand 10 after
1032 rvh_observers.AddObserverToRVH(shell()->web_contents()->GetRenderViewHost()); 1126 rvh_observers.AddObserverToRVH(shell()->web_contents()->GetRenderViewHost());
1033 1127
1034 // This used to leak a render view host. 1128 // This used to leak a render view host.
1035 shell()->Close(); 1129 shell()->Close();
1036 1130
1037 RunAllPendingInMessageLoop(); // Needed on ChromeOS. 1131 RunAllPendingInMessageLoop(); // Needed on ChromeOS.
1038 1132
1039 EXPECT_EQ(0U, rvh_observers.GetNumObservers()); 1133 EXPECT_EQ(0U, rvh_observers.GetNumObservers());
1040 } 1134 }
1041 1135
1136 // Test for correct propagation of the frame hierarchy across processes in the
1137 // same BrowsingInstance. The test starts by navigating to a page that has
1138 // multiple nested frames. It then opens two windows and navigates each one
1139 // to a separate site, so at the end we have 3 SiteInstances. It checks
Charlie Reis 2012/08/24 23:26:07 Just for clarity, let's call out that the opened w
nasko 2012/08/27 18:53:37 Done.
1140 // that frame trees are kept in sync through navigations, reloading, and
1141 // JavaScript manipulation of the frame tree.
1142 IN_PROC_BROWSER_TEST_F(RenderViewHostManagerTest, FrameTreeUpdates) {
1143 // Start two servers to allow using different sites.
1144 EXPECT_TRUE(test_server()->Start());
1145 net::TestServer https_server(
1146 net::TestServer::TYPE_HTTPS,
1147 net::TestServer::kLocalhost,
1148 FilePath(FILE_PATH_LITERAL("content/test/data")));
1149 EXPECT_TRUE(https_server.Start());
1150
1151 GURL frame_tree_url(test_server()->GetURL("files/frame_tree/top.html"));
1152
1153 // Replace the 127.0.0.1 with localhost, which will give us a different
1154 // site instance.
1155 GURL::Replacements replacements;
1156 std::string new_host("localhost");
1157 replacements.SetHostStr(new_host);
1158 GURL remote_frame = test_server()->GetURL(
1159 "files/frame_tree/1-1.html").ReplaceComponents(replacements);
1160
1161 bool success = false;
1162 base::DictionaryValue* frames = NULL;
1163 base::ListValue* subtree = NULL;
1164
1165 NavigateToURL(shell(), test_server()->GetURL("files/simple_page.html"));
Charlie Reis 2012/08/24 23:26:07 Since the earlier description said we were startin
nasko 2012/08/27 18:53:37 Done.
1166 WebContents* opener_contents = shell()->web_contents();
1167 RenderViewHostManager* opener_rvhm = static_cast<WebContentsImpl*>(
1168 opener_contents)->GetRenderManagerForTesting();
1169 frames = GetTree(opener_rvhm->current_host());
1170 EXPECT_FALSE(frames->GetList(content::kFrameTreeNodeSubtreeKey, &subtree));
1171
1172 NavigateToURL(shell(), frame_tree_url);
1173 frames = GetTree(opener_rvhm->current_host());
1174 EXPECT_TRUE(frames->GetList(content::kFrameTreeNodeSubtreeKey, &subtree));
1175 EXPECT_TRUE(subtree->GetSize() == 3);
1176
1177 scoped_refptr<SiteInstance> orig_site_instance(
1178 opener_contents->GetSiteInstance());
1179 EXPECT_TRUE(orig_site_instance != NULL);
1180
1181 ShellAddedObserver shell_observer1;
1182 EXPECT_TRUE(ExecuteJavaScriptAndExtractBool(
1183 opener_contents->GetRenderViewHost(), L"",
1184 L"window.domAutomationController.send(openWindow('1-3.html'));",
1185 &success));
1186 EXPECT_TRUE(success);
1187
1188 Shell* shell1 = shell_observer1.GetShell();
1189 WebContents* contents1 = shell1->web_contents();
1190 WaitForLoadStop(contents1);
1191 RenderViewHostManager* rvhm1 = static_cast<WebContentsImpl*>(
1192 contents1)->GetRenderManagerForTesting();
1193 EXPECT_EQ("/files/frame_tree/1-3.html", contents1->GetURL().path());
1194
1195 NavigateToURL(shell1, https_server.GetURL("files/title1.html"));
Charlie Reis 2012/08/24 23:26:07 It would help to add a comment here like "Now navi
nasko 2012/08/27 18:53:37 Done.
1196 EXPECT_EQ("/files/title1.html", contents1->GetURL().path());
1197 scoped_refptr<SiteInstance> site_instance1(
1198 contents1->GetSiteInstance());
1199 EXPECT_NE(orig_site_instance, site_instance1);
1200
1201 ShellAddedObserver shell_observer2;
1202 EXPECT_TRUE(ExecuteJavaScriptAndExtractBool(
1203 opener_contents->GetRenderViewHost(), L"",
1204 L"window.domAutomationController.send(openWindow('../title2.html'));",
1205 &success));
1206 EXPECT_TRUE(success);
1207
1208 Shell* shell2 = shell_observer2.GetShell();
1209 WebContents* contents2 = shell2->web_contents();
1210 WaitForLoadStop(contents2);
1211 EXPECT_EQ("/files/title2.html", contents2->GetURL().path());
1212
1213 NavigateToURL(shell2, remote_frame);
1214 EXPECT_EQ("/files/frame_tree/1-1.html", contents2->GetURL().path());
1215 scoped_refptr<SiteInstance> site_instance2(
1216 contents2->GetSiteInstance());
1217 EXPECT_NE(orig_site_instance, site_instance2);
1218 EXPECT_NE(site_instance1, site_instance2);
1219
1220 RenderViewHostManager* rvhm2 = static_cast<WebContentsImpl*>(
1221 contents2)->GetRenderManagerForTesting();
1222
1223 EXPECT_TRUE(CompareTrees(
1224 GetTree(opener_rvhm->current_host()),
1225 GetTree(opener_rvhm->GetSwappedOutRenderViewHost(site_instance1))));
1226 EXPECT_TRUE(CompareTrees(
1227 GetTree(opener_rvhm->current_host()),
1228 GetTree(opener_rvhm->GetSwappedOutRenderViewHost(site_instance2))));
1229
1230 EXPECT_TRUE(CompareTrees(
1231 GetTree(rvhm1->current_host()),
1232 GetTree(rvhm1->GetSwappedOutRenderViewHost(orig_site_instance))));
1233 EXPECT_TRUE(CompareTrees(
1234 GetTree(rvhm2->current_host()),
1235 GetTree(rvhm2->GetSwappedOutRenderViewHost(orig_site_instance))));
1236
1237 EXPECT_FALSE(CompareTrees(
Charlie Reis 2012/08/24 23:26:07 Comment: "Verify that the frame trees from differe
nasko 2012/08/27 18:53:37 Done.
1238 GetTree(opener_rvhm->current_host()), GetTree(rvhm1->current_host())));
1239 EXPECT_FALSE(CompareTrees(
1240 GetTree(opener_rvhm->current_host()), GetTree(rvhm2->current_host())));
1241
1242 // Reload the original page, which will cause subframe ids to change. This
1243 // will ensure that the ids are properly replicated across reload.
1244 NavigateToURL(shell(), frame_tree_url);
Charlie Reis 2012/08/24 23:26:07 There might be a race possible here, since we migh
nasko 2012/08/27 18:53:37 Done.
Charlie Reis 2012/08/27 22:27:06 Don't we need to wait for NOTIFICATION_LOAD_STOP a
nasko 2012/08/27 22:45:42 NavigateToURL is monitoring for NOTIFICATION_LOAD_
1245
1246 EXPECT_TRUE(CompareTrees(
1247 GetTree(opener_rvhm->current_host()),
1248 GetTree(opener_rvhm->GetSwappedOutRenderViewHost(site_instance1))));
1249 EXPECT_TRUE(CompareTrees(
1250 GetTree(opener_rvhm->current_host()),
1251 GetTree(opener_rvhm->GetSwappedOutRenderViewHost(site_instance2))));
1252
1253 EXPECT_FALSE(CompareTrees(
1254 GetTree(opener_rvhm->current_host()), GetTree(rvhm1->current_host())));
1255 EXPECT_FALSE(CompareTrees(
1256 GetTree(opener_rvhm->current_host()), GetTree(rvhm2->current_host())));
1257
1258 // Now let's ensure that using JS to add/remove frames results in proper
1259 // updates.
1260 EXPECT_TRUE(ExecuteJavaScriptAndExtractBool(
1261 opener_contents->GetRenderViewHost(), L"",
1262 L"window.domAutomationController.send(removeFrame());",
1263 &success));
1264 EXPECT_TRUE(success);
1265 frames = GetTree(opener_rvhm->current_host());
1266 EXPECT_TRUE(frames->GetList(content::kFrameTreeNodeSubtreeKey, &subtree));
1267 EXPECT_TRUE(subtree->GetSize() == 2);
Charlie Reis 2012/08/24 23:26:07 nit: EXPECT_EQ(2, ...) Same below.
nasko 2012/08/27 18:53:37 Done.
1268
1269 // Create a load observer for the iframe that will be created by the
1270 // JavaScript code we will execute.
1271 WindowedNotificationObserver load_observer(
1272 NOTIFICATION_LOAD_STOP,
1273 content::Source<NavigationController>(
1274 &opener_contents->GetController()));
1275 EXPECT_TRUE(ExecuteJavaScriptAndExtractBool(
1276 opener_contents->GetRenderViewHost(), L"",
1277 L"window.domAutomationController.send(addFrame());",
1278 &success));
1279 EXPECT_TRUE(success);
1280 load_observer.Wait();
1281
1282 frames = GetTree(opener_rvhm->current_host());
1283 EXPECT_TRUE(frames->GetList(content::kFrameTreeNodeSubtreeKey, &subtree));
1284 EXPECT_TRUE(subtree->GetSize() == 3);
1285
1286 EXPECT_TRUE(CompareTrees(
1287 GetTree(opener_rvhm->current_host()),
1288 GetTree(opener_rvhm->GetSwappedOutRenderViewHost(site_instance1))));
1289 EXPECT_TRUE(CompareTrees(
1290 GetTree(opener_rvhm->current_host()),
1291 GetTree(opener_rvhm->GetSwappedOutRenderViewHost(site_instance2))));
1292 }
1293
1042 } // namespace content 1294 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698