| 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/renderer_host/render_view_host.h" | 10 #include "chrome/browser/renderer_host/render_view_host.h" |
| (...skipping 25 matching lines...) Expand all Loading... |
| 36 NotificationRegistrar registrar_; | 36 NotificationRegistrar registrar_; |
| 37 DISALLOW_COPY_AND_ASSIGN(BrowserClosedObserver); | 37 DISALLOW_COPY_AND_ASSIGN(BrowserClosedObserver); |
| 38 }; | 38 }; |
| 39 | 39 |
| 40 // The delay waited in some cases where we don't have a notifications for an | 40 // The delay waited in some cases where we don't have a notifications for an |
| 41 // action we take. | 41 // action we take. |
| 42 const int kActionDelayMs = 500; | 42 const int kActionDelayMs = 500; |
| 43 | 43 |
| 44 const wchar_t kSimplePage[] = L"files/devtools/simple_page.html"; | 44 const wchar_t kSimplePage[] = L"files/devtools/simple_page.html"; |
| 45 const wchar_t kJsPage[] = L"files/devtools/js_page.html"; | 45 const wchar_t kJsPage[] = L"files/devtools/js_page.html"; |
| 46 const wchar_t kDebuggerTestPage[] = L"files/devtools/debugger_test_page.html"; |
| 46 | 47 |
| 47 class DevToolsSanityTest : public InProcessBrowserTest { | 48 class DevToolsSanityTest : public InProcessBrowserTest { |
| 48 public: | 49 public: |
| 49 DevToolsSanityTest() { | 50 DevToolsSanityTest() { |
| 50 set_show_window(true); | 51 set_show_window(true); |
| 51 EnableDOMAutomation(); | 52 EnableDOMAutomation(); |
| 52 } | 53 } |
| 53 | 54 |
| 54 protected: | 55 protected: |
| 55 void RunTest(const std::string& test_name, const std::wstring& test_page) { | 56 void RunTest(const std::string& test_name, const std::wstring& test_page) { |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 112 // Tests resources panel enabling. | 113 // Tests resources panel enabling. |
| 113 IN_PROC_BROWSER_TEST_F(DevToolsSanityTest, TestEnableResourcesTab) { | 114 IN_PROC_BROWSER_TEST_F(DevToolsSanityTest, TestEnableResourcesTab) { |
| 114 RunTest("testEnableResourcesTab", kSimplePage); | 115 RunTest("testEnableResourcesTab", kSimplePage); |
| 115 } | 116 } |
| 116 | 117 |
| 117 // Tests profiler panel. | 118 // Tests profiler panel. |
| 118 IN_PROC_BROWSER_TEST_F(DevToolsSanityTest, TestProfilerTab) { | 119 IN_PROC_BROWSER_TEST_F(DevToolsSanityTest, TestProfilerTab) { |
| 119 RunTest("testProfilerTab", kJsPage); | 120 RunTest("testProfilerTab", kJsPage); |
| 120 } | 121 } |
| 121 | 122 |
| 123 // Tests scripta panel enabling. |
| 124 IN_PROC_BROWSER_TEST_F(DevToolsSanityTest, TestEnableScriptsTab) { |
| 125 RunTest("testEnableScriptsTab", kDebuggerTestPage); |
| 126 } |
| 127 |
| 122 } // namespace | 128 } // namespace |
| OLD | NEW |