Asynchronously call onerror when a content blocker blocks ascript element's load
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 2 Dec 2015 23:55:50 +0000 (23:55 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 2 Dec 2015 23:55:50 +0000 (23:55 +0000)
commit9d28e5521e5c7d7e5ba47727dfc2c3918e358dc2
treea1ed408000afa58ecf3918be3e46c4500fa8d954
parentd2dc428e6fdc12f2abed7d0d5a7f3fa4d06784a1
Asynchronously call onerror when a content blocker blocks ascript element's load
https://bugs.webkit.org/show_bug.cgi?id=151649

Patch by Alex Christensen <achristensen@webkit.org> on 2015-12-02
Reviewed by Brady Eidson.

Source/WebCore:

Test: http/tests/contentextensions/script-onerror.html

* dom/ScriptElement.cpp:
(WebCore::ScriptElement::ScriptElement):
(WebCore::ScriptElement::requestScript):
* dom/ScriptElement.h:

LayoutTests:

* http/tests/contentextensions/script-onerror-expected.txt: Added.
* http/tests/contentextensions/script-onerror.html: Added.
* http/tests/contentextensions/script-onerror.html.json: Added.
* http/tests/misc/unloadable-script-expected.txt:
* http/tests/misc/unloadable-script.html:
* http/tests/security/local-JavaScript-from-remote-expected.txt:
* http/tests/security/local-JavaScript-from-remote.html:
Added testRunner.waitUntilDone and testRunner.notifyDone to reflect the fact that onerror is no longer called synchronously.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@192983 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/http/tests/contentextensions/script-onerror-expected.txt [new file with mode: 0644]
LayoutTests/http/tests/contentextensions/script-onerror.html [new file with mode: 0644]
LayoutTests/http/tests/contentextensions/script-onerror.html.json [new file with mode: 0644]
LayoutTests/http/tests/misc/unloadable-script-expected.txt
LayoutTests/http/tests/misc/unloadable-script.html
LayoutTests/http/tests/security/local-JavaScript-from-remote-expected.txt
LayoutTests/http/tests/security/local-JavaScript-from-remote.html
Source/WebCore/ChangeLog
Source/WebCore/dom/ScriptElement.cpp
Source/WebCore/dom/ScriptElement.h