OLD | NEW |
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 "chrome/browser/task_manager/task_manager.h" | 5 #include "chrome/browser/task_manager/task_manager.h" |
6 | 6 |
7 #include "base/files/file_path.h" | 7 #include "base/files/file_path.h" |
8 #include "base/strings/stringprintf.h" | 8 #include "base/strings/stringprintf.h" |
9 #include "base/strings/utf_string_conversions.h" | 9 #include "base/strings/utf_string_conversions.h" |
10 #include "chrome/browser/browser_process.h" | 10 #include "chrome/browser/browser_process.h" |
(...skipping 1009 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1020 ASSERT_NO_FATAL_FAILURE( | 1020 ASSERT_NO_FATAL_FAILURE( |
1021 WaitForTaskManagerRows(1, MatchSubframe("http://b.com/"))); | 1021 WaitForTaskManagerRows(1, MatchSubframe("http://b.com/"))); |
1022 ASSERT_NO_FATAL_FAILURE( | 1022 ASSERT_NO_FATAL_FAILURE( |
1023 WaitForTaskManagerRows(1, MatchSubframe("http://c.com/"))); | 1023 WaitForTaskManagerRows(1, MatchSubframe("http://c.com/"))); |
1024 ASSERT_NO_FATAL_FAILURE(WaitForTaskManagerRows(2, MatchAnySubframe())); | 1024 ASSERT_NO_FATAL_FAILURE(WaitForTaskManagerRows(2, MatchAnySubframe())); |
1025 } | 1025 } |
1026 } | 1026 } |
1027 | 1027 |
1028 // Tests what happens when a tab navigates a cross-frame iframe (to b.com) | 1028 // Tests what happens when a tab navigates a cross-frame iframe (to b.com) |
1029 // back to the site of the parent document (a.com). | 1029 // back to the site of the parent document (a.com). |
1030 // | |
1031 // TODO(nick): http://crbug.com/433012. Disabled because the second navigation | |
1032 // crashes the renderer under --site-per-process during blink::Frame::detach(). | |
1033 IN_PROC_BROWSER_TEST_P(TaskManagerOOPIFBrowserTest, | 1030 IN_PROC_BROWSER_TEST_P(TaskManagerOOPIFBrowserTest, |
1034 DISABLED_CrossSiteIframeBecomesSameSite) { | 1031 CrossSiteIframeBecomesSameSite) { |
1035 ShowTaskManager(); | 1032 ShowTaskManager(); |
1036 | 1033 |
1037 host_resolver()->AddRule("*", "127.0.0.1"); | 1034 host_resolver()->AddRule("*", "127.0.0.1"); |
1038 ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady()); | 1035 ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady()); |
1039 content::SetupCrossSiteRedirector(embedded_test_server()); | 1036 content::SetupCrossSiteRedirector(embedded_test_server()); |
1040 | 1037 |
1041 // Navigate the tab to a page on a.com with cross-process subframes to | 1038 // Navigate the tab to a page on a.com with cross-process subframes to |
1042 // b.com and c.com. | 1039 // b.com and c.com. |
1043 GURL a_dotcom(embedded_test_server()->GetURL( | 1040 GURL a_dotcom(embedded_test_server()->GetURL( |
1044 "/cross-site/a.com/iframe_cross_site.html")); | 1041 "/cross-site/a.com/iframe_cross_site.html")); |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1087 } else { | 1084 } else { |
1088 ASSERT_NO_FATAL_FAILURE( | 1085 ASSERT_NO_FATAL_FAILURE( |
1089 WaitForTaskManagerRows(0, MatchSubframe("http://b.com/"))); | 1086 WaitForTaskManagerRows(0, MatchSubframe("http://b.com/"))); |
1090 ASSERT_NO_FATAL_FAILURE( | 1087 ASSERT_NO_FATAL_FAILURE( |
1091 WaitForTaskManagerRows(1, MatchSubframe("http://c.com/"))); | 1088 WaitForTaskManagerRows(1, MatchSubframe("http://c.com/"))); |
1092 ASSERT_NO_FATAL_FAILURE(WaitForTaskManagerRows(1, MatchAnySubframe())); | 1089 ASSERT_NO_FATAL_FAILURE(WaitForTaskManagerRows(1, MatchAnySubframe())); |
1093 } | 1090 } |
1094 ASSERT_NO_FATAL_FAILURE(WaitForTaskManagerRows(1, MatchTab("aac"))); | 1091 ASSERT_NO_FATAL_FAILURE(WaitForTaskManagerRows(1, MatchTab("aac"))); |
1095 ASSERT_NO_FATAL_FAILURE(WaitForTaskManagerRows(1, MatchAnyTab())); | 1092 ASSERT_NO_FATAL_FAILURE(WaitForTaskManagerRows(1, MatchAnyTab())); |
1096 } | 1093 } |
OLD | NEW |