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

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 332 matching lines...) Expand 10 before | Expand all | Expand 10 after
343 343
344 // Check again that a new process is created and is different from the 344 // Check again that a new process is created and is different from the
345 // top level one and the previous one. 345 // top level one and the previous one.
346 ASSERT_EQ(2U, root->child_count()); 346 ASSERT_EQ(2U, root->child_count());
347 child = root->child_at(0); 347 child = root->child_at(0);
348 EXPECT_NE(shell()->web_contents()->GetSiteInstance(), 348 EXPECT_NE(shell()->web_contents()->GetSiteInstance(),
349 child->current_frame_host()->GetSiteInstance()); 349 child->current_frame_host()->GetSiteInstance());
350 EXPECT_NE(site_instance, 350 EXPECT_NE(site_instance,
351 child->current_frame_host()->GetSiteInstance()); 351 child->current_frame_host()->GetSiteInstance());
352 352
353 // TODO(japhet): This currently causes an assertion in the renderer process. 353 // Navigate back to the parent's origin and ensure we return to the
354 // Enable when the assertion is fixed. 354 // parent's process.
355 //NavigateFrameToURL(child, http_url); 355 NavigateFrameToURL(child, http_url);
356 //EXPECT_EQ(http_url, observer.navigation_url()); 356 EXPECT_EQ(http_url, observer.navigation_url());
357 //EXPECT_TRUE(observer.navigation_succeeded()); 357 EXPECT_TRUE(observer.navigation_succeeded());
358 //EXPECT_EQ(shell()->web_contents()->GetSiteInstance(), 358 EXPECT_EQ(shell()->web_contents()->GetSiteInstance(),
359 // child->current_frame_host()->GetSiteInstance()); 359 child->current_frame_host()->GetSiteInstance());
360 } 360 }
361 361
362 // Crash a subframe and ensures its children are cleared from the FrameTree. 362 // Crash a subframe and ensures its children are cleared from the FrameTree.
363 // See http://crbug.com/338508. 363 // See http://crbug.com/338508.
364 // TODO(creis): Disabled for flakiness; see http://crbug.com/405582. 364 // TODO(creis): Disabled for flakiness; see http://crbug.com/405582.
365 // TODO(creis): Enable this on Android when we can kill the process there. 365 // TODO(creis): Enable this on Android when we can kill the process there.
366 IN_PROC_BROWSER_TEST_F(SitePerProcessBrowserTest, DISABLED_CrashSubframe) { 366 IN_PROC_BROWSER_TEST_F(SitePerProcessBrowserTest, DISABLED_CrashSubframe) {
367 GURL main_url(embedded_test_server()->GetURL("/site_per_process_main.html")); 367 GURL main_url(embedded_test_server()->GetURL("/site_per_process_main.html"));
368 NavigateToURL(shell(), main_url); 368 NavigateToURL(shell(), main_url);
369 369
(...skipping 379 matching lines...) Expand 10 before | Expand all | Expand 10 after
749 } 749 }
750 750
751 navigation_observer.Wait(); 751 navigation_observer.Wait();
752 EXPECT_EQ(cross_site_url, observer.navigation_url()); 752 EXPECT_EQ(cross_site_url, observer.navigation_url());
753 EXPECT_TRUE(observer.navigation_succeeded()); 753 EXPECT_TRUE(observer.navigation_succeeded());
754 EXPECT_EQ(0U, child->child_count()); 754 EXPECT_EQ(0U, child->child_count());
755 } 755 }
756 } 756 }
757 757
758 } // namespace content 758 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698