OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/command_line.h" | 5 #include "base/command_line.h" |
6 #include "base/path_service.h" | 6 #include "base/path_service.h" |
7 #include "base/string_util.h" | 7 #include "base/string_util.h" |
8 #include "base/utf_string_conversions.h" | 8 #include "base/utf_string_conversions.h" |
9 #include "chrome/browser/debugger/devtools_client_host.h" | 9 #include "chrome/browser/debugger/devtools_client_host.h" |
10 #include "chrome/browser/debugger/devtools_manager.h" | 10 #include "chrome/browser/debugger/devtools_manager.h" |
11 #include "chrome/browser/debugger/devtools_window.h" | 11 #include "chrome/browser/debugger/devtools_window.h" |
12 #include "chrome/browser/extensions/extension_host.h" | 12 #include "chrome/browser/extensions/extension_host.h" |
13 #include "chrome/browser/extensions/extensions_service.h" | 13 #include "chrome/browser/extensions/extension_service.h" |
14 #include "chrome/browser/profiles/profile.h" | 14 #include "chrome/browser/profiles/profile.h" |
15 #include "chrome/browser/renderer_host/render_view_host.h" | 15 #include "chrome/browser/renderer_host/render_view_host.h" |
16 #include "chrome/browser/tab_contents/tab_contents.h" | 16 #include "chrome/browser/tab_contents/tab_contents.h" |
17 #include "chrome/browser/ui/browser.h" | 17 #include "chrome/browser/ui/browser.h" |
18 #include "chrome/common/chrome_paths.h" | 18 #include "chrome/common/chrome_paths.h" |
19 #include "chrome/common/chrome_switches.h" | 19 #include "chrome/common/chrome_switches.h" |
20 #include "chrome/common/notification_registrar.h" | 20 #include "chrome/common/notification_registrar.h" |
21 #include "chrome/common/notification_service.h" | 21 #include "chrome/common/notification_service.h" |
22 #include "chrome/test/in_process_browser_test.h" | 22 #include "chrome/test/in_process_browser_test.h" |
23 #include "chrome/test/ui_test_utils.h" | 23 #include "chrome/test/ui_test_utils.h" |
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
182 | 182 |
183 protected: | 183 protected: |
184 // Load an extention from test\data\devtools\extensions\<extension_name> | 184 // Load an extention from test\data\devtools\extensions\<extension_name> |
185 void LoadExtension(const char* extension_name) { | 185 void LoadExtension(const char* extension_name) { |
186 FilePath path = test_extensions_dir_.AppendASCII(extension_name); | 186 FilePath path = test_extensions_dir_.AppendASCII(extension_name); |
187 ASSERT_TRUE(LoadExtensionFromPath(path)) << "Failed to load extension."; | 187 ASSERT_TRUE(LoadExtensionFromPath(path)) << "Failed to load extension."; |
188 } | 188 } |
189 | 189 |
190 private: | 190 private: |
191 bool LoadExtensionFromPath(const FilePath& path) { | 191 bool LoadExtensionFromPath(const FilePath& path) { |
192 ExtensionsService* service = browser()->profile()->GetExtensionsService(); | 192 ExtensionService* service = browser()->profile()->GetExtensionService(); |
193 size_t num_before = service->extensions()->size(); | 193 size_t num_before = service->extensions()->size(); |
194 { | 194 { |
195 NotificationRegistrar registrar; | 195 NotificationRegistrar registrar; |
196 registrar.Add(this, NotificationType::EXTENSION_LOADED, | 196 registrar.Add(this, NotificationType::EXTENSION_LOADED, |
197 NotificationService::AllSources()); | 197 NotificationService::AllSources()); |
198 CancelableQuitTask* delayed_quit = | 198 CancelableQuitTask* delayed_quit = |
199 new CancelableQuitTask("Extension load timed out."); | 199 new CancelableQuitTask("Extension load timed out."); |
200 MessageLoop::current()->PostDelayedTask(FROM_HERE, delayed_quit, | 200 MessageLoop::current()->PostDelayedTask(FROM_HERE, delayed_quit, |
201 4*1000); | 201 4*1000); |
202 service->LoadExtension(path); | 202 service->LoadExtension(path); |
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
335 IN_PROC_BROWSER_TEST_F(DevToolsSanityTest, MAYBE_TestCompletionOnPause) { | 335 IN_PROC_BROWSER_TEST_F(DevToolsSanityTest, MAYBE_TestCompletionOnPause) { |
336 RunTest("testCompletionOnPause", kCompletionOnPause); | 336 RunTest("testCompletionOnPause", kCompletionOnPause); |
337 } | 337 } |
338 | 338 |
339 // Tests that 'Pause' button works for eval. | 339 // Tests that 'Pause' button works for eval. |
340 IN_PROC_BROWSER_TEST_F(DevToolsSanityTest, DISABLED_TestPauseInEval) { | 340 IN_PROC_BROWSER_TEST_F(DevToolsSanityTest, DISABLED_TestPauseInEval) { |
341 RunTest("testPauseInEval", kDebuggerTestPage); | 341 RunTest("testPauseInEval", kDebuggerTestPage); |
342 } | 342 } |
343 | 343 |
344 } // namespace | 344 } // namespace |
OLD | NEW |