diff options
author | yurys@chromium.org <yurys@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-01-22 11:52:50 +0000 |
---|---|---|
committer | yurys@chromium.org <yurys@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-01-22 11:52:50 +0000 |
commit | 290da7ba0368e3cf1dbbe214a5be9f89666954d0 (patch) | |
tree | 29f2583ba318eadb697f20025022165d41a80f4c /webkit/glue | |
parent | 840d6dcf80e8d9ee33ca942871d28002692a40c0 (diff) | |
download | chromium_src-290da7ba0368e3cf1dbbe214a5be9f89666954d0.zip chromium_src-290da7ba0368e3cf1dbbe214a5be9f89666954d0.tar.gz chromium_src-290da7ba0368e3cf1dbbe214a5be9f89666954d0.tar.bz2 |
DevTools: prepare for 'pause on caught exceptions' functionality in WebKit. This patch makes Chromium tests pass when https://bugs.webkit.org/show_bug.cgi?id=28622 is landed. Full support for pause on caught exceptions is to be implemented in Chromium.
BUG=32877
Review URL: http://codereview.chromium.org/551115
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@36862 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue')
-rw-r--r-- | webkit/glue/devtools/js/inspector_controller_impl.js | 18 | ||||
-rw-r--r-- | webkit/glue/devtools/js/tests.js | 15 |
2 files changed, 30 insertions, 3 deletions
diff --git a/webkit/glue/devtools/js/inspector_controller_impl.js b/webkit/glue/devtools/js/inspector_controller_impl.js index 2e41017..9e0e539 100644 --- a/webkit/glue/devtools/js/inspector_controller_impl.js +++ b/webkit/glue/devtools/js/inspector_controller_impl.js @@ -116,6 +116,24 @@ devtools.InspectorBackendImpl.prototype.stepOverStatementInDebugger = devtools.tools.getDebuggerAgent().stepOverStatement(); }; +/** + * @override + */ +devtools.InspectorBackendImpl.prototype.setPauseOnExceptionsState = function(state) { + this._setPauseOnExceptionsState = state; + // TODO(yurys): support all three states. See http://crbug.com/32877 + var enabled = (state != + WebInspector.ScriptsPanel.PauseOnExceptionsState.DontPauseOnExceptions); + return devtools.tools.getDebuggerAgent().setPauseOnExceptions(enabled); +}; + +/** + * @override + */ +devtools.InspectorBackendImpl.prototype.pauseOnExceptionsState = function() { + return (this._setPauseOnExceptionsState || + WebInspector.ScriptsPanel.PauseOnExceptionsState.DontPauseOnExceptions); +}; /** * @override diff --git a/webkit/glue/devtools/js/tests.js b/webkit/glue/devtools/js/tests.js index f3b5caf..b1ac60e 100644 --- a/webkit/glue/devtools/js/tests.js +++ b/webkit/glue/devtools/js/tests.js @@ -639,9 +639,18 @@ TestSuite.prototype.testPauseOnException = function() { this.showPanel('scripts'); var test = this; - // Make sure pause on exceptions is on. - if (!WebInspector.currentPanel.pauseOnExceptionButton.toggled) { - WebInspector.currentPanel.pauseOnExceptionButton.element.click(); + // TODO(yurys): remove else branch once the states are supported. + if (WebInspector.ScriptsPanel.PauseOnExceptionsState) { + while (WebInspector.currentPanel.pauseOnExceptionButton.state != + WebInspector.ScriptsPanel.PauseOnExceptionsState. + PauseOnUncaughtExceptions) { + WebInspector.currentPanel.pauseOnExceptionButton.element.click(); + } + } else { + // Make sure pause on exceptions is on. + if (!WebInspector.currentPanel.pauseOnExceptionButton.toggled) { + WebInspector.currentPanel.pauseOnExceptionButton.element.click(); + } } this._executeCodeWhenScriptsAreParsed( |