Changeset 192983 in webkit
- Timestamp:
- Dec 2, 2015 3:55:50 PM (8 years ago)
- Location:
- trunk
- Files:
-
- 3 added
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r192980 r192983 1 2015-12-02 Alex Christensen <achristensen@webkit.org> 2 3 Asynchronously call onerror when a content blocker blocks ascript element's load 4 https://bugs.webkit.org/show_bug.cgi?id=151649 5 6 Reviewed by Brady Eidson. 7 8 * http/tests/contentextensions/script-onerror-expected.txt: Added. 9 * http/tests/contentextensions/script-onerror.html: Added. 10 * http/tests/contentextensions/script-onerror.html.json: Added. 11 * http/tests/misc/unloadable-script-expected.txt: 12 * http/tests/misc/unloadable-script.html: 13 * http/tests/security/local-JavaScript-from-remote-expected.txt: 14 * http/tests/security/local-JavaScript-from-remote.html: 15 Added testRunner.waitUntilDone and testRunner.notifyDone to reflect the fact that onerror is no longer called synchronously. 16 1 17 2015-12-02 Eric Carlson <eric.carlson@apple.com> 2 18 -
trunk/LayoutTests/http/tests/misc/unloadable-script-expected.txt
r178527 r192983 1 CONSOLE MESSAGE: line 3 0: Not allowed to load local resource: foobar2 CONSOLE MESSAGE: line 35: Not allowed to load local resource: foobar1 CONSOLE MESSAGE: line 36: Not allowed to load local resource: foobar 2 CONSOLE MESSAGE: line 41: Not allowed to load local resource: foobar 3 3 Test for bug 13584: <script> code wrongly assumes requests can't fail. 4 4 -
trunk/LayoutTests/http/tests/misc/unloadable-script.html
r124692 r192983 8 8 } 9 9 10 var errorCount = 0; 10 11 function handleScriptOnError() 11 12 { 12 13 log('onerror called (good!)'); 14 errorCount++; 15 if (errorCount == 2 && window.testRunner) 16 testRunner.notifyDone(); 13 17 } 14 18 </script> … … 24 28 25 29 <script> 26 if (window.testRunner) 30 if (window.testRunner) { 27 31 testRunner.dumpAsText(); 32 testRunner.waitUntilDone(); 33 } 28 34 29 35 <!-- we are an HTTP test so the security origin will fail the file method --> -
trunk/LayoutTests/http/tests/security/local-JavaScript-from-remote-expected.txt
r178527 r192983 1 CONSOLE MESSAGE: line 29: Not allowed to load local resource: localScript.js1 CONSOLE MESSAGE: line 33: Not allowed to load local resource: localScript.js 2 2 This test is to see if a remote file can run a local script. 3 3 Currently this test cannot be run manually on Windows because we do not have a function like pathToLocalResource() outside of DRT. -
trunk/LayoutTests/http/tests/security/local-JavaScript-from-remote.html
r120174 r192983 5 5 6 6 function test() { 7 if (window.testRunner) 7 if (window.testRunner) { 8 8 testRunner.dumpAsText(); 9 testRunner.waitUntilDone(); 10 } 9 11 10 12 var localScriptLocation = "file:///tmp/LayoutTests/http/tests/security/resources/localScript.js"; … … 25 27 var tag = document.getElementById("result"); 26 28 tag.innerHTML = "Test Passed: Local script not loaded."; 29 if (window.testRunner) 30 testRunner.notifyDone(); 27 31 }); 28 32 -
trunk/Source/WebCore/ChangeLog
r192971 r192983 1 2015-12-02 Alex Christensen <achristensen@webkit.org> 2 3 Asynchronously call onerror when a content blocker blocks ascript element's load 4 https://bugs.webkit.org/show_bug.cgi?id=151649 5 6 Reviewed by Brady Eidson. 7 8 Test: http/tests/contentextensions/script-onerror.html 9 10 * dom/ScriptElement.cpp: 11 (WebCore::ScriptElement::ScriptElement): 12 (WebCore::ScriptElement::requestScript): 13 * dom/ScriptElement.h: 14 1 15 2015-12-02 Jer Noble <jer.noble@apple.com> 2 16 -
trunk/Source/WebCore/dom/ScriptElement.cpp
r191955 r192983 62 62 , m_alreadyStarted(alreadyStarted) 63 63 , m_forceAsync(!parserInserted) 64 , m_errorEventTimer(*this, &ScriptElement::dispatchErrorEvent) 64 65 { 65 66 if (parserInserted && m_element.document().scriptableDocumentParser() && !m_element.document().isInDocumentWrite()) … … 266 267 } 267 268 268 if (m_cachedScript) {269 if (m_cachedScript) 269 270 return true; 270 } 271 272 dispatchErrorEvent(); 271 272 m_errorEventTimer.startOneShot(0); 273 273 return false; 274 274 } -
trunk/Source/WebCore/dom/ScriptElement.h
r191955 r192983 24 24 #include "CachedResourceClient.h" 25 25 #include "CachedResourceHandle.h" 26 #include "Timer.h" 26 27 #include <wtf/text/TextPosition.h> 27 28 #include <wtf/text/WTFString.h> … … 110 111 String m_characterEncoding; 111 112 String m_fallbackCharacterEncoding; 113 Timer m_errorEventTimer; 112 114 }; 113 115
Note: See TracChangeset
for help on using the changeset viewer.