Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(75)

Side by Side Diff: chrome/browser/debugger/devtools_sanity_unittest.cc

Issue 218026: DevTools: autoresume execution on parse errors. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 30 matching lines...) Expand all
41 // The delay waited in some cases where we don't have a notifications for an 41 // The delay waited in some cases where we don't have a notifications for an
42 // action we take. 42 // action we take.
43 const int kActionDelayMs = 500; 43 const int kActionDelayMs = 500;
44 44
45 const wchar_t kConsoleTestPage[] = L"files/devtools/console_test_page.html"; 45 const wchar_t kConsoleTestPage[] = L"files/devtools/console_test_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 kEvalTestPage[] = L"files/devtools/eval_test_page.html"; 47 const wchar_t kEvalTestPage[] = L"files/devtools/eval_test_page.html";
48 const wchar_t kJsPage[] = L"files/devtools/js_page.html"; 48 const wchar_t kJsPage[] = L"files/devtools/js_page.html";
49 const wchar_t kResourceTestPage[] = L"files/devtools/resource_test_page.html"; 49 const wchar_t kResourceTestPage[] = L"files/devtools/resource_test_page.html";
50 const wchar_t kSimplePage[] = L"files/devtools/simple_page.html"; 50 const wchar_t kSimplePage[] = L"files/devtools/simple_page.html";
51 const wchar_t kSyntaxErrorTestPage[] =
52 L"files/devtools/script_syntax_error.html";
53
51 54
52 class DevToolsSanityTest : public InProcessBrowserTest { 55 class DevToolsSanityTest : public InProcessBrowserTest {
53 public: 56 public:
54 DevToolsSanityTest() { 57 DevToolsSanityTest() {
55 set_show_window(true); 58 set_show_window(true);
56 EnableDOMAutomation(); 59 EnableDOMAutomation();
57 } 60 }
58 61
59 protected: 62 protected:
60 void RunTest(const std::string& test_name, const std::wstring& test_page) { 63 void RunTest(const std::string& test_name, const std::wstring& test_page) {
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 // Tests set breakpoint. 166 // Tests set breakpoint.
164 IN_PROC_BROWSER_TEST_F(DevToolsSanityTest, TestSetBreakpoint) { 167 IN_PROC_BROWSER_TEST_F(DevToolsSanityTest, TestSetBreakpoint) {
165 RunTest("testSetBreakpoint", kDebuggerTestPage); 168 RunTest("testSetBreakpoint", kDebuggerTestPage);
166 } 169 }
167 170
168 // Tests eval on call frame. 171 // Tests eval on call frame.
169 IN_PROC_BROWSER_TEST_F(DevToolsSanityTest, TestEvalOnCallFrame) { 172 IN_PROC_BROWSER_TEST_F(DevToolsSanityTest, TestEvalOnCallFrame) {
170 RunTest("testEvalOnCallFrame", kDebuggerTestPage); 173 RunTest("testEvalOnCallFrame", kDebuggerTestPage);
171 } 174 }
172 175
176 // Tests that execution continues automatically when there is a syntax error in
177 // script and DevTools are open.
178 IN_PROC_BROWSER_TEST_F(DevToolsSanityTest, TestAutoContinueOnSyntaxError) {
179 RunTest("testAutoContinueOnSyntaxError", kSyntaxErrorTestPage);
180 }
181
173 // Tests that 'Pause' button works for eval. 182 // Tests that 'Pause' button works for eval.
174 IN_PROC_BROWSER_TEST_F(DevToolsSanityTest, DISABLED_TestPauseInEval) { 183 IN_PROC_BROWSER_TEST_F(DevToolsSanityTest, DISABLED_TestPauseInEval) {
175 RunTest("testPauseInEval", kDebuggerTestPage); 184 RunTest("testPauseInEval", kDebuggerTestPage);
176 } 185 }
177 186
178 // Tests console eval. 187 // Tests console eval.
179 IN_PROC_BROWSER_TEST_F(DevToolsSanityTest, TestConsoleEval) { 188 IN_PROC_BROWSER_TEST_F(DevToolsSanityTest, TestConsoleEval) {
180 RunTest("testConsoleEval", kConsoleTestPage); 189 RunTest("testConsoleEval", kConsoleTestPage);
181 } 190 }
182 191
183 // Tests console log. 192 // Tests console log.
184 IN_PROC_BROWSER_TEST_F(DevToolsSanityTest, TestConsoleLog) { 193 IN_PROC_BROWSER_TEST_F(DevToolsSanityTest, TestConsoleLog) {
185 RunTest("testConsoleLog", kConsoleTestPage); 194 RunTest("testConsoleLog", kConsoleTestPage);
186 } 195 }
187 196
188 // Tests eval global values. 197 // Tests eval global values.
189 IN_PROC_BROWSER_TEST_F(DevToolsSanityTest, TestEvalGlobal) { 198 IN_PROC_BROWSER_TEST_F(DevToolsSanityTest, TestEvalGlobal) {
190 RunTest("testEvalGlobal", kEvalTestPage); 199 RunTest("testEvalGlobal", kEvalTestPage);
191 } 200 }
192 201
193 } // namespace 202 } // namespace
OLDNEW
« no previous file with comments | « no previous file | chrome/test/data/devtools/script_syntax_error.html » ('j') | webkit/glue/devtools/js/debugger_agent.js » ('J')

Powered by Google App Engine
This is Rietveld 408576698