| Index: chrome/browser/debugger/devtools_sanity_unittest.cc
|
| diff --git a/chrome/browser/debugger/devtools_sanity_unittest.cc b/chrome/browser/debugger/devtools_sanity_unittest.cc
|
| index 467e735c280e1cb714bcd45b2bd4d89e505df0db..ec26ecf88220f05c0ebaaabe0eff9f7081d38451 100644
|
| --- a/chrome/browser/debugger/devtools_sanity_unittest.cc
|
| +++ b/chrome/browser/debugger/devtools_sanity_unittest.cc
|
| @@ -5,6 +5,7 @@
|
| #include "base/bind.h"
|
| #include "base/cancelable_callback.h"
|
| #include "base/command_line.h"
|
| +#include "base/compiler_specific.h"
|
| #include "base/memory/ref_counted.h"
|
| #include "base/path_service.h"
|
| #include "base/stringprintf.h"
|
| @@ -19,6 +20,7 @@
|
| #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h"
|
| #include "chrome/common/chrome_notification_types.h"
|
| #include "chrome/common/chrome_paths.h"
|
| +#include "chrome/common/chrome_switches.h"
|
| #include "chrome/test/base/in_process_browser_test.h"
|
| #include "chrome/test/base/ui_test_utils.h"
|
| #include "content/browser/renderer_host/render_view_host.h"
|
| @@ -82,7 +84,7 @@ const char kSharedWorkerTestPage[] =
|
| const char kReloadSharedWorkerTestPage[] =
|
| "files/workers/debug_shared_worker_initialization.html";
|
|
|
| -void RunTestFuntion(DevToolsWindow* window, const char* test_name) {
|
| +void RunTestFunction(DevToolsWindow* window, const char* test_name) {
|
| std::string result;
|
|
|
| // At first check that JavaScript part of the front-end is loaded by
|
| @@ -122,7 +124,7 @@ class DevToolsSanityTest : public InProcessBrowserTest {
|
| protected:
|
| void RunTest(const std::string& test_name, const std::string& test_page) {
|
| OpenDevToolsWindow(test_page);
|
| - RunTestFuntion(window_, test_name.c_str());
|
| + RunTestFunction(window_, test_name.c_str());
|
| CloseDevToolsWindow();
|
| }
|
|
|
| @@ -252,6 +254,11 @@ class DevToolsExtensionDebugTest : public DevToolsSanityTest,
|
| FilePath test_extensions_dir_;
|
| };
|
|
|
| +class DevToolsExtensionAPITest : public DevToolsExtensionDebugTest {
|
| + virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE {
|
| + command_line->AppendSwitch(switches::kEnableExperimentalExtensionApis);
|
| + }
|
| +};
|
|
|
| class WorkerDevToolsSanityTest : public InProcessBrowserTest {
|
| public:
|
| @@ -330,7 +337,7 @@ class WorkerDevToolsSanityTest : public InProcessBrowserTest {
|
|
|
| scoped_refptr<WorkerData> worker_data = WaitForFirstSharedWorker();
|
| OpenDevToolsWindowForSharedWorker(worker_data.get());
|
| - RunTestFuntion(window_, test_name);
|
| + RunTestFunction(window_, test_name);
|
| CloseDevToolsWindow();
|
| }
|
|
|
| @@ -437,7 +444,13 @@ IN_PROC_BROWSER_TEST_F(DevToolsSanityTest,
|
| }
|
|
|
| // Tests that a content script is in the scripts list.
|
| -// This test is disabled, see bug 28961.
|
| +IN_PROC_BROWSER_TEST_F(DevToolsExtensionAPITest,
|
| + TestDevToolsExtensionAPI) {
|
| + LoadExtension("devtools_extension");
|
| + RunTest("testWaitForResultsInConsole", kPageWithContentScript);
|
| +}
|
| +
|
| +// Tests that a content script is in the scripts list.
|
| IN_PROC_BROWSER_TEST_F(DevToolsExtensionDebugTest,
|
| TestContentScriptIsPresent) {
|
| LoadExtension("simple_content_script");
|
| @@ -506,7 +519,7 @@ IN_PROC_BROWSER_TEST_F(DevToolsSanityTest, TestReattachAfterCrash) {
|
| browser()->Reload(CURRENT_TAB);
|
| observer.Wait();
|
|
|
| - RunTestFuntion(window_, "testReattachAfterCrash");
|
| + RunTestFunction(window_, "testReattachAfterCrash");
|
| CloseDevToolsWindow();
|
| }
|
|
|
| @@ -562,7 +575,7 @@ IN_PROC_BROWSER_TEST_F(WorkerDevToolsSanityTest,
|
| ui_test_utils::NavigateToURL(browser(), url);
|
|
|
| // Wait until worker script is paused on the debugger statement.
|
| - RunTestFuntion(window_, "testPauseInSharedWorkerInitialization");
|
| + RunTestFunction(window_, "testPauseInSharedWorkerInitialization");
|
| CloseDevToolsWindow();
|
| }
|
|
|
|
|