| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 "chrome/browser/browser.h" | 6 #include "chrome/browser/browser.h" |
| 7 #include "chrome/browser/debugger/devtools_client_host.h" | 7 #include "chrome/browser/debugger/devtools_client_host.h" |
| 8 #include "chrome/browser/debugger/devtools_manager.h" | 8 #include "chrome/browser/debugger/devtools_manager.h" |
| 9 #include "chrome/browser/debugger/devtools_window.h" | 9 #include "chrome/browser/debugger/devtools_window.h" |
| 10 #include "chrome/browser/extensions/extension_host.h" | 10 #include "chrome/browser/extensions/extension_host.h" |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 }; | 42 }; |
| 43 | 43 |
| 44 // The delay waited in some cases where we don't have a notifications for an | 44 // The delay waited in some cases where we don't have a notifications for an |
| 45 // action we take. | 45 // action we take. |
| 46 const int kActionDelayMs = 500; | 46 const int kActionDelayMs = 500; |
| 47 | 47 |
| 48 const char kConsoleTestPage[] = "files/devtools/console_test_page.html"; | 48 const char kConsoleTestPage[] = "files/devtools/console_test_page.html"; |
| 49 const char kDebuggerTestPage[] = "files/devtools/debugger_test_page.html"; | 49 const char kDebuggerTestPage[] = "files/devtools/debugger_test_page.html"; |
| 50 const char kEvalTestPage[] = "files/devtools/eval_test_page.html"; | 50 const char kEvalTestPage[] = "files/devtools/eval_test_page.html"; |
| 51 const char kJsPage[] = "files/devtools/js_page.html"; | 51 const char kJsPage[] = "files/devtools/js_page.html"; |
| 52 const char kHeapProfilerPage[] = "files/devtools/heap_profiler.html"; |
| 52 const char kPauseOnExceptionTestPage[] = | 53 const char kPauseOnExceptionTestPage[] = |
| 53 "files/devtools/pause_on_exception.html"; | 54 "files/devtools/pause_on_exception.html"; |
| 54 const char kPauseWhenLoadingDevTools[] = | 55 const char kPauseWhenLoadingDevTools[] = |
| 55 "files/devtools/pause_when_loading_devtools.html"; | 56 "files/devtools/pause_when_loading_devtools.html"; |
| 56 const char kPauseWhenScriptIsRunning[] = | 57 const char kPauseWhenScriptIsRunning[] = |
| 57 "files/devtools/pause_when_script_is_running.html"; | 58 "files/devtools/pause_when_script_is_running.html"; |
| 58 const char kResourceContentLengthTestPage[] = "files/devtools/image.html"; | 59 const char kResourceContentLengthTestPage[] = "files/devtools/image.html"; |
| 59 const char kResourceTestPage[] = "files/devtools/resource_test_page.html"; | 60 const char kResourceTestPage[] = "files/devtools/resource_test_page.html"; |
| 60 const char kSimplePage[] = "files/devtools/simple_page.html"; | 61 const char kSimplePage[] = "files/devtools/simple_page.html"; |
| 61 const char kSyntaxErrorTestPage[] = | 62 const char kSyntaxErrorTestPage[] = |
| (...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 301 // @see http://crbug.com/27364 | 302 // @see http://crbug.com/27364 |
| 302 IN_PROC_BROWSER_TEST_F(DevToolsSanityTest, TestCachedResourceMimeType) { | 303 IN_PROC_BROWSER_TEST_F(DevToolsSanityTest, TestCachedResourceMimeType) { |
| 303 RunTest("testCachedResourceMimeType", kResourceTestPage); | 304 RunTest("testCachedResourceMimeType", kResourceTestPage); |
| 304 } | 305 } |
| 305 | 306 |
| 306 // Tests profiler panel. | 307 // Tests profiler panel. |
| 307 IN_PROC_BROWSER_TEST_F(DevToolsSanityTest, TestProfilerTab) { | 308 IN_PROC_BROWSER_TEST_F(DevToolsSanityTest, TestProfilerTab) { |
| 308 RunTest("testProfilerTab", kJsPage); | 309 RunTest("testProfilerTab", kJsPage); |
| 309 } | 310 } |
| 310 | 311 |
| 312 // Tests heap profiler. |
| 313 IN_PROC_BROWSER_TEST_F(DevToolsSanityTest, TestHeapProfiler) { |
| 314 RunTest("testHeapProfiler", kHeapProfilerPage); |
| 315 } |
| 316 |
| 311 // Tests scripts panel showing. | 317 // Tests scripts panel showing. |
| 312 IN_PROC_BROWSER_TEST_F(DevToolsSanityTest, TestShowScriptsTab) { | 318 IN_PROC_BROWSER_TEST_F(DevToolsSanityTest, TestShowScriptsTab) { |
| 313 RunTest("testShowScriptsTab", kDebuggerTestPage); | 319 RunTest("testShowScriptsTab", kDebuggerTestPage); |
| 314 } | 320 } |
| 315 | 321 |
| 316 // Tests that scripts tab is populated with inspected scripts even if it | 322 // Tests that scripts tab is populated with inspected scripts even if it |
| 317 // hadn't been shown by the moment inspected paged refreshed. | 323 // hadn't been shown by the moment inspected paged refreshed. |
| 318 // @see http://crbug.com/26312 | 324 // @see http://crbug.com/26312 |
| 319 IN_PROC_BROWSER_TEST_F(DevToolsSanityTest, | 325 IN_PROC_BROWSER_TEST_F(DevToolsSanityTest, |
| 320 TestScriptsTabIsPopulatedOnInspectedPageRefresh) { | 326 TestScriptsTabIsPopulatedOnInspectedPageRefresh) { |
| (...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 457 RunTest("testEvalGlobal", kEvalTestPage); | 463 RunTest("testEvalGlobal", kEvalTestPage); |
| 458 } | 464 } |
| 459 | 465 |
| 460 // Test that Storage panel can be shown. | 466 // Test that Storage panel can be shown. |
| 461 IN_PROC_BROWSER_TEST_F(DevToolsSanityTest, TestShowStoragePanel) { | 467 IN_PROC_BROWSER_TEST_F(DevToolsSanityTest, TestShowStoragePanel) { |
| 462 RunTest("testShowStoragePanel", kDebuggerTestPage); | 468 RunTest("testShowStoragePanel", kDebuggerTestPage); |
| 463 } | 469 } |
| 464 | 470 |
| 465 | 471 |
| 466 } // namespace | 472 } // namespace |
| OLD | NEW |