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

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

Issue 1148953014: Fix the commit type for out-of-process iframes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix failing tests Created 5 years, 7 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 <algorithm> 7 #include <algorithm>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 1013 matching lines...) Expand 10 before | Expand all | Expand 10 after
1024 EXPECT_EQ(shell()->web_contents()->GetSiteInstance(), 1024 EXPECT_EQ(shell()->web_contents()->GetSiteInstance(),
1025 root->child_at(1)->current_frame_host()->GetSiteInstance()); 1025 root->child_at(1)->current_frame_host()->GetSiteInstance());
1026 1026
1027 ASSERT_EQ(1U, root->child_at(0)->child_count()); 1027 ASSERT_EQ(1U, root->child_at(0)->child_count());
1028 1028
1029 // Make sure node4 points to the correct cross-site-page. 1029 // Make sure node4 points to the correct cross-site-page.
1030 FrameTreeNode* node4 = root->child_at(0)->child_at(0); 1030 FrameTreeNode* node4 = root->child_at(0)->child_at(0);
1031 GURL site_c_url(embedded_test_server()->GetURL("baz.com", "/title1.html")); 1031 GURL site_c_url(embedded_test_server()->GetURL("baz.com", "/title1.html"));
1032 EXPECT_EQ(site_c_url, node4->current_url()); 1032 EXPECT_EQ(site_c_url, node4->current_url());
1033 1033
1034 // |site_instance_c| is expected to go away once we kill |child_process_b| 1034 // |site_instance_c|'s frames are expected to go away once we kill
1035 // below; refcount it to extend the lifetime. 1035 // |child_process_b| below.
1036 scoped_refptr<SiteInstanceImpl> site_instance_c = 1036 scoped_refptr<SiteInstanceImpl> site_instance_c =
1037 node4->current_frame_host()->GetSiteInstance(); 1037 node4->current_frame_host()->GetSiteInstance();
1038 1038
1039 // Initially proxies for both B and C will be present in the root. 1039 // Initially proxies for both B and C will be present in the root.
1040 EXPECT_EQ( 1040 EXPECT_EQ(
1041 " Site A ------------ proxies for B C\n" 1041 " Site A ------------ proxies for B C\n"
1042 " |--Site B ------- proxies for A C\n" 1042 " |--Site B ------- proxies for A C\n"
1043 " | +--Site C -- proxies for A B\n" 1043 " | +--Site C -- proxies for A B\n"
1044 " +--Site A ------- proxies for B C\n" 1044 " +--Site A ------- proxies for B C\n"
1045 "Where A = http://a.com/\n" 1045 "Where A = http://a.com/\n"
(...skipping 12 matching lines...) Expand all
1058 // Make sure proxy C has gone from node3 as well. 1058 // Make sure proxy C has gone from node3 as well.
1059 // Make sure proxy B stays around in root and node3. 1059 // Make sure proxy B stays around in root and node3.
1060 EXPECT_EQ( 1060 EXPECT_EQ(
1061 " Site A ------------ proxies for B\n" 1061 " Site A ------------ proxies for B\n"
1062 " |--Site B ------- proxies for A\n" 1062 " |--Site B ------- proxies for A\n"
1063 " +--Site A ------- proxies for B\n" 1063 " +--Site A ------- proxies for B\n"
1064 "Where A = http://a.com/\n" 1064 "Where A = http://a.com/\n"
1065 " B = http://bar.com/ (no process)", 1065 " B = http://bar.com/ (no process)",
1066 DepictFrameTree(root)); 1066 DepictFrameTree(root));
1067 1067
1068 EXPECT_TRUE(site_instance_c->HasOneRef()); 1068 EXPECT_EQ(0U, site_instance_c->active_frame_count());
Charlie Reis 2015/05/27 17:26:24 This is https://codereview.chromium.org/1155393003
1069 } 1069 }
1070 1070
1071 // Crash a subframe and ensures its children are cleared from the FrameTree. 1071 // Crash a subframe and ensures its children are cleared from the FrameTree.
1072 // See http://crbug.com/338508. 1072 // See http://crbug.com/338508.
1073 // TODO(creis): Disabled for flakiness; see http://crbug.com/405582. 1073 // TODO(creis): Disabled for flakiness; see http://crbug.com/405582.
1074 IN_PROC_BROWSER_TEST_F(SitePerProcessBrowserTest, DISABLED_CrashSubframe) { 1074 IN_PROC_BROWSER_TEST_F(SitePerProcessBrowserTest, DISABLED_CrashSubframe) {
1075 GURL main_url(embedded_test_server()->GetURL("/site_per_process_main.html")); 1075 GURL main_url(embedded_test_server()->GetURL("/site_per_process_main.html"));
1076 NavigateToURL(shell(), main_url); 1076 NavigateToURL(shell(), main_url);
1077 1077
1078 StartFrameAtDataURL(); 1078 StartFrameAtDataURL();
(...skipping 1416 matching lines...) Expand 10 before | Expand all | Expand 10 after
2495 " |--Site A\n" 2495 " |--Site A\n"
2496 " +--Site A\n" 2496 " +--Site A\n"
2497 " |--Site A\n" 2497 " |--Site A\n"
2498 " +--Site A\n" 2498 " +--Site A\n"
2499 " +--Site A\n" 2499 " +--Site A\n"
2500 "Where A = http://127.0.0.1/", 2500 "Where A = http://127.0.0.1/",
2501 DepictFrameTree(root)); 2501 DepictFrameTree(root));
2502 } 2502 }
2503 2503
2504 } // namespace content 2504 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698