| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "base/macros.h" | 5 #include "base/macros.h" |
| 6 #include "base/strings/utf_string_conversions.h" | 6 #include "base/strings/utf_string_conversions.h" |
| 7 #include "chrome/browser/task_management/task_management_browsertest_util.h" | 7 #include "chrome/browser/task_management/task_management_browsertest_util.h" |
| 8 #include "chrome/grit/generated_resources.h" | 8 #include "chrome/grit/generated_resources.h" |
| 9 #include "chrome/test/base/in_process_browser_test.h" | 9 #include "chrome/test/base/in_process_browser_test.h" |
| 10 #include "chrome/test/base/ui_test_utils.h" | 10 #include "chrome/test/base/ui_test_utils.h" |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 110 base::CompareCase::INSENSITIVE_ASCII)); | 110 base::CompareCase::INSENSITIVE_ASCII)); |
| 111 | 111 |
| 112 // All tasks must be running on different processes. | 112 // All tasks must be running on different processes. |
| 113 EXPECT_NE(subframe_task_1->process_id(), subframe_task_2->process_id()); | 113 EXPECT_NE(subframe_task_1->process_id(), subframe_task_2->process_id()); |
| 114 EXPECT_NE(subframe_task_1->process_id(), cross_site_task->process_id()); | 114 EXPECT_NE(subframe_task_1->process_id(), cross_site_task->process_id()); |
| 115 EXPECT_NE(subframe_task_2->process_id(), cross_site_task->process_id()); | 115 EXPECT_NE(subframe_task_2->process_id(), cross_site_task->process_id()); |
| 116 } | 116 } |
| 117 | 117 |
| 118 // If we navigate to the simple page on a.com which doesn't have cross-site | 118 // If we navigate to the simple page on a.com which doesn't have cross-site |
| 119 // iframes, we expect not to have any SubframeTasks. | 119 // iframes, we expect not to have any SubframeTasks. |
| 120 NavigateTo(kSimplePageUrl); | 120 ui_test_utils::NavigateToURLBlockUntilNavigationsComplete( |
| 121 browser(), embedded_test_server()->GetURL(kSimplePageUrl), 2); |
| 121 | 122 |
| 122 ASSERT_EQ(1U, task_manager.tasks().size()); | 123 ASSERT_EQ(1U, task_manager.tasks().size()); |
| 123 const Task* simple_page_task = task_manager.tasks().front(); | 124 const Task* simple_page_task = task_manager.tasks().front(); |
| 124 EXPECT_EQ(Task::RENDERER, simple_page_task->GetType()); | 125 EXPECT_EQ(Task::RENDERER, simple_page_task->GetType()); |
| 125 EXPECT_EQ(PrefixExpectedTabTitle("Title Of Awesomeness"), | 126 EXPECT_EQ(PrefixExpectedTabTitle("Title Of Awesomeness"), |
| 126 simple_page_task->title()); | 127 simple_page_task->title()); |
| 127 } | 128 } |
| 128 | 129 |
| 129 } // namespace task_management | 130 } // namespace task_management |
| OLD | NEW |