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

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

Issue 600553003: Enable swapping a frame back in to its parent process (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@remoteToLocal
Patch Set: Created 6 years, 1 month 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 "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/strings/stringprintf.h" 8 #include "base/strings/stringprintf.h"
9 #include "content/browser/frame_host/cross_process_frame_connector.h" 9 #include "content/browser/frame_host/cross_process_frame_connector.h"
10 #include "content/browser/frame_host/frame_tree.h" 10 #include "content/browser/frame_host/frame_tree.h"
(...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after
330 330
331 // Check again that a new process is created and is different from the 331 // Check again that a new process is created and is different from the
332 // top level one and the previous one. 332 // top level one and the previous one.
333 ASSERT_EQ(2U, root->child_count()); 333 ASSERT_EQ(2U, root->child_count());
334 child = root->child_at(0); 334 child = root->child_at(0);
335 EXPECT_NE(shell()->web_contents()->GetSiteInstance(), 335 EXPECT_NE(shell()->web_contents()->GetSiteInstance(),
336 child->current_frame_host()->GetSiteInstance()); 336 child->current_frame_host()->GetSiteInstance());
337 EXPECT_NE(site_instance, 337 EXPECT_NE(site_instance,
338 child->current_frame_host()->GetSiteInstance()); 338 child->current_frame_host()->GetSiteInstance());
339 339
340 // TODO(japhet): This currently causes an assertion in the renderer process. 340 // Navigate back to the parent's origin and ensure we return to the
341 // Enable when the assertion is fixed. 341 // parent's process.
342 //NavigateFrameToURL(child, http_url); 342 NavigateFrameToURL(child, http_url);
343 //EXPECT_EQ(http_url, observer.navigation_url()); 343 EXPECT_EQ(http_url, observer.navigation_url());
344 //EXPECT_TRUE(observer.navigation_succeeded()); 344 EXPECT_TRUE(observer.navigation_succeeded());
345 //EXPECT_EQ(shell()->web_contents()->GetSiteInstance(), 345 EXPECT_EQ(shell()->web_contents()->GetSiteInstance(),
346 // child->current_frame_host()->GetSiteInstance()); 346 child->current_frame_host()->GetSiteInstance());
347 } 347 }
348 348
349 // Crash a subframe and ensures its children are cleared from the FrameTree. 349 // Crash a subframe and ensures its children are cleared from the FrameTree.
350 // See http://crbug.com/338508. 350 // See http://crbug.com/338508.
351 // TODO(creis): Disabled for flakiness; see http://crbug.com/405582. 351 // TODO(creis): Disabled for flakiness; see http://crbug.com/405582.
352 // TODO(creis): Enable this on Android when we can kill the process there. 352 // TODO(creis): Enable this on Android when we can kill the process there.
353 IN_PROC_BROWSER_TEST_F(SitePerProcessBrowserTest, DISABLED_CrashSubframe) { 353 IN_PROC_BROWSER_TEST_F(SitePerProcessBrowserTest, DISABLED_CrashSubframe) {
354 GURL main_url(embedded_test_server()->GetURL("/site_per_process_main.html")); 354 GURL main_url(embedded_test_server()->GetURL("/site_per_process_main.html"));
355 NavigateToURL(shell(), main_url); 355 NavigateToURL(shell(), main_url);
356 356
(...skipping 372 matching lines...) Expand 10 before | Expand all | Expand 10 after
729 } 729 }
730 730
731 navigation_observer.Wait(); 731 navigation_observer.Wait();
732 EXPECT_TRUE(observer.navigation_succeeded()); 732 EXPECT_TRUE(observer.navigation_succeeded());
733 EXPECT_EQ(cross_site_url, observer.navigation_url()); 733 EXPECT_EQ(cross_site_url, observer.navigation_url());
734 EXPECT_EQ(0U, child->child_count()); 734 EXPECT_EQ(0U, child->child_count());
735 } 735 }
736 } 736 }
737 737
738 } // namespace content 738 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/frame_host/render_frame_host_manager.cc ('k') | content/browser/web_contents/web_contents_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698