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 26 matching lines...) Expand all Loading... |
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 const wchar_t kDebuggerTestPage[] = L"files/devtools/debugger_test_page.html"; |
| 47 const wchar_t kConsoleTestPage[] = L"files/devtools/console_test_page.html"; |
47 | 48 |
48 class DevToolsSanityTest : public InProcessBrowserTest { | 49 class DevToolsSanityTest : public InProcessBrowserTest { |
49 public: | 50 public: |
50 DevToolsSanityTest() { | 51 DevToolsSanityTest() { |
51 set_show_window(true); | 52 set_show_window(true); |
52 EnableDOMAutomation(); | 53 EnableDOMAutomation(); |
53 } | 54 } |
54 | 55 |
55 protected: | 56 protected: |
56 void RunTest(const std::string& test_name, const std::wstring& test_page) { | 57 void RunTest(const std::string& test_name, const std::wstring& test_page) { |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
137 // Tests profiler panel. | 138 // Tests profiler panel. |
138 IN_PROC_BROWSER_TEST_F(DevToolsSanityTest, TestProfilerTab) { | 139 IN_PROC_BROWSER_TEST_F(DevToolsSanityTest, TestProfilerTab) { |
139 RunTest("testProfilerTab", kJsPage); | 140 RunTest("testProfilerTab", kJsPage); |
140 } | 141 } |
141 | 142 |
142 // Tests scripts panel showing. | 143 // Tests scripts panel showing. |
143 IN_PROC_BROWSER_TEST_F(DevToolsSanityTest, TestShowScriptsTab) { | 144 IN_PROC_BROWSER_TEST_F(DevToolsSanityTest, TestShowScriptsTab) { |
144 RunTest("testShowScriptsTab", kDebuggerTestPage); | 145 RunTest("testShowScriptsTab", kDebuggerTestPage); |
145 } | 146 } |
146 | 147 |
| 148 // Tests console eval. |
| 149 IN_PROC_BROWSER_TEST_F(DevToolsSanityTest, TestConsoleEval) { |
| 150 RunTest("testConsoleEval", kConsoleTestPage); |
| 151 } |
| 152 |
| 153 // Tests console log. |
| 154 IN_PROC_BROWSER_TEST_F(DevToolsSanityTest, TestConsoleLog) { |
| 155 RunTest("testConsoleLog", kConsoleTestPage); |
| 156 } |
| 157 |
147 } // namespace | 158 } // namespace |
OLD | NEW |