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 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
94 | 94 |
95 int FindResourceIndex(const base::string16& title) { | 95 int FindResourceIndex(const base::string16& title) { |
96 for (int i = 0; i < model()->ResourceCount(); ++i) { | 96 for (int i = 0; i < model()->ResourceCount(); ++i) { |
97 if (title == model()->GetResourceTitle(i)) | 97 if (title == model()->GetResourceTitle(i)) |
98 return i; | 98 return i; |
99 } | 99 } |
100 return -1; | 100 return -1; |
101 } | 101 } |
102 | 102 |
103 protected: | 103 protected: |
104 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE { | 104 virtual void SetUpCommandLine(CommandLine* command_line) override { |
105 ExtensionBrowserTest::SetUpCommandLine(command_line); | 105 ExtensionBrowserTest::SetUpCommandLine(command_line); |
106 | 106 |
107 // Do not launch device discovery process. | 107 // Do not launch device discovery process. |
108 command_line->AppendSwitch(switches::kDisableDeviceDiscoveryNotifications); | 108 command_line->AppendSwitch(switches::kDisableDeviceDiscoveryNotifications); |
109 } | 109 } |
110 | 110 |
111 private: | 111 private: |
112 DISALLOW_COPY_AND_ASSIGN(TaskManagerBrowserTest); | 112 DISALLOW_COPY_AND_ASSIGN(TaskManagerBrowserTest); |
113 }; | 113 }; |
114 | 114 |
(...skipping 643 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 |