| 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 "base/bind.h" | 5 #include "base/bind.h" |
| 6 #include "base/cancelable_callback.h" | 6 #include "base/cancelable_callback.h" |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
| 9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
| 10 #include "base/path_service.h" | 10 #include "base/path_service.h" |
| (...skipping 423 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 434 ClearPref(prefs::kWebKitInspectorSettings); | 434 ClearPref(prefs::kWebKitInspectorSettings); |
| 435 | 435 |
| 436 RunTest("testScriptsTabIsPopulatedOnInspectedPageRefresh", | 436 RunTest("testScriptsTabIsPopulatedOnInspectedPageRefresh", |
| 437 kDebuggerTestPage); | 437 kDebuggerTestPage); |
| 438 } | 438 } |
| 439 | 439 |
| 440 // Tests that chrome.devtools extension is correctly exposed. | 440 // Tests that chrome.devtools extension is correctly exposed. |
| 441 IN_PROC_BROWSER_TEST_F(DevToolsExtensionTest, | 441 IN_PROC_BROWSER_TEST_F(DevToolsExtensionTest, |
| 442 TestDevToolsExtensionAPI) { | 442 TestDevToolsExtensionAPI) { |
| 443 LoadExtension("devtools_extension"); | 443 LoadExtension("devtools_extension"); |
| 444 RunTest("waitForTestResultsInConsole", ""); | 444 RunTest("waitForTestResultsInConsole", std::string()); |
| 445 } | 445 } |
| 446 | 446 |
| 447 // Tests that chrome.devtools extension can communicate with background page | 447 // Tests that chrome.devtools extension can communicate with background page |
| 448 // using extension messaging. | 448 // using extension messaging. |
| 449 IN_PROC_BROWSER_TEST_F(DevToolsExtensionTest, | 449 IN_PROC_BROWSER_TEST_F(DevToolsExtensionTest, |
| 450 TestDevToolsExtensionMessaging) { | 450 TestDevToolsExtensionMessaging) { |
| 451 LoadExtension("devtools_messaging"); | 451 LoadExtension("devtools_messaging"); |
| 452 RunTest("waitForTestResultsInConsole", ""); | 452 RunTest("waitForTestResultsInConsole", std::string()); |
| 453 } | 453 } |
| 454 | 454 |
| 455 // Tests that chrome.experimental.devtools extension is correctly exposed | 455 // Tests that chrome.experimental.devtools extension is correctly exposed |
| 456 // when the extension has experimental permission. | 456 // when the extension has experimental permission. |
| 457 IN_PROC_BROWSER_TEST_F(DevToolsExperimentalExtensionTest, | 457 IN_PROC_BROWSER_TEST_F(DevToolsExperimentalExtensionTest, |
| 458 TestDevToolsExperimentalExtensionAPI) { | 458 TestDevToolsExperimentalExtensionAPI) { |
| 459 LoadExtension("devtools_experimental"); | 459 LoadExtension("devtools_experimental"); |
| 460 RunTest("waitForTestResultsInConsole", ""); | 460 RunTest("waitForTestResultsInConsole", std::string()); |
| 461 } | 461 } |
| 462 | 462 |
| 463 // Tests that a content script is in the scripts list. | 463 // Tests that a content script is in the scripts list. |
| 464 // http://crbug.com/114104 | 464 // http://crbug.com/114104 |
| 465 IN_PROC_BROWSER_TEST_F(DevToolsExtensionTest, | 465 IN_PROC_BROWSER_TEST_F(DevToolsExtensionTest, |
| 466 TestContentScriptIsPresent) { | 466 TestContentScriptIsPresent) { |
| 467 LoadExtension("simple_content_script"); | 467 LoadExtension("simple_content_script"); |
| 468 RunTest("testContentScriptIsPresent", kPageWithContentScript); | 468 RunTest("testContentScriptIsPresent", kPageWithContentScript); |
| 469 } | 469 } |
| 470 | 470 |
| 471 // Tests that renderer process native memory is feasible. | 471 // Tests that renderer process native memory is feasible. |
| 472 #if defined(OS_WIN) | 472 #if defined(OS_WIN) |
| 473 // This test fails on Windows. http://crbug.com/215246 | 473 // This test fails on Windows. http://crbug.com/215246 |
| 474 #define MAYBE_TestRendererProcessNativeMemorySize DISABLED_TestRendererProcessNa
tiveMemorySize | 474 #define MAYBE_TestRendererProcessNativeMemorySize DISABLED_TestRendererProcessNa
tiveMemorySize |
| 475 #else | 475 #else |
| 476 #define MAYBE_TestRendererProcessNativeMemorySize TestRendererProcessNativeMemor
ySize | 476 #define MAYBE_TestRendererProcessNativeMemorySize TestRendererProcessNativeMemor
ySize |
| 477 #endif | 477 #endif |
| 478 | 478 |
| 479 IN_PROC_BROWSER_TEST_F(DevToolsSanityTest, | 479 IN_PROC_BROWSER_TEST_F(DevToolsSanityTest, |
| 480 MAYBE_TestRendererProcessNativeMemorySize) { | 480 MAYBE_TestRendererProcessNativeMemorySize) { |
| 481 RunTest("testRendererProcessNativeMemorySize", ""); | 481 RunTest("testRendererProcessNativeMemorySize", std::string()); |
| 482 } | 482 } |
| 483 | 483 |
| 484 // Tests that scripts are not duplicated after Scripts Panel switch. | 484 // Tests that scripts are not duplicated after Scripts Panel switch. |
| 485 IN_PROC_BROWSER_TEST_F(DevToolsSanityTest, | 485 IN_PROC_BROWSER_TEST_F(DevToolsSanityTest, |
| 486 TestNoScriptDuplicatesOnPanelSwitch) { | 486 TestNoScriptDuplicatesOnPanelSwitch) { |
| 487 RunTest("testNoScriptDuplicatesOnPanelSwitch", kDebuggerTestPage); | 487 RunTest("testNoScriptDuplicatesOnPanelSwitch", kDebuggerTestPage); |
| 488 } | 488 } |
| 489 | 489 |
| 490 // Tests that debugger works correctly if pause event occurs when DevTools | 490 // Tests that debugger works correctly if pause event occurs when DevTools |
| 491 // frontend is being loaded. | 491 // frontend is being loaded. |
| (...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 646 PathService::Get(chrome::DIR_TEST_DATA, &test_data_dir_); | 646 PathService::Get(chrome::DIR_TEST_DATA, &test_data_dir_); |
| 647 test_data_dir_ = test_data_dir_.AppendASCII("devtools"); | 647 test_data_dir_ = test_data_dir_.AppendASCII("devtools"); |
| 648 } | 648 } |
| 649 }; | 649 }; |
| 650 | 650 |
| 651 IN_PROC_BROWSER_TEST_F(RemoteDebuggingTest, RemoteDebugger) { | 651 IN_PROC_BROWSER_TEST_F(RemoteDebuggingTest, RemoteDebugger) { |
| 652 ASSERT_TRUE(RunExtensionTest("target_list")) << message_; | 652 ASSERT_TRUE(RunExtensionTest("target_list")) << message_; |
| 653 } | 653 } |
| 654 | 654 |
| 655 } // namespace | 655 } // namespace |
| OLD | NEW |