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 "chrome/browser/browser_process.h" | 9 #include "chrome/browser/browser_process.h" |
10 #include "chrome/browser/chrome_notification_types.h" | 10 #include "chrome/browser/chrome_notification_types.h" |
(...skipping 845 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
856 WaitForTaskManagerRows(1, MatchSubframe("http://c.com/"))); | 856 WaitForTaskManagerRows(1, MatchSubframe("http://c.com/"))); |
857 ASSERT_NO_FATAL_FAILURE(WaitForTaskManagerRows(1, MatchAnySubframe())); | 857 ASSERT_NO_FATAL_FAILURE(WaitForTaskManagerRows(1, MatchAnySubframe())); |
858 ASSERT_NO_FATAL_FAILURE( | 858 ASSERT_NO_FATAL_FAILURE( |
859 WaitForTaskManagerRows(1, MatchTab("cross-site iframe test"))); | 859 WaitForTaskManagerRows(1, MatchTab("cross-site iframe test"))); |
860 } | 860 } |
861 } | 861 } |
862 | 862 |
863 // Tests what happens when a tab navigates to a site (a.com) that it previously | 863 // Tests what happens when a tab navigates to a site (a.com) that it previously |
864 // has a cross-process subframe into (b.com). | 864 // has a cross-process subframe into (b.com). |
865 // | 865 // |
866 // TODO(nick): Disabled because the second navigation hits an ASSERT(frame()) in | 866 // TODO(nick): http://crbug.com/442532. Disabled because the second navigation |
867 // WebLocalFrameImpl::loadRequest under --site-per-process. | 867 // hits an ASSERT(frame()) in WebLocalFrameImpl::loadRequest under --site-per- |
| 868 // process. |
868 IN_PROC_BROWSER_TEST_P(TaskManagerOOPIFBrowserTest, | 869 IN_PROC_BROWSER_TEST_P(TaskManagerOOPIFBrowserTest, |
869 DISABLED_NavigateToSubframeProcess) { | 870 DISABLED_NavigateToSubframeProcess) { |
870 ShowTaskManager(); | 871 ShowTaskManager(); |
871 | 872 |
872 host_resolver()->AddRule("*", "127.0.0.1"); | 873 host_resolver()->AddRule("*", "127.0.0.1"); |
873 ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady()); | 874 ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady()); |
874 content::SetupCrossSiteRedirector(embedded_test_server()); | 875 content::SetupCrossSiteRedirector(embedded_test_server()); |
875 | 876 |
876 // Navigate the tab to a page on a.com with cross-process subframes to | 877 // Navigate the tab to a page on a.com with cross-process subframes to |
877 // b.com and c.com. | 878 // b.com and c.com. |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
969 WaitForTaskManagerRows(1, MatchSubframe("http://b.com/"))); | 970 WaitForTaskManagerRows(1, MatchSubframe("http://b.com/"))); |
970 ASSERT_NO_FATAL_FAILURE( | 971 ASSERT_NO_FATAL_FAILURE( |
971 WaitForTaskManagerRows(1, MatchSubframe("http://c.com/"))); | 972 WaitForTaskManagerRows(1, MatchSubframe("http://c.com/"))); |
972 ASSERT_NO_FATAL_FAILURE(WaitForTaskManagerRows(2, MatchAnySubframe())); | 973 ASSERT_NO_FATAL_FAILURE(WaitForTaskManagerRows(2, MatchAnySubframe())); |
973 } | 974 } |
974 } | 975 } |
975 | 976 |
976 // Tests what happens when a tab navigates a cross-frame iframe (to b.com) | 977 // Tests what happens when a tab navigates a cross-frame iframe (to b.com) |
977 // back to the site of the parent document (a.com). | 978 // back to the site of the parent document (a.com). |
978 // | 979 // |
979 // TODO(nick): Disabled because the second navigation crashes the renderer | 980 // TODO(nick): http://crbug.com/433012. Disabled because the second navigation |
980 // under --site-per-process during blink::Frame::detach(). | 981 // crashes the renderer under --site-per-process during blink::Frame::detach(). |
981 IN_PROC_BROWSER_TEST_P(TaskManagerOOPIFBrowserTest, | 982 IN_PROC_BROWSER_TEST_P(TaskManagerOOPIFBrowserTest, |
982 DISABLED_CrossSiteIframeBecomesSameSite) { | 983 DISABLED_CrossSiteIframeBecomesSameSite) { |
983 ShowTaskManager(); | 984 ShowTaskManager(); |
984 | 985 |
985 host_resolver()->AddRule("*", "127.0.0.1"); | 986 host_resolver()->AddRule("*", "127.0.0.1"); |
986 ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady()); | 987 ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady()); |
987 content::SetupCrossSiteRedirector(embedded_test_server()); | 988 content::SetupCrossSiteRedirector(embedded_test_server()); |
988 | 989 |
989 // Navigate the tab to a page on a.com with cross-process subframes to | 990 // Navigate the tab to a page on a.com with cross-process subframes to |
990 // b.com and c.com. | 991 // b.com and c.com. |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1035 } else { | 1036 } else { |
1036 ASSERT_NO_FATAL_FAILURE( | 1037 ASSERT_NO_FATAL_FAILURE( |
1037 WaitForTaskManagerRows(0, MatchSubframe("http://b.com/"))); | 1038 WaitForTaskManagerRows(0, MatchSubframe("http://b.com/"))); |
1038 ASSERT_NO_FATAL_FAILURE( | 1039 ASSERT_NO_FATAL_FAILURE( |
1039 WaitForTaskManagerRows(1, MatchSubframe("http://c.com/"))); | 1040 WaitForTaskManagerRows(1, MatchSubframe("http://c.com/"))); |
1040 ASSERT_NO_FATAL_FAILURE(WaitForTaskManagerRows(1, MatchAnySubframe())); | 1041 ASSERT_NO_FATAL_FAILURE(WaitForTaskManagerRows(1, MatchAnySubframe())); |
1041 } | 1042 } |
1042 ASSERT_NO_FATAL_FAILURE(WaitForTaskManagerRows(1, MatchTab("aac"))); | 1043 ASSERT_NO_FATAL_FAILURE(WaitForTaskManagerRows(1, MatchTab("aac"))); |
1043 ASSERT_NO_FATAL_FAILURE(WaitForTaskManagerRows(1, MatchAnyTab())); | 1044 ASSERT_NO_FATAL_FAILURE(WaitForTaskManagerRows(1, MatchAnyTab())); |
1044 } | 1045 } |
OLD | NEW |