Web Inspector: CRASH Attempting to pause on CSP violation not inside of script
authorjoepeck@webkit.org <joepeck@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 7 Jan 2016 19:06:32 +0000 (19:06 +0000)
committerjoepeck@webkit.org <joepeck@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 7 Jan 2016 19:06:32 +0000 (19:06 +0000)
commit71f47d8c3d5408fd5fbe492d48aadf3e5999278a
tree9d13e6d0b89626f602bc9191f4bf770dd6ce0d2b
parent3cc3ab58dd80577f51f57b7f13cd620fa0f0c1f0
Web Inspector: CRASH Attempting to pause on CSP violation not inside of script
https://bugs.webkit.org/show_bug.cgi?id=152825
<rdar://problem/24021276>

Reviewed by Timothy Hatcher.

Source/JavaScriptCore:

* debugger/Debugger.cpp:
(JSC::Debugger::breakProgram):
We cannot pause if we are not evaluating JavaScript, so bail.

Source/WebInspectorUI:

* UserInterface/Test/TestHarness.js:
(TestHarness.prototype.expectThat):
(TestHarness.prototype.pass):
(TestHarness.prototype.fail):
Add a simple way to output a standard pass/fail message. These are
often nicer than expectThat(true, ...) or assert(false, ...).

LayoutTests:

* http/tests/inspector/resources/inspector-test.js:
(TestPage.reportUncaughtException):
Allow a test to continue after uncaught exceptions.

* inspector/debugger/csp-exceptions-expected.txt: Added.
* inspector/debugger/csp-exceptions.html: Added.
* inspector/debugger/resources/csp-exception-iframe.html: Added.
Test a CSP exception that causes a pause and one outside of
script that does not pause (and does not crash).

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@194704 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/http/tests/inspector/resources/inspector-test.js
LayoutTests/inspector/debugger/csp-exceptions-expected.txt [new file with mode: 0644]
LayoutTests/inspector/debugger/csp-exceptions.html [new file with mode: 0644]
LayoutTests/inspector/debugger/resources/csp-exception-iframe.html [new file with mode: 0644]
LayoutTests/inspector/network/client-blocked-load.html
LayoutTests/inspector/protocol/inspector-backend-invocation-return-value.html
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/debugger/Debugger.cpp
Source/WebInspectorUI/ChangeLog
Source/WebInspectorUI/UserInterface/Test/TestHarness.js