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

Unified Diff: content/browser/site_per_process_browsertest.cc

Issue 172063002: Unify frame IDs with RenderFrameHost routing IDs. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Clean up Created 6 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/site_per_process_browsertest.cc
diff --git a/content/browser/site_per_process_browsertest.cc b/content/browser/site_per_process_browsertest.cc
index f2e09e1bfef6f73884561fdbb091f4e210955a6f..e438fd00678dd896b06a2b25e4b8bf260b6c8e29 100644
--- a/content/browser/site_per_process_browsertest.cc
+++ b/content/browser/site_per_process_browsertest.cc
@@ -483,8 +483,8 @@ IN_PROC_BROWSER_TEST_F(SitePerProcessBrowserTest, MAYBE_CrashSubframe) {
GetFrameTree()->root();
ASSERT_EQ(1U, root->child_count());
FrameTreeNode* child = root->child_at(0);
- EXPECT_NE(FrameTreeNode::kInvalidFrameId, root->frame_id());
- EXPECT_NE(FrameTreeNode::kInvalidFrameId, root->child_at(0)->frame_id());
+ EXPECT_EQ(main_url, root->current_url());
+ EXPECT_EQ(cross_site_url, child->current_url());
// Crash the subframe process.
RenderProcessHost* root_process = root->current_frame_host()->GetProcess();
@@ -498,8 +498,10 @@ IN_PROC_BROWSER_TEST_F(SitePerProcessBrowserTest, MAYBE_CrashSubframe) {
}
// Ensure that the child frame still exists but has been cleared.
+ // TODO(creis): Can we check something else, like the URL?
awong 2014/02/20 00:25:30 This is confusing since the code below is actually
Charlie Reis 2014/02/20 00:43:53 Oops! I was fixing my own TODO from patch set 1 a
EXPECT_EQ(1U, root->child_count());
- EXPECT_EQ(FrameTreeNode::kInvalidFrameId, root->child_at(0)->frame_id());
+ EXPECT_EQ(main_url, root->current_url());
+ EXPECT_EQ(GURL(), child->current_url());
// Now crash the top-level page to clear the child frame.
{
@@ -510,7 +512,7 @@ IN_PROC_BROWSER_TEST_F(SitePerProcessBrowserTest, MAYBE_CrashSubframe) {
crash_observer.Wait();
}
EXPECT_EQ(0U, root->child_count());
- EXPECT_EQ(FrameTreeNode::kInvalidFrameId, root->frame_id());
+ EXPECT_EQ(GURL(), root->current_url());
}
// TODO(nasko): Disable this test until out-of-process iframes is ready and the

Powered by Google App Engine
This is Rietveld 408576698