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

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, 2 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
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 344 matching lines...) Expand 10 before | Expand all | Expand 10 after
355 355
356 // Check again that a new process is created and is different from the 356 // Check again that a new process is created and is different from the
357 // top level one and the previous one. 357 // top level one and the previous one.
358 ASSERT_EQ(1U, root->child_count()); 358 ASSERT_EQ(1U, root->child_count());
359 child = root->child_at(0); 359 child = root->child_at(0);
360 EXPECT_NE(shell()->web_contents()->GetSiteInstance(), 360 EXPECT_NE(shell()->web_contents()->GetSiteInstance(),
361 child->current_frame_host()->GetSiteInstance()); 361 child->current_frame_host()->GetSiteInstance());
362 EXPECT_NE(site_instance, 362 EXPECT_NE(site_instance,
363 child->current_frame_host()->GetSiteInstance()); 363 child->current_frame_host()->GetSiteInstance());
364 364
365 // TODO(japhet): This currently causes an assertion in the renderer process. 365 // Navigate back into the original process
366 // Enable when the assertion is fixed. 366 NavigateFrameToURL(child, http_url);
367 //NavigateFrameToURL(child, http_url); 367 EXPECT_EQ(http_url, observer.navigation_url());
368 //EXPECT_EQ(http_url, observer.navigation_url()); 368 EXPECT_TRUE(observer.navigation_succeeded());
369 //EXPECT_TRUE(observer.navigation_succeeded()); 369 EXPECT_EQ(shell()->web_contents()->GetSiteInstance(),
370 //EXPECT_EQ(shell()->web_contents()->GetSiteInstance(), 370 child->current_frame_host()->GetSiteInstance());
371 // child->current_frame_host()->GetSiteInstance());
372 } 371 }
373 372
374 // Crash a subframe and ensures its children are cleared from the FrameTree. 373 // Crash a subframe and ensures its children are cleared from the FrameTree.
375 // See http://crbug.com/338508. 374 // See http://crbug.com/338508.
376 // TODO(creis): Disabled for flakiness; see http://crbug.com/405582. 375 // TODO(creis): Disabled for flakiness; see http://crbug.com/405582.
377 // TODO(creis): Enable this on Android when we can kill the process there. 376 // TODO(creis): Enable this on Android when we can kill the process there.
378 IN_PROC_BROWSER_TEST_F(SitePerProcessBrowserTest, DISABLED_CrashSubframe) { 377 IN_PROC_BROWSER_TEST_F(SitePerProcessBrowserTest, DISABLED_CrashSubframe) {
379 host_resolver()->AddRule("*", "127.0.0.1"); 378 host_resolver()->AddRule("*", "127.0.0.1");
380 ASSERT_TRUE(test_server()->Start()); 379 ASSERT_TRUE(test_server()->Start());
381 GURL main_url(test_server()->GetURL("files/site_per_process_main.html")); 380 GURL main_url(test_server()->GetURL("files/site_per_process_main.html"));
(...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after
643 "server-redirect?" + client_redirect_http_url.spec())); 642 "server-redirect?" + client_redirect_http_url.spec()));
644 EXPECT_TRUE(NavigateIframeToURL(shell(), server_redirect_http_url, "test")); 643 EXPECT_TRUE(NavigateIframeToURL(shell(), server_redirect_http_url, "test"));
645 644
646 // DidFailProvisionalLoad when navigating to client_redirect_http_url. 645 // DidFailProvisionalLoad when navigating to client_redirect_http_url.
647 EXPECT_EQ(observer.navigation_url(), client_redirect_http_url); 646 EXPECT_EQ(observer.navigation_url(), client_redirect_http_url);
648 EXPECT_FALSE(observer.navigation_succeeded()); 647 EXPECT_FALSE(observer.navigation_succeeded());
649 } 648 }
650 } 649 }
651 650
652 } // namespace content 651 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698