| 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 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 | 57 |
| 58 namespace { | 58 namespace { |
| 59 | 59 |
| 60 const base::FilePath::CharType* kTitle1File = FILE_PATH_LITERAL("title1.html"); | 60 const base::FilePath::CharType* kTitle1File = FILE_PATH_LITERAL("title1.html"); |
| 61 | 61 |
| 62 } // namespace | 62 } // namespace |
| 63 | 63 |
| 64 class TaskManagerBrowserTest : public ExtensionBrowserTest { | 64 class TaskManagerBrowserTest : public ExtensionBrowserTest { |
| 65 public: | 65 public: |
| 66 TaskManagerBrowserTest() {} | 66 TaskManagerBrowserTest() {} |
| 67 virtual ~TaskManagerBrowserTest() {} | 67 ~TaskManagerBrowserTest() override {} |
| 68 | 68 |
| 69 TaskManagerModel* model() const { | 69 TaskManagerModel* model() const { |
| 70 return TaskManager::GetInstance()->model(); | 70 return TaskManager::GetInstance()->model(); |
| 71 } | 71 } |
| 72 | 72 |
| 73 void ShowTaskManager() { | 73 void ShowTaskManager() { |
| 74 EXPECT_EQ(0, model()->ResourceCount()); | 74 EXPECT_EQ(0, model()->ResourceCount()); |
| 75 | 75 |
| 76 // Show the task manager. This populates the model, and helps with debugging | 76 // Show the task manager. This populates the model, and helps with debugging |
| 77 // (you see the task manager). | 77 // (you see the task manager). |
| (...skipping 680 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 758 } | 758 } |
| 759 | 759 |
| 760 IN_PROC_BROWSER_TEST_F(TaskManagerBrowserTest, DevToolsOldUnockedWindow) { | 760 IN_PROC_BROWSER_TEST_F(TaskManagerBrowserTest, DevToolsOldUnockedWindow) { |
| 761 DevToolsWindow* devtools = | 761 DevToolsWindow* devtools = |
| 762 DevToolsWindowTesting::OpenDevToolsWindowSync(browser(), false); | 762 DevToolsWindowTesting::OpenDevToolsWindowSync(browser(), false); |
| 763 ShowTaskManager(); // Task manager shown AFTER dev tools window. | 763 ShowTaskManager(); // Task manager shown AFTER dev tools window. |
| 764 ASSERT_NO_FATAL_FAILURE(WaitForTaskManagerRows(3, MatchAnyTab())); | 764 ASSERT_NO_FATAL_FAILURE(WaitForTaskManagerRows(3, MatchAnyTab())); |
| 765 ASSERT_NO_FATAL_FAILURE(WaitForTaskManagerRows(3, MatchAnyTab())); | 765 ASSERT_NO_FATAL_FAILURE(WaitForTaskManagerRows(3, MatchAnyTab())); |
| 766 DevToolsWindowTesting::CloseDevToolsWindowSync(devtools); | 766 DevToolsWindowTesting::CloseDevToolsWindowSync(devtools); |
| 767 } | 767 } |
| OLD | NEW |