Disable support for BeforeLoadEvent
authorcdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 20 May 2020 20:14:23 +0000 (20:14 +0000)
committercdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 20 May 2020 20:14:23 +0000 (20:14 +0000)
https://bugs.webkit.org/show_bug.cgi?id=212140
<rdar://problem/62847577>

Reviewed by Antti Koivisto.

Source/WebCore:

Disable support for BeforeLoadEvent. Other browsers do not support it and
Chrome dropped it shortly after the fork:
- https://bugs.chromium.org/p/chromium/issues/detail?id=333318

This is a synchronous event and therefore very dangerous.

Test: fast/frames/didBecomeCurrentDocumentInFrame-crash.html

* bindings/js/WebCoreBuiltinNames.h:
* dom/BeforeLoadEvent.idl:
* dom/Node.cpp:
(WebCore::Node::dispatchBeforeLoadEvent):
* page/RuntimeEnabledFeatures.h:
(WebCore::RuntimeEnabledFeatures::setLegacyBeforeLoadEventEnabled):
(WebCore::RuntimeEnabledFeatures::legacyBeforeLoadEventEnabled const):

LayoutTests:

* fast/frames/didBecomeCurrentDocumentInFrame-crash-expected.txt: Added.
* fast/frames/didBecomeCurrentDocumentInFrame-crash.html: Added.
Add layout test coverage for crash in <rdar://problem/62847577>.

* fast/dom/HTMLLinkElement/event-while-removing-attribute-expected.txt:
* fast/dom/HTMLObjectElement/beforeload-set-text-crash-expected.txt: Removed.
* fast/dom/HTMLObjectElement/beforeload-set-text-crash.xhtml: Removed.
* fast/dom/HTMLScriptElement/async-onbeforeload-expected.txt: Removed.
* fast/dom/HTMLScriptElement/async-onbeforeload.html: Removed.
* fast/dom/HTMLScriptElement/defer-onbeforeload-expected.txt: Removed.
* fast/dom/HTMLScriptElement/defer-onbeforeload.html: Removed.
* fast/dom/HTMLScriptElement/move-in-beforeload-expected.txt: Removed.
* fast/dom/HTMLScriptElement/move-in-beforeload.html: Removed.
* fast/dom/HTMLScriptElement/remove-in-beforeload-expected.txt: Removed.
* fast/dom/HTMLScriptElement/remove-in-beforeload.html: Removed.
* fast/dom/beforeload/cached-image-before-load-expected.txt: Removed.
* fast/dom/beforeload/cached-image-before-load.html: Removed.
* fast/dom/beforeload/clear-video-poster-in-beforeload-listener-expected.txt: Removed.
* fast/dom/beforeload/clear-video-poster-in-beforeload-listener.html: Removed.
* fast/dom/beforeload/flash-before-load-expected.txt: Removed.
* fast/dom/beforeload/flash-before-load.html: Removed.
* fast/dom/beforeload/frame-before-load-expected.txt: Removed.
* fast/dom/beforeload/frame-before-load.html: Removed.
* fast/dom/beforeload/image-before-load-expected.txt: Removed.
* fast/dom/beforeload/image-before-load-innerHTML-expected.txt: Removed.
* fast/dom/beforeload/image-before-load-innerHTML.html: Removed.
* fast/dom/beforeload/image-before-load.html: Removed.
* fast/dom/beforeload/image-object-before-load-expected.txt: Removed.
* fast/dom/beforeload/image-object-before-load-innerHTML-expected.txt: Removed.
* fast/dom/beforeload/image-object-before-load-innerHTML.html: Removed.
* fast/dom/beforeload/image-object-before-load.html: Removed.
* fast/dom/beforeload/image-removed-during-before-load-expected.txt: Removed.
* fast/dom/beforeload/image-removed-during-before-load.html: Removed.
* fast/dom/beforeload/link-before-load-expected.txt: Removed.
* fast/dom/beforeload/link-before-load.html: Removed.
* fast/dom/beforeload/pi-before-load-expected.txt: Removed.
* fast/dom/beforeload/pi-before-load.xhtml: Removed.
* fast/dom/beforeload/recursive-css-pi-before-load-expected.txt: Removed.
* fast/dom/beforeload/recursive-css-pi-before-load.html: Removed.
* fast/dom/beforeload/recursive-link-before-load-expected.txt: Removed.
* fast/dom/beforeload/recursive-link-before-load.html: Removed.
* fast/dom/beforeload/recursive-xsl-pi-before-load-expected.txt: Removed.
* fast/dom/beforeload/recursive-xsl-pi-before-load.html: Removed.
* fast/dom/beforeload/remove-bad-object-in-beforeload-listener-expected.txt: Removed.
* fast/dom/beforeload/remove-bad-object-in-beforeload-listener.html: Removed.
* fast/dom/beforeload/remove-flash-in-beforeload-listener-expected.txt: Removed.
* fast/dom/beforeload/remove-flash-in-beforeload-listener.html: Removed.
* fast/dom/beforeload/remove-frame-in-beforeload-listener-expected.txt: Removed.
* fast/dom/beforeload/remove-frame-in-beforeload-listener.html: Removed.
* fast/dom/beforeload/remove-image-in-beforeload-listener-expected.txt: Removed.
* fast/dom/beforeload/remove-image-in-beforeload-listener.html: Removed.
* fast/dom/beforeload/remove-link-in-beforeload-listener-expected.txt: Removed.
* fast/dom/beforeload/remove-link-in-beforeload-listener.html: Removed.
* fast/dom/beforeload/remove-script-in-beforeload-listener-expected.txt: Removed.
* fast/dom/beforeload/remove-script-in-beforeload-listener.html: Removed.
* fast/dom/beforeload/remove-video-in-beforeload-listener-expected.txt: Removed.
* fast/dom/beforeload/remove-video-in-beforeload-listener.html: Removed.
* fast/dom/beforeload/remove-video-poster-in-beforeload-listener-expected.txt: Removed.
* fast/dom/beforeload/remove-video-poster-in-beforeload-listener.html: Removed.
* fast/dom/beforeload/resources/content.xhtml: Removed.
* fast/dom/beforeload/resources/fail.css: Removed.
* fast/dom/beforeload/resources/fail.js: Removed.
* fast/dom/beforeload/resources/pass.css: Removed.
* fast/dom/beforeload/resources/print.js: Removed.
* fast/dom/beforeload/resources/test.xsl: Removed.
* fast/dom/beforeload/script-before-load-dynamic-expected.txt: Removed.
* fast/dom/beforeload/script-before-load-dynamic.html: Removed.
* fast/dom/beforeload/script-before-load-expected.txt: Removed.
* fast/dom/beforeload/script-before-load-xhtml-expected.txt: Removed.
* fast/dom/beforeload/script-before-load-xhtml.xhtml: Removed.
* fast/dom/beforeload/script-before-load.html: Removed.
* fast/dom/beforeload/video-before-load-expected.txt: Removed.
* fast/dom/beforeload/video-before-load.html: Removed.
* fast/events/constructors/before-load-event-constructor-expected.txt: Removed.
* fast/events/constructors/before-load-event-constructor.html: Removed.
* fast/events/event-attribute-expected.txt:
* fast/events/event-handler-regions-layout-expected.txt: Removed.
* fast/events/event-handler-regions-layout.html: Removed.
* fast/frames/crash-display-none-iframe-during-onbeforeload-expected.txt:
* fast/frames/restoring-page-cache-should-not-run-scripts-via-style-update-expected.txt:
* fast/html/link-element-removal-during-beforeload-expected.txt: Removed.
* fast/html/link-element-removal-during-beforeload.html: Removed.
* fast/parser/document-write-fighting-eof-expected.txt: Removed.
* fast/parser/document-write-fighting-eof.html: Removed.
* fast/parser/document-write-partial-entity-before-load-expected.txt: Removed.
* fast/parser/document-write-partial-entity-before-load.html: Removed.
* fast/parser/remove-misnested-iframe-in-beforeload-expected.txt: Removed.
* fast/parser/remove-misnested-iframe-in-beforeload.html: Removed.
* fast/parser/remove-misnested-iframe-parent-in-beforeload-expected.txt: Removed.
* fast/parser/remove-misnested-iframe-parent-in-beforeload.html: Removed.
* fast/replaced/object-param-spaces-expected.txt: Removed.
* fast/replaced/object-param-spaces.html: Removed.
* fast/scrolling/marquee-scroll-crash-expected.txt:
* fast/tokenizer/write-before-load-expected.txt:
* http/tests/security/beforeload-iframe-client-redirect-expected.txt:
* http/tests/security/beforeload-iframe-server-redirect-expected.txt:
* http/tests/security/xssAuditor/object-embed-tag-control-char-expected.txt:
* http/tests/security/xssAuditor/object-embed-tag-control-char.html:
* http/tests/security/xssAuditor/object-embed-tag-expected.txt:
* http/tests/security/xssAuditor/object-embed-tag-null-char-expected.txt:
* http/tests/security/xssAuditor/object-embed-tag-null-char.html:
* http/tests/security/xssAuditor/object-embed-tag.html:
* http/tests/security/xssAuditor/object-src-inject.html:
* http/tests/security/xssAuditor/object-tag-expected.txt:
* http/tests/security/xssAuditor/object-tag-javascript-url-expected.txt:
* http/tests/security/xssAuditor/object-tag-javascript-url.html:
* http/tests/security/xssAuditor/object-tag.html:
* http/tests/security/xssAuditor/resources/echo-intertag.pl:
* http/tests/security/xssAuditor/resources/echo-object-src.pl:
* http/tests/security/xssAuditor/resources/utilities.js:
(notifyDoneAfterReceivingLoaded):
(notifyDoneAfterReceivingBeforeloadFromIds): Deleted.
* plugins/unsupported-plugin-with-replacement-in-iframe-crash-expected.txt:
Update existing tests accordingly.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@261946 268f45cc-cd09-0410-ab3c-d52691b4dbfc

143 files changed:
LayoutTests/ChangeLog
LayoutTests/TestExpectations
LayoutTests/fast/dom/HTMLLinkElement/event-while-removing-attribute-expected.txt
LayoutTests/fast/dom/HTMLObjectElement/beforeload-set-text-crash-expected.txt [deleted file]
LayoutTests/fast/dom/HTMLObjectElement/beforeload-set-text-crash.xhtml [deleted file]
LayoutTests/fast/dom/HTMLScriptElement/async-onbeforeload-expected.txt [deleted file]
LayoutTests/fast/dom/HTMLScriptElement/async-onbeforeload.html [deleted file]
LayoutTests/fast/dom/HTMLScriptElement/defer-onbeforeload-expected.txt [deleted file]
LayoutTests/fast/dom/HTMLScriptElement/defer-onbeforeload.html [deleted file]
LayoutTests/fast/dom/HTMLScriptElement/move-in-beforeload-expected.txt [deleted file]
LayoutTests/fast/dom/HTMLScriptElement/move-in-beforeload.html [deleted file]
LayoutTests/fast/dom/HTMLScriptElement/remove-in-beforeload-expected.txt [deleted file]
LayoutTests/fast/dom/HTMLScriptElement/remove-in-beforeload.html [deleted file]
LayoutTests/fast/dom/beforeload/cached-image-before-load-expected.txt [deleted file]
LayoutTests/fast/dom/beforeload/cached-image-before-load.html [deleted file]
LayoutTests/fast/dom/beforeload/clear-video-poster-in-beforeload-listener-expected.txt [deleted file]
LayoutTests/fast/dom/beforeload/clear-video-poster-in-beforeload-listener.html [deleted file]
LayoutTests/fast/dom/beforeload/flash-before-load-expected.txt [deleted file]
LayoutTests/fast/dom/beforeload/flash-before-load.html [deleted file]
LayoutTests/fast/dom/beforeload/frame-before-load-expected.txt [deleted file]
LayoutTests/fast/dom/beforeload/frame-before-load.html [deleted file]
LayoutTests/fast/dom/beforeload/image-before-load-expected.txt [deleted file]
LayoutTests/fast/dom/beforeload/image-before-load-innerHTML-expected.txt [deleted file]
LayoutTests/fast/dom/beforeload/image-before-load-innerHTML.html [deleted file]
LayoutTests/fast/dom/beforeload/image-before-load.html [deleted file]
LayoutTests/fast/dom/beforeload/image-object-before-load-expected.txt [deleted file]
LayoutTests/fast/dom/beforeload/image-object-before-load-innerHTML-expected.txt [deleted file]
LayoutTests/fast/dom/beforeload/image-object-before-load-innerHTML.html [deleted file]
LayoutTests/fast/dom/beforeload/image-object-before-load.html [deleted file]
LayoutTests/fast/dom/beforeload/image-removed-during-before-load-expected.txt [deleted file]
LayoutTests/fast/dom/beforeload/image-removed-during-before-load.html [deleted file]
LayoutTests/fast/dom/beforeload/link-before-load-expected.txt [deleted file]
LayoutTests/fast/dom/beforeload/link-before-load.html [deleted file]
LayoutTests/fast/dom/beforeload/pi-before-load-expected.txt [deleted file]
LayoutTests/fast/dom/beforeload/pi-before-load.xhtml [deleted file]
LayoutTests/fast/dom/beforeload/recursive-css-pi-before-load-expected.txt [deleted file]
LayoutTests/fast/dom/beforeload/recursive-css-pi-before-load.html [deleted file]
LayoutTests/fast/dom/beforeload/recursive-link-before-load-expected.txt [deleted file]
LayoutTests/fast/dom/beforeload/recursive-link-before-load.html [deleted file]
LayoutTests/fast/dom/beforeload/recursive-xsl-pi-before-load-expected.txt [deleted file]
LayoutTests/fast/dom/beforeload/recursive-xsl-pi-before-load.html [deleted file]
LayoutTests/fast/dom/beforeload/remove-bad-object-in-beforeload-listener-expected.txt [deleted file]
LayoutTests/fast/dom/beforeload/remove-bad-object-in-beforeload-listener.html [deleted file]
LayoutTests/fast/dom/beforeload/remove-flash-in-beforeload-listener-expected.txt [deleted file]
LayoutTests/fast/dom/beforeload/remove-flash-in-beforeload-listener.html [deleted file]
LayoutTests/fast/dom/beforeload/remove-frame-in-beforeload-listener-expected.txt [deleted file]
LayoutTests/fast/dom/beforeload/remove-frame-in-beforeload-listener.html [deleted file]
LayoutTests/fast/dom/beforeload/remove-image-in-beforeload-listener-expected.txt [deleted file]
LayoutTests/fast/dom/beforeload/remove-image-in-beforeload-listener.html [deleted file]
LayoutTests/fast/dom/beforeload/remove-link-in-beforeload-listener-expected.txt [deleted file]
LayoutTests/fast/dom/beforeload/remove-link-in-beforeload-listener.html [deleted file]
LayoutTests/fast/dom/beforeload/remove-script-in-beforeload-listener-expected.txt [deleted file]
LayoutTests/fast/dom/beforeload/remove-script-in-beforeload-listener.html [deleted file]
LayoutTests/fast/dom/beforeload/remove-video-in-beforeload-listener-expected.txt [deleted file]
LayoutTests/fast/dom/beforeload/remove-video-in-beforeload-listener.html [deleted file]
LayoutTests/fast/dom/beforeload/remove-video-poster-in-beforeload-listener-expected.txt [deleted file]
LayoutTests/fast/dom/beforeload/remove-video-poster-in-beforeload-listener.html [deleted file]
LayoutTests/fast/dom/beforeload/resources/content.xhtml [deleted file]
LayoutTests/fast/dom/beforeload/resources/fail.css [deleted file]
LayoutTests/fast/dom/beforeload/resources/fail.js [deleted file]
LayoutTests/fast/dom/beforeload/resources/pass.css [deleted file]
LayoutTests/fast/dom/beforeload/resources/print.js [deleted file]
LayoutTests/fast/dom/beforeload/resources/test.xsl [deleted file]
LayoutTests/fast/dom/beforeload/script-before-load-dynamic-expected.txt [deleted file]
LayoutTests/fast/dom/beforeload/script-before-load-dynamic.html [deleted file]
LayoutTests/fast/dom/beforeload/script-before-load-expected.txt [deleted file]
LayoutTests/fast/dom/beforeload/script-before-load-xhtml-expected.txt [deleted file]
LayoutTests/fast/dom/beforeload/script-before-load-xhtml.xhtml [deleted file]
LayoutTests/fast/dom/beforeload/script-before-load.html [deleted file]
LayoutTests/fast/dom/beforeload/video-before-load-expected.txt [deleted file]
LayoutTests/fast/dom/beforeload/video-before-load.html [deleted file]
LayoutTests/fast/events/constructors/before-load-event-constructor-expected.txt [deleted file]
LayoutTests/fast/events/constructors/before-load-event-constructor.html [deleted file]
LayoutTests/fast/events/event-attribute-expected.txt
LayoutTests/fast/events/event-handler-regions-layout-expected.txt [deleted file]
LayoutTests/fast/events/event-handler-regions-layout.html [deleted file]
LayoutTests/fast/frames/crash-display-none-iframe-during-onbeforeload-expected.txt
LayoutTests/fast/frames/didBecomeCurrentDocumentInFrame-crash-expected.txt [new file with mode: 0644]
LayoutTests/fast/frames/didBecomeCurrentDocumentInFrame-crash.html [new file with mode: 0644]
LayoutTests/fast/frames/restoring-page-cache-should-not-run-scripts-via-style-update-expected.txt
LayoutTests/fast/html/link-element-removal-during-beforeload-expected.txt [deleted file]
LayoutTests/fast/html/link-element-removal-during-beforeload.html [deleted file]
LayoutTests/fast/parser/document-write-fighting-eof-expected.txt [deleted file]
LayoutTests/fast/parser/document-write-fighting-eof.html [deleted file]
LayoutTests/fast/parser/document-write-partial-entity-before-load-expected.txt [deleted file]
LayoutTests/fast/parser/document-write-partial-entity-before-load.html [deleted file]
LayoutTests/fast/parser/remove-misnested-iframe-in-beforeload-expected.txt [deleted file]
LayoutTests/fast/parser/remove-misnested-iframe-in-beforeload.html [deleted file]
LayoutTests/fast/parser/remove-misnested-iframe-parent-in-beforeload-expected.txt [deleted file]
LayoutTests/fast/parser/remove-misnested-iframe-parent-in-beforeload.html [deleted file]
LayoutTests/fast/replaced/object-param-spaces-expected.txt [deleted file]
LayoutTests/fast/replaced/object-param-spaces.html [deleted file]
LayoutTests/fast/replaced/object-with-embed-url-param-expected.txt [deleted file]
LayoutTests/fast/replaced/object-with-embed-url-param.html [deleted file]
LayoutTests/fast/scrolling/marquee-scroll-crash-expected.txt
LayoutTests/fast/tokenizer/write-before-load-expected.txt
LayoutTests/http/tests/cache/cancel-during-revalidation-succeeded-expected.txt [deleted file]
LayoutTests/http/tests/cache/cancel-during-revalidation-succeeded.html [deleted file]
LayoutTests/http/tests/media/video-play-stall-before-meta-data-expected.txt
LayoutTests/http/tests/plugins/navigation-during-load-embed-expected.txt [deleted file]
LayoutTests/http/tests/plugins/navigation-during-load-embed.html [deleted file]
LayoutTests/http/tests/plugins/navigation-during-load-expected.txt [deleted file]
LayoutTests/http/tests/plugins/navigation-during-load.html [deleted file]
LayoutTests/http/tests/security/beforeload-iframe-client-redirect-expected.txt
LayoutTests/http/tests/security/beforeload-iframe-server-redirect-expected.txt
LayoutTests/http/tests/security/xssAuditor/object-embed-tag-control-char-expected.txt
LayoutTests/http/tests/security/xssAuditor/object-embed-tag-control-char.html
LayoutTests/http/tests/security/xssAuditor/object-embed-tag-expected.txt
LayoutTests/http/tests/security/xssAuditor/object-embed-tag-null-char-expected.txt
LayoutTests/http/tests/security/xssAuditor/object-embed-tag-null-char.html
LayoutTests/http/tests/security/xssAuditor/object-embed-tag.html
LayoutTests/http/tests/security/xssAuditor/object-src-inject.html
LayoutTests/http/tests/security/xssAuditor/object-tag-expected.txt
LayoutTests/http/tests/security/xssAuditor/object-tag-javascript-url-expected.txt
LayoutTests/http/tests/security/xssAuditor/object-tag-javascript-url.html
LayoutTests/http/tests/security/xssAuditor/object-tag.html
LayoutTests/http/tests/security/xssAuditor/resources/echo-intertag.pl
LayoutTests/http/tests/security/xssAuditor/resources/echo-object-src.pl
LayoutTests/http/tests/security/xssAuditor/resources/utilities.js
LayoutTests/js/dom/constructor-length.html
LayoutTests/js/dom/modules/module-will-fire-beforeload-expected.txt [deleted file]
LayoutTests/js/dom/modules/module-will-fire-beforeload.html [deleted file]
LayoutTests/media/media-blocked-by-beforeload-expected.txt [deleted file]
LayoutTests/media/media-blocked-by-beforeload.html [deleted file]
LayoutTests/media/video-beforeload-remove-source-expected.txt [deleted file]
LayoutTests/media/video-beforeload-remove-source.html [deleted file]
LayoutTests/platform/glib/js/dom/constructor-length-expected.txt
LayoutTests/platform/gtk/TestExpectations
LayoutTests/platform/ios-wk1/TestExpectations
LayoutTests/platform/ios-wk2/TestExpectations
LayoutTests/platform/ios/TestExpectations
LayoutTests/platform/ios/js/dom/constructor-length-expected.txt
LayoutTests/platform/mac/js/dom/constructor-length-expected.txt
LayoutTests/platform/win/TestExpectations
LayoutTests/platform/win/js/dom/constructor-length-expected.txt
LayoutTests/platform/wincairo/js/dom/constructor-length-expected.txt
LayoutTests/platform/wk2/TestExpectations
LayoutTests/plugins/unsupported-plugin-with-replacement-in-iframe-crash-expected.txt
Source/WebCore/ChangeLog
Source/WebCore/bindings/js/WebCoreBuiltinNames.h
Source/WebCore/dom/BeforeLoadEvent.idl
Source/WebCore/dom/Node.cpp
Source/WebCore/page/RuntimeEnabledFeatures.h

index 01aff62..fb4e562 100644 (file)
@@ -1,3 +1,126 @@
+2020-05-20  Chris Dumez  <cdumez@apple.com>
+
+        Disable support for BeforeLoadEvent
+        https://bugs.webkit.org/show_bug.cgi?id=212140
+        <rdar://problem/62847577>
+
+        Reviewed by Antti Koivisto.
+
+        * fast/frames/didBecomeCurrentDocumentInFrame-crash-expected.txt: Added.
+        * fast/frames/didBecomeCurrentDocumentInFrame-crash.html: Added.
+        Add layout test coverage for crash in <rdar://problem/62847577>.
+
+        * fast/dom/HTMLLinkElement/event-while-removing-attribute-expected.txt:
+        * fast/dom/HTMLObjectElement/beforeload-set-text-crash-expected.txt: Removed.
+        * fast/dom/HTMLObjectElement/beforeload-set-text-crash.xhtml: Removed.
+        * fast/dom/HTMLScriptElement/async-onbeforeload-expected.txt: Removed.
+        * fast/dom/HTMLScriptElement/async-onbeforeload.html: Removed.
+        * fast/dom/HTMLScriptElement/defer-onbeforeload-expected.txt: Removed.
+        * fast/dom/HTMLScriptElement/defer-onbeforeload.html: Removed.
+        * fast/dom/HTMLScriptElement/move-in-beforeload-expected.txt: Removed.
+        * fast/dom/HTMLScriptElement/move-in-beforeload.html: Removed.
+        * fast/dom/HTMLScriptElement/remove-in-beforeload-expected.txt: Removed.
+        * fast/dom/HTMLScriptElement/remove-in-beforeload.html: Removed.
+        * fast/dom/beforeload/cached-image-before-load-expected.txt: Removed.
+        * fast/dom/beforeload/cached-image-before-load.html: Removed.
+        * fast/dom/beforeload/clear-video-poster-in-beforeload-listener-expected.txt: Removed.
+        * fast/dom/beforeload/clear-video-poster-in-beforeload-listener.html: Removed.
+        * fast/dom/beforeload/flash-before-load-expected.txt: Removed.
+        * fast/dom/beforeload/flash-before-load.html: Removed.
+        * fast/dom/beforeload/frame-before-load-expected.txt: Removed.
+        * fast/dom/beforeload/frame-before-load.html: Removed.
+        * fast/dom/beforeload/image-before-load-expected.txt: Removed.
+        * fast/dom/beforeload/image-before-load-innerHTML-expected.txt: Removed.
+        * fast/dom/beforeload/image-before-load-innerHTML.html: Removed.
+        * fast/dom/beforeload/image-before-load.html: Removed.
+        * fast/dom/beforeload/image-object-before-load-expected.txt: Removed.
+        * fast/dom/beforeload/image-object-before-load-innerHTML-expected.txt: Removed.
+        * fast/dom/beforeload/image-object-before-load-innerHTML.html: Removed.
+        * fast/dom/beforeload/image-object-before-load.html: Removed.
+        * fast/dom/beforeload/image-removed-during-before-load-expected.txt: Removed.
+        * fast/dom/beforeload/image-removed-during-before-load.html: Removed.
+        * fast/dom/beforeload/link-before-load-expected.txt: Removed.
+        * fast/dom/beforeload/link-before-load.html: Removed.
+        * fast/dom/beforeload/pi-before-load-expected.txt: Removed.
+        * fast/dom/beforeload/pi-before-load.xhtml: Removed.
+        * fast/dom/beforeload/recursive-css-pi-before-load-expected.txt: Removed.
+        * fast/dom/beforeload/recursive-css-pi-before-load.html: Removed.
+        * fast/dom/beforeload/recursive-link-before-load-expected.txt: Removed.
+        * fast/dom/beforeload/recursive-link-before-load.html: Removed.
+        * fast/dom/beforeload/recursive-xsl-pi-before-load-expected.txt: Removed.
+        * fast/dom/beforeload/recursive-xsl-pi-before-load.html: Removed.
+        * fast/dom/beforeload/remove-bad-object-in-beforeload-listener-expected.txt: Removed.
+        * fast/dom/beforeload/remove-bad-object-in-beforeload-listener.html: Removed.
+        * fast/dom/beforeload/remove-flash-in-beforeload-listener-expected.txt: Removed.
+        * fast/dom/beforeload/remove-flash-in-beforeload-listener.html: Removed.
+        * fast/dom/beforeload/remove-frame-in-beforeload-listener-expected.txt: Removed.
+        * fast/dom/beforeload/remove-frame-in-beforeload-listener.html: Removed.
+        * fast/dom/beforeload/remove-image-in-beforeload-listener-expected.txt: Removed.
+        * fast/dom/beforeload/remove-image-in-beforeload-listener.html: Removed.
+        * fast/dom/beforeload/remove-link-in-beforeload-listener-expected.txt: Removed.
+        * fast/dom/beforeload/remove-link-in-beforeload-listener.html: Removed.
+        * fast/dom/beforeload/remove-script-in-beforeload-listener-expected.txt: Removed.
+        * fast/dom/beforeload/remove-script-in-beforeload-listener.html: Removed.
+        * fast/dom/beforeload/remove-video-in-beforeload-listener-expected.txt: Removed.
+        * fast/dom/beforeload/remove-video-in-beforeload-listener.html: Removed.
+        * fast/dom/beforeload/remove-video-poster-in-beforeload-listener-expected.txt: Removed.
+        * fast/dom/beforeload/remove-video-poster-in-beforeload-listener.html: Removed.
+        * fast/dom/beforeload/resources/content.xhtml: Removed.
+        * fast/dom/beforeload/resources/fail.css: Removed.
+        * fast/dom/beforeload/resources/fail.js: Removed.
+        * fast/dom/beforeload/resources/pass.css: Removed.
+        * fast/dom/beforeload/resources/print.js: Removed.
+        * fast/dom/beforeload/resources/test.xsl: Removed.
+        * fast/dom/beforeload/script-before-load-dynamic-expected.txt: Removed.
+        * fast/dom/beforeload/script-before-load-dynamic.html: Removed.
+        * fast/dom/beforeload/script-before-load-expected.txt: Removed.
+        * fast/dom/beforeload/script-before-load-xhtml-expected.txt: Removed.
+        * fast/dom/beforeload/script-before-load-xhtml.xhtml: Removed.
+        * fast/dom/beforeload/script-before-load.html: Removed.
+        * fast/dom/beforeload/video-before-load-expected.txt: Removed.
+        * fast/dom/beforeload/video-before-load.html: Removed.
+        * fast/events/constructors/before-load-event-constructor-expected.txt: Removed.
+        * fast/events/constructors/before-load-event-constructor.html: Removed.
+        * fast/events/event-attribute-expected.txt:
+        * fast/events/event-handler-regions-layout-expected.txt: Removed.
+        * fast/events/event-handler-regions-layout.html: Removed.
+        * fast/frames/crash-display-none-iframe-during-onbeforeload-expected.txt:
+        * fast/frames/restoring-page-cache-should-not-run-scripts-via-style-update-expected.txt:
+        * fast/html/link-element-removal-during-beforeload-expected.txt: Removed.
+        * fast/html/link-element-removal-during-beforeload.html: Removed.
+        * fast/parser/document-write-fighting-eof-expected.txt: Removed.
+        * fast/parser/document-write-fighting-eof.html: Removed.
+        * fast/parser/document-write-partial-entity-before-load-expected.txt: Removed.
+        * fast/parser/document-write-partial-entity-before-load.html: Removed.
+        * fast/parser/remove-misnested-iframe-in-beforeload-expected.txt: Removed.
+        * fast/parser/remove-misnested-iframe-in-beforeload.html: Removed.
+        * fast/parser/remove-misnested-iframe-parent-in-beforeload-expected.txt: Removed.
+        * fast/parser/remove-misnested-iframe-parent-in-beforeload.html: Removed.
+        * fast/replaced/object-param-spaces-expected.txt: Removed.
+        * fast/replaced/object-param-spaces.html: Removed.
+        * fast/scrolling/marquee-scroll-crash-expected.txt:
+        * fast/tokenizer/write-before-load-expected.txt:
+        * http/tests/security/beforeload-iframe-client-redirect-expected.txt:
+        * http/tests/security/beforeload-iframe-server-redirect-expected.txt:
+        * http/tests/security/xssAuditor/object-embed-tag-control-char-expected.txt:
+        * http/tests/security/xssAuditor/object-embed-tag-control-char.html:
+        * http/tests/security/xssAuditor/object-embed-tag-expected.txt:
+        * http/tests/security/xssAuditor/object-embed-tag-null-char-expected.txt:
+        * http/tests/security/xssAuditor/object-embed-tag-null-char.html:
+        * http/tests/security/xssAuditor/object-embed-tag.html:
+        * http/tests/security/xssAuditor/object-src-inject.html:
+        * http/tests/security/xssAuditor/object-tag-expected.txt:
+        * http/tests/security/xssAuditor/object-tag-javascript-url-expected.txt:
+        * http/tests/security/xssAuditor/object-tag-javascript-url.html:
+        * http/tests/security/xssAuditor/object-tag.html:
+        * http/tests/security/xssAuditor/resources/echo-intertag.pl:
+        * http/tests/security/xssAuditor/resources/echo-object-src.pl:
+        * http/tests/security/xssAuditor/resources/utilities.js:
+        (notifyDoneAfterReceivingLoaded):
+        (notifyDoneAfterReceivingBeforeloadFromIds): Deleted.
+        * plugins/unsupported-plugin-with-replacement-in-iframe-crash-expected.txt:
+        Update existing tests accordingly.
+
 2020-05-20  Myles C. Maxfield  <mmaxfield@apple.com>
 
         [iPadOS] -webkit-text-size-adjust:percentage doesn't work in native apps
index 2ed0c69..4a04f91 100644 (file)
@@ -1686,9 +1686,6 @@ webkit.org/b/85308 ietestcenter/css3/valuesandunits/units-000.htm [ ImageOnlyFai
 [ Debug ] fast/loader/document-with-fragment-url-3.html [ Pass Timeout ]
 [ Debug ] fast/loader/document-with-fragment-url-4.html [ Pass Timeout ]
 
-webkit.org/b/110546 [ Debug ] fast/parser/document-write-fighting-eof.html [ Skip ]
-webkit.org/b/110546 [ Debug ] fast/parser/document-write-partial-entity-before-load.html [ Skip ]
-
 webkit.org/b/85902 [ Debug ] fast/overflow/lots-of-sibling-inline-boxes.html [ Slow ]
 webkit.org/b/121452 [ Debug ] fast/frames/lots-of-objects.html [ Slow ]
 webkit.org/b/121452 [ Debug ] fast/frames/lots-of-iframes.html [ Slow ]
index f37231d..9a0d13c 100644 (file)
@@ -3,9 +3,6 @@ Check that we do not Debug ASSERT when modifying attribute data for a link.
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
-PASS Before load event handled for original link element.
-PASS Before load event handled for original link element.
-PASS Before load event handled for original link element.
 PASS successfullyParsed is true
 
 TEST COMPLETE
diff --git a/LayoutTests/fast/dom/HTMLObjectElement/beforeload-set-text-crash-expected.txt b/LayoutTests/fast/dom/HTMLObjectElement/beforeload-set-text-crash-expected.txt
deleted file mode 100644 (file)
index 4833705..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-PASS successfullyParsed is true
-
-TEST COMPLETE
-Test passes if it does not crash. 
diff --git a/LayoutTests/fast/dom/HTMLObjectElement/beforeload-set-text-crash.xhtml b/LayoutTests/fast/dom/HTMLObjectElement/beforeload-set-text-crash.xhtml
deleted file mode 100644 (file)
index 50f5ca2..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-<!DOCTYPE html>
-<html xmlns="http://www.w3.org/1999/xhtml">
-Test passes if it does not crash.
-<object id="object" type="image/svg+xml" />
-<script src="../../../resources/js-test-pre.js"></script>
-<script>
-window.jsTestIsAsync = true;
-var count = 0;
-function setText() {
-    count++;
-    if (count > 100) {
-        document.removeEventListener("beforeload", setText, true);
-        finishJSTest();
-    }
-    gc(); // Because we are recursively entering into setText, can't gc() after this command.
-    document.getElementById("object").textContent = "A";
-}
-document.execCommand("SelectAll");
-document.getElementById("object").textContent = "A";
-document.addEventListener("beforeload", setText, true);
-event = document.createEvent("Event");
-event.initEvent("beforeload", false, false);
-document.documentElement.dispatchEvent(event);
-</script>
-<script src="../../../resources/js-test-post.js"></script>
-</html>
-
diff --git a/LayoutTests/fast/dom/HTMLScriptElement/async-onbeforeload-expected.txt b/LayoutTests/fast/dom/HTMLScriptElement/async-onbeforeload-expected.txt
deleted file mode 100644 (file)
index c468543..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-Checks that async scripts fire onbeforeload immediately and that it is cancellable.
-cancelled onbeforeload async
-onbeforeload async
-onbeforeload external
-async
-load
-PASS successfullyParsed is true
-
-TEST COMPLETE
-
diff --git a/LayoutTests/fast/dom/HTMLScriptElement/async-onbeforeload.html b/LayoutTests/fast/dom/HTMLScriptElement/async-onbeforeload.html
deleted file mode 100644 (file)
index e672e19..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
-<html>
-<head>
-<script src="../../../resources/js-test-pre.js"></script>
-</head>
-<body onload="debug('load');finishJSTest();">
-Checks that async scripts fire onbeforeload immediately and that it is cancellable.
-<div id="console"></div>
-<script>var jsTestIsAsync = true;</script>
-<script src="resources/shouldnotexecute.js" onbeforeload="debug('cancelled onbeforeload async'); return false;" async></script>
-<script src="resources/async.js" onbeforeload="debug('onbeforeload async'); return true;" async></script>
-<script src="data:text/javascript," onbeforeload="debug('onbeforeload external'); return true;"></script>
-<script src="../../../resources/js-test-post.js"></script>
-</body>
-</html>
diff --git a/LayoutTests/fast/dom/HTMLScriptElement/defer-onbeforeload-expected.txt b/LayoutTests/fast/dom/HTMLScriptElement/defer-onbeforeload-expected.txt
deleted file mode 100644 (file)
index 2eb56c9..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-Checks that deferred scripts fire onbeforeload immediately and that it is cancellable.
-cancelled onbeforeload defer
-onbeforeload defer
-onbeforeload external
-external
-defer
-
diff --git a/LayoutTests/fast/dom/HTMLScriptElement/defer-onbeforeload.html b/LayoutTests/fast/dom/HTMLScriptElement/defer-onbeforeload.html
deleted file mode 100644 (file)
index c7a355d..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
-<html>
-<head>
-<script src="../../../resources/js-test-pre.js"></script>
-</head>
-<body>
-Checks that deferred scripts fire onbeforeload immediately and that it is cancellable.
-<div id="console"></div>
-<script src="resources/shouldnotexecute.js" onbeforeload="debug('cancelled onbeforeload defer'); return false;" defer></script>
-<script src="resources/defer.js" onbeforeload="debug('onbeforeload defer'); return true;" defer></script>
-<script src="resources/external.js" onbeforeload="debug('onbeforeload external'); return true;"></script>
-</body>
-</html>
diff --git a/LayoutTests/fast/dom/HTMLScriptElement/move-in-beforeload-expected.txt b/LayoutTests/fast/dom/HTMLScriptElement/move-in-beforeload-expected.txt
deleted file mode 100644 (file)
index af65951..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-PASS 
-
diff --git a/LayoutTests/fast/dom/HTMLScriptElement/move-in-beforeload.html b/LayoutTests/fast/dom/HTMLScriptElement/move-in-beforeload.html
deleted file mode 100644 (file)
index a85122a..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
-<html>
-<head>
-<script src="../../../resources/js-test-pre.js"></script>
-<body onload="test()">
-<div id="console"></div>
-<iframe src="resources/frame.html"></iframe>
-<script>
-if (window.testRunner) {
-    testRunner.dumpAsText();
-}
-
-function test()
-{
-    var s = document.createElement("script");
-    s.addEventListener("beforeload", function() {
-        var s = document.body.removeChild(document.getElementsByTagName("script")[2]);
-        document.getElementsByTagName("iframe")[0].contentDocument.body.appendChild(s);
-        testPassed("");
-    }, false);
-    s.addEventListener("error", function() {
-        testFailed("error event should not fire.");
-    }, false);
-    s.addEventListener("load", function() {
-        testFailed("script should not be loaded");
-    }, false);
-    s.src = "external.js";
-    document.body.appendChild(s);
-}
-</script>
-</body>
-</html>
diff --git a/LayoutTests/fast/dom/HTMLScriptElement/remove-in-beforeload-expected.txt b/LayoutTests/fast/dom/HTMLScriptElement/remove-in-beforeload-expected.txt
deleted file mode 100644 (file)
index af65951..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-PASS 
-
diff --git a/LayoutTests/fast/dom/HTMLScriptElement/remove-in-beforeload.html b/LayoutTests/fast/dom/HTMLScriptElement/remove-in-beforeload.html
deleted file mode 100644 (file)
index 5bcd14b..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
-<html>
-<head>
-<script src="../../../resources/js-test-pre.js"></script>
-<body onload="test()">
-<div id="console"></div>
-<script>
-if (window.testRunner) {
-    testRunner.waitUntilDone();
-    testRunner.dumpAsText();
-}
-
-function test()
-{
-    var s = document.createElement("script");
-    s.addEventListener("beforeload", function() {
-        document.body.removeChild(document.getElementsByTagName("script")[2]);
-        testPassed("");
-        if (window.testRunner)
-            testRunner.notifyDone();
-    }, false);
-    s.addEventListener("error", function() {
-        testFailed("error event should not fire.")
-    }, false);
-    s.addEventListener("load", function() {
-        testFailed("load event should not fire.")
-    }, false);
-    s.src = "resources/shouldnotexecute.js";
-    document.body.appendChild(s);
-}
-</script>
-</body>
-</html>
diff --git a/LayoutTests/fast/dom/beforeload/cached-image-before-load-expected.txt b/LayoutTests/fast/dom/beforeload/cached-image-before-load-expected.txt
deleted file mode 100644 (file)
index 9a0749c..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-This is a regression test for http://webkit.org/b/45586. It verifies that the beforeload event fires before the load event when loading a cached image, and that the image's style attributes can be queried in the load event handler. On success, you should see two lines of green text starting with the word 'PASS'.
-
-PASS: load fired after beforeload for a cached image.
-PASS: image is 16px wide.
diff --git a/LayoutTests/fast/dom/beforeload/cached-image-before-load.html b/LayoutTests/fast/dom/beforeload/cached-image-before-load.html
deleted file mode 100644 (file)
index cf9e566..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-<script src="resources/print.js"></script>
-<script>
-    if (window.testRunner) {
-        testRunner.dumpAsText();
-        testRunner.waitUntilDone();
-    }
-
-    window._beforeloadfired = false;
-
-    function runTest()
-    {
-        document.addEventListener("beforeload", function(event) {
-            window._beforeloadfired = true;
-        }, true);
-
-        cachedImage = new Image();
-        document.body.appendChild(cachedImage);
-        cachedImage.onload = function(event) {
-            if (window._beforeloadfired)
-                print("PASS: load fired after beforeload for a cached image.", "green");
-            else
-                print("FAIL: load fired before beforeload for a cached image.", "red");
-                
-            if (this.width == 16)
-                print("PASS: image is 16px wide.", "green");
-            else
-                print("FAIL: image claims not to be 16px wide.", "red");
-
-            if (window.testRunner)
-                testRunner.notifyDone();
-        }
-        cachedImage.src = document.getElementById("originalImage").src;
-        cachedImage.style.visibility = "hidden";
-    }
-</script>
-<p>This is a regression test for <a href="http://webkit.org/b/45586">http://webkit.org/b/45586</a>. It verifies that the beforeload event fires before the load event when loading a cached image, and that the image's style attributes can be queried in the load event handler. On success, you should see two lines of green text starting with the word 'PASS'.</p>
-<div id="console"></div>
-<img id="originalImage" style="visibility:hidden" onload="runTest()" src="../../images/resources/test-load.jpg">
diff --git a/LayoutTests/fast/dom/beforeload/clear-video-poster-in-beforeload-listener-expected.txt b/LayoutTests/fast/dom/beforeload/clear-video-poster-in-beforeload-listener-expected.txt
deleted file mode 100644 (file)
index 00a6296..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-This page tests that you can correctly clear a video object's poster attribute in a beforeload listener without causing a crash.
-
-PASS: test completed.
diff --git a/LayoutTests/fast/dom/beforeload/clear-video-poster-in-beforeload-listener.html b/LayoutTests/fast/dom/beforeload/clear-video-poster-in-beforeload-listener.html
deleted file mode 100644 (file)
index cfd17dc..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-<!DOCTYPE html>
-<html>
-<body>
-<p>This page tests that you can correctly clear a video object's poster attribute in a beforeload listener without causing a crash.</p>
-<div id="console">FAIL: test didn't run to completion.</div>
-<script>
-if (window.testRunner) {
-    testRunner.dumpAsText();
-    testRunner.waitUntilDone();
-}
-x = document.createElement('video');
-x.addEventListener('beforeload', function () {
-    x.removeAttribute('poster');
-    document.getElementById('console').textContent = 'PASS: test completed.';
-    if (window.testRunner)
-        testRunner.notifyDone();
-}, false);
-x.poster = 'foobar';
-</script>
-</body>
-</html>
diff --git a/LayoutTests/fast/dom/beforeload/flash-before-load-expected.txt b/LayoutTests/fast/dom/beforeload/flash-before-load-expected.txt
deleted file mode 100644 (file)
index 7ef22e9..0000000
+++ /dev/null
@@ -1 +0,0 @@
-PASS
diff --git a/LayoutTests/fast/dom/beforeload/flash-before-load.html b/LayoutTests/fast/dom/beforeload/flash-before-load.html
deleted file mode 100644 (file)
index fe107b5..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<script src="resources/print.js"></script>
-</head>
-<body>
-<div id="console"></div>
-<script src="../../../resources/plugin.js"></script>
-<script>
-    if (window.testRunner)
-        testRunner.dumpAsText();
-
-    runAfterPluginLoad(null, NotifyDone);
-</script>
-
-<object id="plugin" onbeforeload="return false" type="application/x-shockwave-flash" data="../../../plugins/resources/simple_blank.swf"
-width="300" height="150">
-<span style="font-family:monospace; color:green">PASS</span>
-</object>
-
-</body>
-</html>
diff --git a/LayoutTests/fast/dom/beforeload/frame-before-load-expected.txt b/LayoutTests/fast/dom/beforeload/frame-before-load-expected.txt
deleted file mode 100644 (file)
index 7ef22e9..0000000
+++ /dev/null
@@ -1 +0,0 @@
-PASS
diff --git a/LayoutTests/fast/dom/beforeload/frame-before-load.html b/LayoutTests/fast/dom/beforeload/frame-before-load.html
deleted file mode 100644 (file)
index c129662..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<script src="resources/print.js"></script>
-</head>
-<body>
-<div id="console"></div>
-<script>
-if (window.testRunner) {
-    testRunner.dumpAsText();
-}
-</script>
-
-<iframe style="display:none" onbeforeload="print('PASS', 'green'); return event.url != 'http://www.daringfireball.net/';" onload="print('FAIL', 'red');" src="http://www.daringfireball.net/">
-</iframe>
-
-</body>
-</html>
diff --git a/LayoutTests/fast/dom/beforeload/image-before-load-expected.txt b/LayoutTests/fast/dom/beforeload/image-before-load-expected.txt
deleted file mode 100644 (file)
index 7ef22e9..0000000
+++ /dev/null
@@ -1 +0,0 @@
-PASS
diff --git a/LayoutTests/fast/dom/beforeload/image-before-load-innerHTML-expected.txt b/LayoutTests/fast/dom/beforeload/image-before-load-innerHTML-expected.txt
deleted file mode 100644 (file)
index aa44e7c..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-
-PASS
diff --git a/LayoutTests/fast/dom/beforeload/image-before-load-innerHTML.html b/LayoutTests/fast/dom/beforeload/image-before-load-innerHTML.html
deleted file mode 100644 (file)
index 5fc8b65..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-<html>
-<head>
-    <script src="resources/print.js"></script>
-    <script>
-        if (window.testRunner)
-            testRunner.dumpAsText();
-
-        document.addEventListener("beforeload", function(event) {
-            print("PASS", "green");
-            event.preventDefault();
-        }, true);
-        
-        document.addEventListener("load", function(event) {
-            print("FAIL", "red");
-        }, true);
-    </script>
-</head>
-<body>
-    <div id="target"></div>
-    <div id="console"></div>
-    <script>
-        document.getElementById("target").innerHTML = "<img src='../../images/resources/test-load.jpg'>";
-    </script>
-</body>
-</html>
diff --git a/LayoutTests/fast/dom/beforeload/image-before-load.html b/LayoutTests/fast/dom/beforeload/image-before-load.html
deleted file mode 100644 (file)
index e7fbb72..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<script src="resources/print.js"></script>
-</head>
-<body>
-<div id="console"></div>
-<script>
-if (window.testRunner) {
-    testRunner.dumpAsText();
-}
-</script>
-
-<img style="display:none" onbeforeload="print('PASS', 'green'); return false;" onload="print('FAIL', 'red');" src="../../images/resources/test-load.jpg">
-
-</body>
-</html>
diff --git a/LayoutTests/fast/dom/beforeload/image-object-before-load-expected.txt b/LayoutTests/fast/dom/beforeload/image-object-before-load-expected.txt
deleted file mode 100644 (file)
index 69cfc5a..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-PASS
-
diff --git a/LayoutTests/fast/dom/beforeload/image-object-before-load-innerHTML-expected.txt b/LayoutTests/fast/dom/beforeload/image-object-before-load-innerHTML-expected.txt
deleted file mode 100644 (file)
index 69cfc5a..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-PASS
-
diff --git a/LayoutTests/fast/dom/beforeload/image-object-before-load-innerHTML.html b/LayoutTests/fast/dom/beforeload/image-object-before-load-innerHTML.html
deleted file mode 100644 (file)
index 057e1d0..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-<html>
-<head>
-    <script src="resources/print.js"></script>
-    <script>
-        if (window.testRunner) {
-            testRunner.dumpAsText();
-            testRunner.waitUntilDone();
-        }
-
-        document.addEventListener("beforeload", function(event) {
-            event.preventDefault();
-        }, true);
-
-        function checkObject()
-        {
-            var style = getComputedStyle(document.getElementsByTagName("object")[0], null);
-            if (style.width != "auto" || style.height != "auto")
-                print("FAIL", "red");
-
-            if (window.testRunner)
-                testRunner.notifyDone();
-        }
-    </script>
-</head>
-<body onload="checkObject();">
-    <div id="target"></div>
-    <div id="console"></div>
-    <script>
-        document.getElementById("target").innerHTML = "<object data='../../images/resources/test-load.jpg'><span style='font-family:monospace; color:green'>PASS</span></object>";
-    </script>
-</body>
-</html>
diff --git a/LayoutTests/fast/dom/beforeload/image-object-before-load.html b/LayoutTests/fast/dom/beforeload/image-object-before-load.html
deleted file mode 100644 (file)
index 762691e..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-<html>
-<head>
-    <script src="resources/print.js"></script>
-    <script>
-        if (window.testRunner) {
-            testRunner.dumpAsText();
-            testRunner.waitUntilDone();
-        }
-
-        document.addEventListener("beforeload", function(event) {
-            event.preventDefault();
-        }, true);
-
-        function checkObject()
-        {
-            var style = getComputedStyle(document.getElementsByTagName("object")[0], null);
-            if (style.width != "auto" || style.height != "auto")
-                print("FAIL", "red");
-
-            if (window.testRunner)
-                testRunner.notifyDone();
-        }
-    </script>
-</head>
-<body onload="checkObject();">
-    <object data="../../images/resources/test-load.jpg">
-        <span style="font-family:monospace; color:green">PASS</span>
-    </object>
-    <div id="console"></div>
-</body>
-</html>
diff --git a/LayoutTests/fast/dom/beforeload/image-removed-during-before-load-expected.txt b/LayoutTests/fast/dom/beforeload/image-removed-during-before-load-expected.txt
deleted file mode 100644 (file)
index f0f682f..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-This test confirms that image loading properly handles a 'beforeload' events that removes the image from the document. It passes if no debug assertions are fired.
-
-PASS: Hit the beforeload handler
-PASS
-PASS: No assertions hit.
diff --git a/LayoutTests/fast/dom/beforeload/image-removed-during-before-load.html b/LayoutTests/fast/dom/beforeload/image-removed-during-before-load.html
deleted file mode 100644 (file)
index 21e80b9..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<script src="resources/print.js"></script>
-<script>
-function test()
-{
-    if (window.testRunner) {
-        testRunner.dumpAsText();
-        testRunner.waitUntilDone();
-    }
-
-       image = document.createElement("img");
-    image.setAttribute("style", "display:none");
-       image.addEventListener("load", function() {
-        print('PASS', 'green');
-    }, { once: true });
-       image.addEventListener("beforeload", function() {
-        print('PASS: Hit the beforeload handler', 'green');
-        document.body.removeChild(image);
-        image = null;
-               setTimeout(step2, 0);
-       }, { once: true });
-       
-       document.body.appendChild(image);
-
-       image.setAttribute("src", "../../images/resources/test-load.jpg");
-}
-
-function step2()
-{
-    print("PASS: No assertions hit.", "green");
-
-    if (window.testRunner)
-        testRunner.notifyDone();
-}
-</script>
-</head>
-<body onload="test()">
-<p>This test confirms that image loading properly handles a 'beforeload' events that removes the image from the document. It passes if no debug assertions are fired.</p>
-<div id="console"></div>
-</body>
-</html>
diff --git a/LayoutTests/fast/dom/beforeload/link-before-load-expected.txt b/LayoutTests/fast/dom/beforeload/link-before-load-expected.txt
deleted file mode 100644 (file)
index d9bd273..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-This page tests the beforeload event on link elements. You should see the word PASS below underneath a green square.
-
-PASS
diff --git a/LayoutTests/fast/dom/beforeload/link-before-load.html b/LayoutTests/fast/dom/beforeload/link-before-load.html
deleted file mode 100644 (file)
index 5f90e5a..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-<html>
-<head>
-<style>
-.block {
-  width: 100px;
-  height: 100px;
-  background-color: green;
-}
-</style>
-<link onbeforeload="return false" rel="stylesheet" href="resources/fail.css">
-<script src="resources/print.js"></script>
-<script>
-function test()
-{
-    if (window.testRunner)
-        testRunner.dumpAsText();
-
-    if (document.getElementById('block').offsetWidth == 100)
-        print("PASS", "green");
-    else
-        print("FAIL", "red");
-}
-</script>
-</head>
-<body onload="test()">
-<p>This page tests the beforeload event on link elements.  You should see the word PASS below underneath a green square.</p>
-<hr>
-<div id="block" class="block"></div>
-<hr>
-<div id="console"></div>
diff --git a/LayoutTests/fast/dom/beforeload/pi-before-load-expected.txt b/LayoutTests/fast/dom/beforeload/pi-before-load-expected.txt
deleted file mode 100644 (file)
index 7ef22e9..0000000
+++ /dev/null
@@ -1 +0,0 @@
-PASS
diff --git a/LayoutTests/fast/dom/beforeload/pi-before-load.xhtml b/LayoutTests/fast/dom/beforeload/pi-before-load.xhtml
deleted file mode 100644 (file)
index d23b55e..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<style>
-.block {
-  width: 100px;
-  height: 100px;
-  background-color: green;
-}
-</style>
-<script src="resources/print.js"></script>
-<script>
-function test()
-{
-    if (window.testRunner)
-        testRunner.dumpAsText();
-
-    if (document.getElementById('block').offsetWidth == 100)
-        print("PASS", "green");
-    else
-        print("FAIL", "red");
-}
-</script>
-</head>
-<body onload="test()">
-<div id="block" class="block"></div>
-<script>
-function beforeLoadFunc()
-{
-    event.preventDefault();
-}
-
-document.addEventListener("beforeload", beforeLoadFunc, true);
-
-var pi = document.createProcessingInstruction("xml-stylesheet", "type=\"text/css\" href=\"resources/fail.css\"");
-document.insertBefore(pi, document.documentElement);
-</script>
-<hr/>
-<div id="console"></div>
-</body>
-</html>
diff --git a/LayoutTests/fast/dom/beforeload/recursive-css-pi-before-load-expected.txt b/LayoutTests/fast/dom/beforeload/recursive-css-pi-before-load-expected.txt
deleted file mode 100644 (file)
index 78d0781..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-This test confirms that CSS stylesheets are properly handled if loaded during 'beforeload' events. It passes if no debug assertions are fired.
-
-PASS: No assertions hit.
-
diff --git a/LayoutTests/fast/dom/beforeload/recursive-css-pi-before-load.html b/LayoutTests/fast/dom/beforeload/recursive-css-pi-before-load.html
deleted file mode 100644 (file)
index 9462654..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-<!DOCTYPE html>\r
-<html lang="en">\r
-<head>\r
-<meta charset="utf-8"/>\r
-<meta http-equiv="pragma" content="no-cache"/>\r
-<meta http-equiv="expires" content="0"/>\r
-<script src="resources/print.js"></script>\r
-<script>\r
-function test()\r
-{\r
-    if (window.testRunner) {\r
-        testRunner.dumpAsText();\r
-        testRunner.waitUntilDone();\r
-    }\r
-\r
-       frame = document.createElement("iframe");\r
-       frame.setAttribute("src", "resources/content.xhtml");\r
-       frame.addEventListener("load", function(){\r
-               setTimeout(step2, 0);\r
-       }, { once: true });\r
-       \r
-       document.body.appendChild(frame);\r
-       \r
-       function step2(){\r
-               ins = 'href="pass.css" type="text/css"';\r
-               pi = frame.contentDocument.createProcessingInstruction('xml-stylesheet', ins);\r
-               pi.addEventListener("beforeload", function(){ pi.data = 'href="fail.css" type="text/css"'; }, { once: true });\r
-               frame.contentDocument.insertBefore(pi, frame.contentDocument.firstChild);\r
-               \r
-               frame.contentDocument.removeChild(pi);\r
-               pi = null;\r
-\r
-        print("PASS: No assertions hit.", "green");\r
-\r
-        if (window.testRunner)\r
-            testRunner.notifyDone();\r
-       }\r
-}\r
-</script>\r
-</head>\r
-<body onload="test()">\r
-<p>This test confirms that CSS stylesheets are properly handled if loaded during 'beforeload' events. It passes if no debug assertions are fired.</p>\r
-<div id="console"></div>\r
-</body>\r
-</html>\r
diff --git a/LayoutTests/fast/dom/beforeload/recursive-link-before-load-expected.txt b/LayoutTests/fast/dom/beforeload/recursive-link-before-load-expected.txt
deleted file mode 100644 (file)
index cb676da..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-This test confirms that link elements properly handled changes during 'beforeload' events. It passes if no debug assertions are fired.
-
-PASS: Beforeload handled.
-PASS: No assertions hit.
-
diff --git a/LayoutTests/fast/dom/beforeload/recursive-link-before-load.html b/LayoutTests/fast/dom/beforeload/recursive-link-before-load.html
deleted file mode 100644 (file)
index a60718a..0000000
+++ /dev/null
@@ -1,61 +0,0 @@
-<!DOCTYPE html>\r
-<html lang="en">\r
-<head>\r
-<meta charset="utf-8"/>\r
-<meta http-equiv="pragma" content="no-cache"/>\r
-<meta http-equiv="expires" content="0"/>\r
-<script src="resources/print.js"></script>\r
-<script>\r
-function test()\r
-{\r
-    if (window.testRunner) {\r
-        testRunner.dumpAsText();\r
-        testRunner.waitUntilDone();\r
-    }\r
-\r
-       frame = document.createElement("iframe");\r
-       frame.setAttribute("src", "resources/content.xhtml");\r
-       frame.addEventListener("load", function(){\r
-               setTimeout(step2, 0);\r
-       }, { once: true });\r
-       \r
-       document.body.appendChild(frame);\r
-\r
-    var link;\r
-    var head;\r
-\r
-       function step2() {\r
-        head = frame.contentDocument.getElementsByTagName('head')[0];\r
-\r
-               link = frame.contentDocument.createElement('link');\r
-        link.type = 'text/css';\r
-        link.rel = 'stylesheet';\r
-    \r
-               link.addEventListener("beforeload", function() {\r
-            print("PASS: Beforeload handled.", "green");\r
-            link.href = 'fail.css';\r
-            setTimeout(step3, 0);\r
-        }, { once: true });\r
-\r
-        link.href = 'pass.css';\r
-\r
-        head.appendChild(link);\r
-       }\r
-\r
-    function step3() {         \r
-               head.removeChild(link);\r
-               link = null;\r
-\r
-        print("PASS: No assertions hit.", "green");\r
-\r
-        if (window.testRunner)\r
-            testRunner.notifyDone();\r
-    }\r
-}\r
-</script>\r
-</head>\r
-<body onload="test()">\r
-<p>This test confirms that link elements properly handled changes during 'beforeload' events. It passes if no debug assertions are fired.</p>\r
-<div id="console"></div>\r
-</body>\r
-</html>\r
diff --git a/LayoutTests/fast/dom/beforeload/recursive-xsl-pi-before-load-expected.txt b/LayoutTests/fast/dom/beforeload/recursive-xsl-pi-before-load-expected.txt
deleted file mode 100644 (file)
index 5888e38..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-This test confirms that XSL stylesheets are properly handled if loaded during 'beforeload' events. It passes if no debug assertions are fired.
-
-PASS: No assertions hit.
-
diff --git a/LayoutTests/fast/dom/beforeload/recursive-xsl-pi-before-load.html b/LayoutTests/fast/dom/beforeload/recursive-xsl-pi-before-load.html
deleted file mode 100644 (file)
index 6708208..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-<!DOCTYPE html>\r
-<html lang="en">\r
-<head>\r
-<meta charset="utf-8"/>\r
-<meta http-equiv="pragma" content="no-cache"/>\r
-<meta http-equiv="expires" content="0"/>\r
-<script src="resources/print.js"></script>\r
-<script>\r
-function test()\r
-{\r
-    if (window.testRunner) {\r
-        testRunner.dumpAsText();\r
-        testRunner.waitUntilDone();\r
-    }\r
-\r
-       frame = document.createElement("iframe");\r
-       frame.setAttribute("src", "resources/content.xhtml");\r
-       frame.addEventListener("load", function(){\r
-               setTimeout(step2, 0);\r
-       }, { once: true });\r
-       \r
-       document.body.appendChild(frame);\r
-       \r
-       function step2(){\r
-               ins = 'href="test.xsl?a=1" type="text/xsl"';\r
-               pi = frame.contentDocument.createProcessingInstruction('xml-stylesheet', ins);\r
-               pi.addEventListener("beforeload", function(){ pi.data = 'href="test.xsl?b=1" type="text/xsl"'; }, { once: true });\r
-               frame.contentDocument.insertBefore(pi, frame.contentDocument.firstChild);\r
-               \r
-               frame.contentDocument.removeChild(pi);\r
-               pi = null;\r
-\r
-        print("PASS: No assertions hit.", "green");\r
-\r
-        if (window.testRunner)\r
-            testRunner.notifyDone();\r
-       }\r
-}\r
-</script>\r
-</head>\r
-<body onload="test()">\r
-<p>This test confirms that XSL stylesheets are properly handled if loaded during 'beforeload' events. It passes if no debug assertions are fired.</p>\r
-<div id="console"></div>\r
-</body>\r
-</html>\r
diff --git a/LayoutTests/fast/dom/beforeload/remove-bad-object-in-beforeload-listener-expected.txt b/LayoutTests/fast/dom/beforeload/remove-bad-object-in-beforeload-listener-expected.txt
deleted file mode 100644 (file)
index 9a44ddc..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-This page tests that you can correctly remove an object element with an invalid data URL in its beforeload listener without causing a crash.
-
-PASS
diff --git a/LayoutTests/fast/dom/beforeload/remove-bad-object-in-beforeload-listener.html b/LayoutTests/fast/dom/beforeload/remove-bad-object-in-beforeload-listener.html
deleted file mode 100644 (file)
index da1bbaf..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-<html>
-<head>
-    <script src="resources/print.js"></script>
-    <script>
-        if (window.testRunner) {
-            testRunner.dumpAsText();
-            testRunner.waitUntilDone();
-        }
-        
-        var count = 0;
-        var maxCount = 10;
-        var timeout = 100;
-
-        document.addEventListener("beforeload", function(event) {
-            if (event.target && event.target.parentElement)
-                event.target.parentElement.removeChild(event.target);
-        }, true);
-    </script>
-</head>
-<body>
-    <p>This page tests that you can correctly remove an object element with an invalid data URL in its beforeload listener without causing a crash.</p>
-    <object data="does-not-exist.png">FAIL</object>
-    <object data="does-not-exist">FAIL</object>
-    <div id="console"></div>
-    <script>
-        function checkObjectRemoval()
-        {
-            if (!document.getElementsByTagName("object").length) {
-                print("PASS", "green");
-                if (window.testRunner)
-                    testRunner.notifyDone();
-                return;
-            }
-            
-            if (++count > maxCount) {
-                print("FAIL", "red");
-                if (window.testRunner)
-                    testRunner.notifyDone();
-                return;
-            }
-            
-            setTimeout("checkObjectRemoval()", timeout);
-        }
-        
-        setTimeout("checkObjectRemoval()", timeout);
-    </script>
-</body>
-</html>
-
diff --git a/LayoutTests/fast/dom/beforeload/remove-flash-in-beforeload-listener-expected.txt b/LayoutTests/fast/dom/beforeload/remove-flash-in-beforeload-listener-expected.txt
deleted file mode 100644 (file)
index dc83c9c..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-This page tests that you can correctly remove a flash object in a beforeload listener without causing a crash.
-
-PASS
diff --git a/LayoutTests/fast/dom/beforeload/remove-flash-in-beforeload-listener.html b/LayoutTests/fast/dom/beforeload/remove-flash-in-beforeload-listener.html
deleted file mode 100644 (file)
index 4e07380..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-<html>
-<head>
-    <script src="resources/print.js"></script>
-    <script>
-        if (window.testRunner) {
-            testRunner.dumpAsText();
-            testRunner.waitUntilDone();
-        }
-        
-        var count = 0;
-        var maxCount = 10;
-        var timeout = 100;
-
-        document.addEventListener("beforeload", function(event) {
-            if (event.target && event.target.parentElement)
-                event.target.parentElement.removeChild(event.target);
-        }, true);
-    </script>
-</head>
-<body>
-    <p>This page tests that you can correctly remove a flash object in a beforeload listener without causing a crash.</p>
-    <object type="application/x-shockwave-flash" data="../../../plugins/resources/simple_blank.swf"></object>
-    <embed type="application/x-shockwave-flash" src="../../../plugins/resources/simple_blank.swf"></object>
-    <div id="console"></div>
-    <script>
-        function checkObjectRemoval()
-        {
-            if (!document.getElementsByTagName("object").length) {
-                print("PASS", "green");
-                if (window.testRunner)
-                    testRunner.notifyDone();
-                return;
-            }
-            
-            if (++count > maxCount) {
-                print("FAIL", "red");
-                if (window.testRunner)
-                    testRunner.notifyDone();
-                return;
-            }
-            
-            setTimeout("checkObjectRemoval()", timeout);
-        }
-        
-        setTimeout("checkObjectRemoval()", timeout);
-    </script>
-</body>
-</html>
diff --git a/LayoutTests/fast/dom/beforeload/remove-frame-in-beforeload-listener-expected.txt b/LayoutTests/fast/dom/beforeload/remove-frame-in-beforeload-listener-expected.txt
deleted file mode 100644 (file)
index aebdcc4..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-This page tests that you can correctly remove an iframe element in its beforeload listener without causing a crash.
-
-PASS
diff --git a/LayoutTests/fast/dom/beforeload/remove-frame-in-beforeload-listener.html b/LayoutTests/fast/dom/beforeload/remove-frame-in-beforeload-listener.html
deleted file mode 100644 (file)
index f22518e..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-<html>
-<head>
-    <script src="resources/print.js"></script>
-    <script>
-        if (window.testRunner)
-            testRunner.dumpAsText();
-
-        document.addEventListener("beforeload", function(event) {
-            if (event.target && event.target.parentElement)
-                event.target.parentElement.removeChild(event.target);
-                // Note, we intentionally do not cancel the load here,
-                // WebCore should automatically cancel it.
-                // Otherwise DRT will print:
-                // Blocked access to external URL http://webkit.org/
-        }, true);
-    </script>
-</head>
-<body>
-    <p>This page tests that you can correctly remove an iframe element in its beforeload listener without causing a crash.</p>
-    <iframe src="http://webkit.org"></iframe>
-    <div id="console"></div>
-    <script>
-        if (document.getElementsByTagName("iframe").length)
-            print("FAIL", "red");
-        else
-            print("PASS", "green");
-    </script>
-</body>
-</html>
diff --git a/LayoutTests/fast/dom/beforeload/remove-image-in-beforeload-listener-expected.txt b/LayoutTests/fast/dom/beforeload/remove-image-in-beforeload-listener-expected.txt
deleted file mode 100644 (file)
index abc0aa7..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-This page tests that you can correctly remove an img object in a beforeload listener without causing a crash.
-
-PASS
diff --git a/LayoutTests/fast/dom/beforeload/remove-image-in-beforeload-listener.html b/LayoutTests/fast/dom/beforeload/remove-image-in-beforeload-listener.html
deleted file mode 100644 (file)
index 2134a85..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-<html>
-<head>
-    <script src="resources/print.js"></script>
-    <script>
-        if (window.testRunner) {
-            testRunner.dumpAsText();
-            testRunner.waitUntilDone();
-        }
-        
-        var count = 0;
-        var maxCount = 10;
-        var timeout = 100;
-
-        document.addEventListener("beforeload", function(event) {
-            if (event.target && event.target.parentElement)
-                event.target.parentElement.removeChild(event.target);
-        }, true);
-    </script>
-</head>
-<body>
-    <p>This page tests that you can correctly remove an img object in a beforeload listener without causing a crash.</p>
-    <img src="../../images/resources/test-load.jpg">
-    <div id="console"></div>
-    <script>
-        function checkObjectRemoval()
-        {
-            if (!document.getElementsByTagName("img").length) {
-                print("PASS", "green");
-                if (window.testRunner)
-                    testRunner.notifyDone();
-                return;
-            }
-            
-            if (++count > maxCount) {
-                print("FAIL", "red");
-                if (window.testRunner)
-                    testRunner.notifyDone();
-                return;
-            }
-            
-            setTimeout("checkObjectRemoval()", timeout);
-        }
-        
-        setTimeout("checkObjectRemoval()", timeout);
-    </script>
-</body>
-</html>
diff --git a/LayoutTests/fast/dom/beforeload/remove-link-in-beforeload-listener-expected.txt b/LayoutTests/fast/dom/beforeload/remove-link-in-beforeload-listener-expected.txt
deleted file mode 100644 (file)
index 9a70826..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-This page tests that you can correctly remove a stylesheet link element in its beforeload listener without causing a crash.
-
-PASS
diff --git a/LayoutTests/fast/dom/beforeload/remove-link-in-beforeload-listener.html b/LayoutTests/fast/dom/beforeload/remove-link-in-beforeload-listener.html
deleted file mode 100644 (file)
index 10f59a6..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-<html>
-<head>
-    <script src="resources/print.js"></script>
-    <script>
-        if (window.testRunner)
-            testRunner.dumpAsText();
-
-        document.addEventListener("beforeload", function(event) {
-            event.target.parentElement.removeChild(event.target);
-        }, true);
-    </script>
-    <link rel="stylesheet" href="data:text/css">
-</head>
-<body>
-    <p>This page tests that you can correctly remove a stylesheet link element in its beforeload listener without causing a crash.</p>
-    <div id="console"></div>
-    <script>
-        if (document.getElementsByTagName("link").length)
-            print("FAIL", "red");
-        else
-            print("PASS", "green");
-    </script>
-</body>
-</html>
-
diff --git a/LayoutTests/fast/dom/beforeload/remove-script-in-beforeload-listener-expected.txt b/LayoutTests/fast/dom/beforeload/remove-script-in-beforeload-listener-expected.txt
deleted file mode 100644 (file)
index 51192bc..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-This page tests that you can correctly remove a script element in its beforeload listener without causing a crash.
-
-PASS
diff --git a/LayoutTests/fast/dom/beforeload/remove-script-in-beforeload-listener.html b/LayoutTests/fast/dom/beforeload/remove-script-in-beforeload-listener.html
deleted file mode 100644 (file)
index 4bf8809..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-<html>
-<head>
-    <script src="resources/print.js"></script>
-    <script>
-        if (window.testRunner)
-            testRunner.dumpAsText();
-
-        document.addEventListener("beforeload", function(event) {
-            var scriptElement = document.getElementById("toremove");
-            if (scriptElement) {
-                scriptElement.parentElement.removeChild(scriptElement);
-                event.preventDefault();
-            }
-        }, true);
-    </script>
-</head>
-<body>
-    <p>This page tests that you can correctly remove a script element in its beforeload listener without causing a crash.</p>
-    <script id="toremove" src="resources/fail.js"></script>
-    <div id="console"></div>
-    <script>
-        if (document.getElementById("toremove"))
-            print("FAIL", "red");
-        else
-            print("PASS", "green");
-    </script>
-</body>
-</html>
diff --git a/LayoutTests/fast/dom/beforeload/remove-video-in-beforeload-listener-expected.txt b/LayoutTests/fast/dom/beforeload/remove-video-in-beforeload-listener-expected.txt
deleted file mode 100644 (file)
index 48316fa..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-This page tests that you can correctly remove a video object in a beforeload listener without causing a crash.
-
-PASS
diff --git a/LayoutTests/fast/dom/beforeload/remove-video-in-beforeload-listener.html b/LayoutTests/fast/dom/beforeload/remove-video-in-beforeload-listener.html
deleted file mode 100644 (file)
index 5c6adc8..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-<html>
-<head>
-    <script src="resources/print.js"></script>
-    <script>
-        if (window.testRunner) {
-            testRunner.dumpAsText();
-            testRunner.waitUntilDone();
-        }
-        
-        var count = 0;
-        var maxCount = 10;
-        var timeout = 100;
-
-        document.addEventListener("beforeload", function(event) {
-            if (event.target && event.target.parentElement)
-                event.target.parentElement.removeChild(event.target);
-        }, true);
-    </script>
-</head>
-<body>
-    <p>This page tests that you can correctly remove a video object in a beforeload listener without causing a crash.</p>
-    <video src="../../../media/content/test.mp4"></video>
-    <div id="console"></div>
-    <script>
-        function checkObjectRemoval()
-        {
-            if (!document.getElementsByTagName("video").length) {
-                print("PASS", "green");
-                if (window.testRunner)
-                    testRunner.notifyDone();
-                return;
-            }
-            
-            if (++count > maxCount) {
-                print("FAIL", "red");
-                if (window.testRunner)
-                    testRunner.notifyDone();
-                return;
-            }
-            
-            setTimeout("checkObjectRemoval()", timeout);
-        }
-        
-        setTimeout("checkObjectRemoval()", timeout);
-    </script>
-</body>
-</html>
diff --git a/LayoutTests/fast/dom/beforeload/remove-video-poster-in-beforeload-listener-expected.txt b/LayoutTests/fast/dom/beforeload/remove-video-poster-in-beforeload-listener-expected.txt
deleted file mode 100644 (file)
index 9b5538a..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-This page tests that you can correctly remove a video object with a poster in a beforeload listener without causing a crash.
-
-PASS
diff --git a/LayoutTests/fast/dom/beforeload/remove-video-poster-in-beforeload-listener.html b/LayoutTests/fast/dom/beforeload/remove-video-poster-in-beforeload-listener.html
deleted file mode 100644 (file)
index 48b298b..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-<html>
-<head>
-    <script src="resources/print.js"></script>
-    <script>
-        if (window.testRunner) {
-            testRunner.dumpAsText();
-            testRunner.waitUntilDone();
-        }
-        
-        var count = 0;
-        var maxCount = 10;
-        var timeout = 100;
-
-        document.addEventListener("beforeload", function(event) {
-            event.target.parentElement.removeChild(event.target);
-        }, true);
-    </script>
-</head>
-<body>
-    <p>This page tests that you can correctly remove a video object with a poster in a beforeload listener without causing a crash.</p>
-    <div id="console"></div>
-    <script>
-        function checkObjectRemoval()
-        {
-            if (!document.getElementsByTagName("video").length) {
-                print("PASS", "green");
-                if (window.testRunner)
-                    testRunner.notifyDone();
-                return;
-            }
-            
-            if (++count > maxCount) {
-                print("FAIL", "red");
-                if (window.testRunner)
-                    testRunner.notifyDone();
-                return;
-            }
-            
-            setTimeout("checkObjectRemoval()", timeout);
-        }
-        
-        setTimeout("checkObjectRemoval()", timeout);
-    </script>
-    <video poster="../resources/abe.png">>><source>>>
-</body>
-</html>
diff --git a/LayoutTests/fast/dom/beforeload/resources/content.xhtml b/LayoutTests/fast/dom/beforeload/resources/content.xhtml
deleted file mode 100644 (file)
index 20aee04..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">\r
-<html xmlns="http://www.w3.org/1999/xhtml">\r
-<head>\r
-</head>\r
-<body>\r
-hi\r
-</body>\r
-</html>\r
diff --git a/LayoutTests/fast/dom/beforeload/resources/fail.css b/LayoutTests/fast/dom/beforeload/resources/fail.css
deleted file mode 100644 (file)
index 1a5960a..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-.block {
-  background-color:red !important;
-  width: 200px !important;
-  height:200px !important;
-}
diff --git a/LayoutTests/fast/dom/beforeload/resources/fail.js b/LayoutTests/fast/dom/beforeload/resources/fail.js
deleted file mode 100644 (file)
index 6ba1fba..0000000
+++ /dev/null
@@ -1 +0,0 @@
-print('FAIL', 'red');
diff --git a/LayoutTests/fast/dom/beforeload/resources/pass.css b/LayoutTests/fast/dom/beforeload/resources/pass.css
deleted file mode 100644 (file)
index 5b030cc..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-.block {
-  width: 100px;
-  height: 100px;
-  background-color: green;
-}
diff --git a/LayoutTests/fast/dom/beforeload/resources/print.js b/LayoutTests/fast/dom/beforeload/resources/print.js
deleted file mode 100644 (file)
index 8b5dfe2..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-function print(message, color) 
-{
-    var paragraph = document.createElement("div");
-    paragraph.appendChild(document.createTextNode(message));
-    paragraph.style.fontFamily = "monospace";
-    if (color)
-        paragraph.style.color = color;
-    document.getElementById("console").appendChild(paragraph);
-}
diff --git a/LayoutTests/fast/dom/beforeload/resources/test.xsl b/LayoutTests/fast/dom/beforeload/resources/test.xsl
deleted file mode 100644 (file)
index e01f281..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-<?xml version="1.0"?>\r
-<xsl:stylesheet version="1.0"\r
-       xmlns:xsl="http://www.w3.org/1999/XSL/Transform">\r
-       <xsl:output method="html"/>     \r
-       <xsl:template match="/">\r
-       <html>\r
-       <head>\r
-       </head>\r
-       <body>\r
-           Test\r
-       </body>\r
-       </html>\r
-       </xsl:template>\r
-</xsl:stylesheet>\r
diff --git a/LayoutTests/fast/dom/beforeload/script-before-load-dynamic-expected.txt b/LayoutTests/fast/dom/beforeload/script-before-load-dynamic-expected.txt
deleted file mode 100644 (file)
index 9a796b1..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-This page tests the beforeload event on script elements. You should see a PASS message below if everything works.
-
-PASS
diff --git a/LayoutTests/fast/dom/beforeload/script-before-load-dynamic.html b/LayoutTests/fast/dom/beforeload/script-before-load-dynamic.html
deleted file mode 100644 (file)
index fc0579d..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-<html>
-<head>
-<script src="resources/print.js"></script>
-</head>
-
-<body>
-<p>This page tests the beforeload event on script elements.  You should see a PASS message below if everything
-works.</p>
-<hr>
-<div id='console'></div>
-
-<script>
-if (window.testRunner)
-    testRunner.dumpAsText();
-    
-function beforeLoadFunc()
-{
-    print("PASS", "green");
-    event.preventDefault();
-}
-
-document.body.addEventListener("beforeload", beforeLoadFunc, true);
-var elt = document.createElement("script");
-elt.setAttribute("src", "resources/fail.js");
-document.body.appendChild(elt);
-</script>
-
-</body>
-</html>
diff --git a/LayoutTests/fast/dom/beforeload/script-before-load-expected.txt b/LayoutTests/fast/dom/beforeload/script-before-load-expected.txt
deleted file mode 100644 (file)
index 9a796b1..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-This page tests the beforeload event on script elements. You should see a PASS message below if everything works.
-
-PASS
diff --git a/LayoutTests/fast/dom/beforeload/script-before-load-xhtml-expected.txt b/LayoutTests/fast/dom/beforeload/script-before-load-xhtml-expected.txt
deleted file mode 100644 (file)
index 9a796b1..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-This page tests the beforeload event on script elements. You should see a PASS message below if everything works.
-
-PASS
diff --git a/LayoutTests/fast/dom/beforeload/script-before-load-xhtml.xhtml b/LayoutTests/fast/dom/beforeload/script-before-load-xhtml.xhtml
deleted file mode 100644 (file)
index 60ebe00..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<script src="resources/print.js"></script>
-</head>
-
-<body>
-<p>This page tests the beforeload event on script elements.  You should see a PASS message below if everything
-works.</p>
-<hr/>
-<div id="console"></div>
-
-<script>
-if (window.testRunner)
-    testRunner.dumpAsText();
-    
-function beforeLoadFunc()
-{
-    print("PASS", "green");
-    event.preventDefault();
-}
-
-document.body.addEventListener("beforeload", beforeLoadFunc, true);
-</script>
-<script src="resources/fail.js"></script>
-
-</body>
-</html>
diff --git a/LayoutTests/fast/dom/beforeload/script-before-load.html b/LayoutTests/fast/dom/beforeload/script-before-load.html
deleted file mode 100644 (file)
index 35fd47f..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-<html>
-<head>
-<script src="resources/print.js"></script>
-</head>
-
-<body>
-<p>This page tests the beforeload event on script elements.  You should see a PASS message below if everything
-works.</p>
-<hr>
-<div id='console'></div>
-<script>
-if (window.testRunner)
-    testRunner.dumpAsText();
-</script>
-<script onbeforeload="print('PASS', 'green'); return false" src="resources/fail.js"></script>
-</body>
-</html>
diff --git a/LayoutTests/fast/dom/beforeload/video-before-load-expected.txt b/LayoutTests/fast/dom/beforeload/video-before-load-expected.txt
deleted file mode 100644 (file)
index 69cfc5a..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-PASS
-
diff --git a/LayoutTests/fast/dom/beforeload/video-before-load.html b/LayoutTests/fast/dom/beforeload/video-before-load.html
deleted file mode 100644 (file)
index 9ab7ef3..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<script src="resources/print.js"></script>
-</head>
-<body>
-<div id="console"></div>
-<script>
-if (window.testRunner) {
-    testRunner.dumpAsText();
-    testRunner.waitUntilDone();
-}
-</script>
-
-<video src="../../../media/content/test.mp4" onbeforeload="print('PASS', 'green'); if (window.testRunner) window.testRunner.notifyDone(); return false;" onload="print('FAIL', 'red'); if (window.testRunner) window.testRunner.notifyDone();"></video>
-
-</body>
-</html>
diff --git a/LayoutTests/fast/events/constructors/before-load-event-constructor-expected.txt b/LayoutTests/fast/events/constructors/before-load-event-constructor-expected.txt
deleted file mode 100644 (file)
index ad26d26..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-This tests the constructor for the BeforeLoadEvent DOM class.
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-
-PASS new BeforeLoadEvent('eventType').bubbles is false
-PASS new BeforeLoadEvent('eventType').cancelable is false
-PASS new BeforeLoadEvent('eventType').url is ""
-PASS new BeforeLoadEvent('eventType', { bubbles: false }).bubbles is false
-PASS new BeforeLoadEvent('eventType', { bubbles: true }).bubbles is true
-PASS new BeforeLoadEvent('eventType', { cancelable: false }).cancelable is false
-PASS new BeforeLoadEvent('eventType', { cancelable: true }).cancelable is true
-PASS new BeforeLoadEvent('eventType', { url: 'doremi' }).url is "doremi"
-PASS new BeforeLoadEvent('eventType', { url: '' }).url is ""
-PASS new BeforeLoadEvent('eventType', { url: undefined }).url is ""
-PASS new BeforeLoadEvent('eventType', { url: null }).url is "null"
-PASS new BeforeLoadEvent('eventType', { url: false }).url is "false"
-PASS new BeforeLoadEvent('eventType', { url: true }).url is "true"
-PASS new BeforeLoadEvent('eventType', { url: 12345 }).url is "12345"
-PASS new BeforeLoadEvent('eventType', { url: 18446744073709551615 }).url is "18446744073709552000"
-PASS new BeforeLoadEvent('eventType', { url: NaN }).url is "NaN"
-PASS new BeforeLoadEvent('eventType', { url: [] }).url is ""
-PASS new BeforeLoadEvent('eventType', { url: [1, 2, 3] }).url is "1,2,3"
-PASS new BeforeLoadEvent('eventType', { url: {doremi: 12345} }).url is "[object Object]"
-PASS new BeforeLoadEvent('eventType', { url: {valueOf: function () { return 'doremi'; } } }).url is "[object Object]"
-PASS new BeforeLoadEvent('eventType', { bubbles: true, cancelable: true, url: 'doremi' }).bubbles is true
-PASS new BeforeLoadEvent('eventType', { bubbles: true, cancelable: true, url: 'doremi' }).cancelable is true
-PASS new BeforeLoadEvent('eventType', { bubbles: true, cancelable: true, url: 'doremi' }).url is 'doremi'
-PASS successfullyParsed is true
-
-TEST COMPLETE
-
diff --git a/LayoutTests/fast/events/constructors/before-load-event-constructor.html b/LayoutTests/fast/events/constructors/before-load-event-constructor.html
deleted file mode 100644 (file)
index 71c8045..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-<script src="../../../resources/js-test-pre.js"></script>
-</head>
-<body>
-<p id="description"></p>
-<div id="console"></div>
-<script>
-
-description("This tests the constructor for the BeforeLoadEvent DOM class.");
-
-// No initializer is passed.
-shouldBe("new BeforeLoadEvent('eventType').bubbles", "false");
-shouldBe("new BeforeLoadEvent('eventType').cancelable", "false");
-shouldBeEqualToString("new BeforeLoadEvent('eventType').url", "");
-
-// bubbles is passed.
-shouldBe("new BeforeLoadEvent('eventType', { bubbles: false }).bubbles", "false");
-shouldBe("new BeforeLoadEvent('eventType', { bubbles: true }).bubbles", "true");
-
-// cancelable is passed.
-shouldBe("new BeforeLoadEvent('eventType', { cancelable: false }).cancelable", "false");
-shouldBe("new BeforeLoadEvent('eventType', { cancelable: true }).cancelable", "true");
-
-// url is passed.
-// Strings.
-shouldBeEqualToString("new BeforeLoadEvent('eventType', { url: 'doremi' }).url", "doremi");
-shouldBeEqualToString("new BeforeLoadEvent('eventType', { url: '' }).url", "");
-
-// Non-strings.
-shouldBeEqualToString("new BeforeLoadEvent('eventType', { url: undefined }).url", "");
-shouldBeEqualToString("new BeforeLoadEvent('eventType', { url: null }).url", "null");
-shouldBeEqualToString("new BeforeLoadEvent('eventType', { url: false }).url", "false");
-shouldBeEqualToString("new BeforeLoadEvent('eventType', { url: true }).url", "true");
-shouldBeEqualToString("new BeforeLoadEvent('eventType', { url: 12345 }).url", "12345");
-shouldBeEqualToString("new BeforeLoadEvent('eventType', { url: 18446744073709551615 }).url", "18446744073709552000");
-shouldBeEqualToString("new BeforeLoadEvent('eventType', { url: NaN }).url", "NaN");
-shouldBeEqualToString("new BeforeLoadEvent('eventType', { url: [] }).url", "");
-shouldBeEqualToString("new BeforeLoadEvent('eventType', { url: [1, 2, 3] }).url", "1,2,3");
-shouldBeEqualToString("new BeforeLoadEvent('eventType', { url: {doremi: 12345} }).url", "[object Object]");
-shouldBeEqualToString("new BeforeLoadEvent('eventType', { url: {valueOf: function () { return 'doremi'; } } }).url", "[object Object]");
-
-// All initializers are passed.
-shouldBe("new BeforeLoadEvent('eventType', { bubbles: true, cancelable: true, url: 'doremi' }).bubbles", "true");
-shouldBe("new BeforeLoadEvent('eventType', { bubbles: true, cancelable: true, url: 'doremi' }).cancelable", "true");
-shouldBe("new BeforeLoadEvent('eventType', { bubbles: true, cancelable: true, url: 'doremi' }).url", "'doremi'");
-</script>
-<script src="../../../resources/js-test-post.js"></script>
-</body>
-</html>
index 4d5ea39..8254e06 100644 (file)
@@ -3,7 +3,6 @@ Test that setting event handlers with attribute works.
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
-cancelled onbeforeload async
 PASS /*img*/ typeof (element["onclick"]) is "function"
 PASS /*img*/ typeof (element["oncontextmenu"]) is "function"
 PASS /*img*/ typeof (element["ondblclick"]) is "function"
diff --git a/LayoutTests/fast/events/event-handler-regions-layout-expected.txt b/LayoutTests/fast/events/event-handler-regions-layout-expected.txt
deleted file mode 100644 (file)
index efe8f10..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-This test should not assert in debug builds.
-
-  
diff --git a/LayoutTests/fast/events/event-handler-regions-layout.html b/LayoutTests/fast/events/event-handler-regions-layout.html
deleted file mode 100644 (file)
index 01ddd5c..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-    <script>
-    if (window.testRunner) {
-        testRunner.dumpAsText();
-        testRunner.waitUntilDone();
-    }
-
-    function doTest()
-    {
-        var iframe = document.getElementById('iframe');
-        var frameDocElement = iframe.contentDocument.documentElement;
-        frameDocElement.innerHTML = '<object></object>';
-        frameDocElement.addEventListener('beforeload', frameBeforeLoad, true);
-        frameDocElement.offsetWidth;
-    }
-    
-    function frameBeforeLoad()
-    {
-        var wrapper = document.getElementById('wrapper');
-        document.getElementById('destination_frame').contentDocument.body.appendChild(wrapper);
-
-        if (window.testRunner)
-            testRunner.notifyDone();
-    }
-
-    window.addEventListener('load', doTest, false);
-    </script>
-</head>
-<body>
-    <p>This test should not assert in debug builds.</p>
-    <iframe id='iframe'></iframe>
-    <iframe id='destination_frame' srcdoc="<body>Test</body>"></iframe>
-    <div id="wrapper">
-        <div id="wheelie">wheel handler</div>
-    </div>
-</div>
-<script>
-    document.getElementById('wheelie').addEventListener('mousewheel', function(e) { });
-</script>
-</body>
-</html>
diff --git a/LayoutTests/fast/frames/didBecomeCurrentDocumentInFrame-crash-expected.txt b/LayoutTests/fast/frames/didBecomeCurrentDocumentInFrame-crash-expected.txt
new file mode 100644 (file)
index 0000000..07a6454
--- /dev/null
@@ -0,0 +1,12 @@
+layer at (0,0) size 800x600
+  RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  RenderBlock {HTML} at (0,0) size 800x600
+    RenderBody {BODY} at (8,8) size 784x584
+      RenderBlock {P} at (0,0) size 784x18
+        RenderText {#text} at (0,0) size 226x18
+          text run at (0,0) width 226: "This test passes if it does not crash."
+      RenderBlock {PRE} at (0,34) size 784x0
+      RenderBlock (anonymous) at (0,34) size 784x150
+        RenderEmbeddedObject {OBJECT} at (0,0) size 300x150
+        RenderText {#text} at (0,0) size 0x0
diff --git a/LayoutTests/fast/frames/didBecomeCurrentDocumentInFrame-crash.html b/LayoutTests/fast/frames/didBecomeCurrentDocumentInFrame-crash.html
new file mode 100644 (file)
index 0000000..b762a08
--- /dev/null
@@ -0,0 +1,18 @@
+<html>\r
+<head>\r
+<script>\r
+function runTest() {\r
+       paramElement.appendChild(document.createElement("frame"));\r
+       objectElement.onbeforeload = () => { preElement.remove(); }\r
+       preElement.appendChild(paramElement);\r
+}\r
+</script>\r
+</head>\r
+<body onload="runTest()">\r
+<p>This test passes if it does not crash.</p>\r
+<pre id="preElement"></pre>\r
+<object id="objectElement">\r
+<param id="paramElement"></param>\r
+</object>\r
+</body>\r
+</html>\r
diff --git a/LayoutTests/fast/html/link-element-removal-during-beforeload-expected.txt b/LayoutTests/fast/html/link-element-removal-during-beforeload-expected.txt
deleted file mode 100644 (file)
index e3081a9..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-CONSOLE MESSAGE: ReferenceError: Can't find variable: runTest
-This tests removing a node during beforeload event.
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-
-PASS document.getElementById("link") is exitingLink
-PASS successfullyParsed is true
-
-TEST COMPLETE
-
diff --git a/LayoutTests/fast/html/link-element-removal-during-beforeload.html b/LayoutTests/fast/html/link-element-removal-during-beforeload.html
deleted file mode 100644 (file)
index 85f0202..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-<!DOCTYPE html>
-<html>
-<body onload="runTest()">
-<div id="container"></div>
-<div id="child"></div>
-<div><link id="link"></div>
-<script src="../../resources/js-test-pre.js"></script>
-<script>
-
-description('This tests removing a node during beforeload event.');
-
-var exitingLink = document.querySelector('link');
-var newLink = document.createElement("link");
-newLink.innerHTML = '<link id="link">';
-
-var child = document.getElementById('child');
-child.appendChild(newLink);
-newLink.addEventListener('beforeload', () => {
-    document.getElementById("link").remove();
-});
-
-document.getElementById('container').appendChild(child);
-
-shouldBe('document.getElementById("link")', 'exitingLink');
-
-</script>
-<script src="../../resources/js-test-post.js"></script>
\ No newline at end of file
diff --git a/LayoutTests/fast/parser/document-write-fighting-eof-expected.txt b/LayoutTests/fast/parser/document-write-fighting-eof-expected.txt
deleted file mode 100644 (file)
index 7ef22e9..0000000
+++ /dev/null
@@ -1 +0,0 @@
-PASS
diff --git a/LayoutTests/fast/parser/document-write-fighting-eof.html b/LayoutTests/fast/parser/document-write-fighting-eof.html
deleted file mode 100644 (file)
index c1f7029..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-<script>
-if (window.testRunner)
-    testRunner.dumpAsText();
-</script>
-PA<script onbeforeload="document.write('<span')" src="data:text/javascript,document.write('')"></script>
->SS
diff --git a/LayoutTests/fast/parser/document-write-partial-entity-before-load-expected.txt b/LayoutTests/fast/parser/document-write-partial-entity-before-load-expected.txt
deleted file mode 100644 (file)
index 7ef22e9..0000000
+++ /dev/null
@@ -1 +0,0 @@
-PASS
diff --git a/LayoutTests/fast/parser/document-write-partial-entity-before-load.html b/LayoutTests/fast/parser/document-write-partial-entity-before-load.html
deleted file mode 100644 (file)
index f2be967..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-<script>
-if (window.testRunner)
-       testRunner.dumpAsText();
-</script>
-<div id="test"><script onbeforeload="document.write('&')" src="data:text/javascript,document.write('g');"></script>t;</div>
-<script>
-var testDiv = document.getElementById("test");
-testDiv.textContent = (testDiv.textContent == '>') ? "PASS" : ("FAIL : " + testDiv.textContent);
-</script>
diff --git a/LayoutTests/fast/parser/remove-misnested-iframe-in-beforeload-expected.txt b/LayoutTests/fast/parser/remove-misnested-iframe-in-beforeload-expected.txt
deleted file mode 100644 (file)
index 7a94cb3..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-| <html>
-|   <head>
-|     <script>
-|       src="../../resources/dump-as-markup.js"
-|     "
-"
-|   <body>
-|     <table>
-|       "
-
-"
-|     "
-"
diff --git a/LayoutTests/fast/parser/remove-misnested-iframe-in-beforeload.html b/LayoutTests/fast/parser/remove-misnested-iframe-in-beforeload.html
deleted file mode 100644 (file)
index b7a6429..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-<script src="../../resources/dump-as-markup.js"></script>
-<table>
-<iframe onbeforeload="event.target.parentNode.removeChild(event.target)"></iframe>
-</table>
diff --git a/LayoutTests/fast/parser/remove-misnested-iframe-parent-in-beforeload-expected.txt b/LayoutTests/fast/parser/remove-misnested-iframe-parent-in-beforeload-expected.txt
deleted file mode 100644 (file)
index 70dd618..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-| <html>
-|   <head>
-|     <script>
-|       src="../../resources/dump-as-markup.js"
-|     "
-"
-|   <body>
-|     "
-"
diff --git a/LayoutTests/fast/parser/remove-misnested-iframe-parent-in-beforeload.html b/LayoutTests/fast/parser/remove-misnested-iframe-parent-in-beforeload.html
deleted file mode 100644 (file)
index e5d2c8d..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-<script src="../../resources/dump-as-markup.js"></script>
-<div>
-<table>
-<iframe onbeforeload="event.target.parentNode.parentNode.removeChild(event.target.parentNode)"></iframe>
-</table>
-</div>
diff --git a/LayoutTests/fast/replaced/object-param-spaces-expected.txt b/LayoutTests/fast/replaced/object-param-spaces-expected.txt
deleted file mode 100644 (file)
index e283a88..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-
-This test verifies that a URL specified in a <param> of an <object> is parsed the same as if it was specified as the data attribute of the <object>. Specifically, this verifies that leading/trailing whitespace are stripped.
-
-PASS
diff --git a/LayoutTests/fast/replaced/object-param-spaces.html b/LayoutTests/fast/replaced/object-param-spaces.html
deleted file mode 100644 (file)
index cc77bbd..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-<html>
-    <head>
-        <script>
-            if (window.testRunner) {
-                testRunner.dumpAsText();
-                testRunner.waitUntilDone();
-            }
-            document.addEventListener("beforeload", function(event) {
-                var console = document.getElementById("console");
-
-                if (event.url == "scheme://url-with-leading-and-trailing-space/")
-                    console.innerHTML = "PASS";
-                else
-                    console.innerHTML = "FAIL";
-
-                event.preventDefault();
-                if (window.testRunner)
-                    testRunner.notifyDone();
-            }, true);
-        </script>
-    </head>
-    <body>
-        <object width="0" height="0" type="application/x-webkit-test-netscape">
-            <param name="movie" value="  scheme://url-with-leading-and-trailing-space/     ">
-        </object>
-        <p>This test verifies that a URL specified in a &lt;param&gt; of an &lt;object&gt; is parsed the same as if it was specified as the data attribute of the &lt;object&gt;. Specifically, this verifies that leading/trailing whitespace are stripped.</p>
-        <div id="console"></div>
-    </body>
-</html>
diff --git a/LayoutTests/fast/replaced/object-with-embed-url-param-expected.txt b/LayoutTests/fast/replaced/object-with-embed-url-param-expected.txt
deleted file mode 100644 (file)
index 5c011dc..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-This test verifies that the right URL is loaded when there is an <object> with a 'src' <param> and a fallback <embed>.
-
-An <object> with a 'data' @attr and a 'src' <param> should load the URL from the 'data' @attr and does.
-An <object> with a 'src' <param> should load the URL from the 'src' <param> and does.
-An <object> with no URL specified and a nested <embed> should load the URL from the 'src' @attr of the <embed> and does.
-An <object> with a URL specified in a 'src' <param> and a nested <embed> should load the URL from the 'src' @attr of the <embed> and does.
-An <object> with a URL specified in a 'src' <param> and a MIME type specified in a 'type' <param> should load the URL from the 'src' <param> and does.
-      
diff --git a/LayoutTests/fast/replaced/object-with-embed-url-param.html b/LayoutTests/fast/replaced/object-with-embed-url-param.html
deleted file mode 100644 (file)
index 76489ac..0000000
+++ /dev/null
@@ -1,72 +0,0 @@
-<html>
-    <head>
-        <script>
-            if (window.testRunner) {
-                testRunner.dumpAsText();
-                testRunner.waitUntilDone();
-            }
-
-            var object1Result = "";
-            var object2Result = "";
-            var embed3Result = "";
-            var embed4Result = "";
-            var object5Result = "";
-            var notified = false;
-
-            document.addEventListener("beforeload", function(event) {
-                if (event.url == "")
-                    return;
-                if (event.target.id == "object1") {
-                    object1Result = (event.url == "object-attr" ? "does" : "does not");
-                } else if (event.target.id == "object2") {
-                    object2Result = (event.url == "object-param" ? "does" : "does not");
-                } else if (event.target.id == "embed3") {
-                    embed3Result = (event.url == "embed-attr" ? "does" : "does not");
-                } else if (event.target.id == "embed4") {
-                    embed4Result = (event.url == "embed-attr" ? "does" : "does not");
-                } else if (event.target.id == "object5") {
-                    object5Result = (event.url == "object-param" ? "does" : "does not");
-                }
-
-                if (!notified && object1Result != "" && object2Result != "" && embed3Result != "" && embed4Result != "" && object5Result != "") {
-                    debug("An &lt;object&gt; with a 'data' @attr and a 'src' &lt;param&gt; should load the URL from the 'data' @attr and " + object1Result + ".");
-                    debug("An &lt;object&gt; with a 'src' &lt;param&gt; should load the URL from the 'src' &lt;param&gt; and " + object2Result + ".");
-                    debug("An &lt;object&gt; with no URL specified and a nested &lt;embed&gt; should load the URL from the 'src' @attr of the &lt;embed&gt; and " + embed3Result + ".");
-                    debug("An &lt;object&gt; with a URL specified in a 'src' &lt;param&gt; and a nested &lt;embed&gt; should load the URL from the 'src' @attr of the &lt;embed&gt; and " + embed3Result + ".");
-                    debug("An &lt;object&gt; with a URL specified in a 'src' &lt;param&gt; and a MIME type specified in a 'type' &lt;param&gt; should load the URL from the 'src' &lt;param&gt; and " + object5Result + ".");
-                    notified = true;
-                    if (window.testRunner)
-                        testRunner.notifyDone();
-                }
-            }, true);
-
-            function debug(str) {
-                document.getElementById('console').innerHTML += str + "<br>";
-            }
-        </script>
-    </head>
-    <body>
-        <p>This test verifies that the right URL is loaded when there is an &lt;object&gt; with a 'src' &lt;param&gt; and a fallback &lt;embed&gt;.</p>
-        <div id="console"></div>
-        <object id="object1" type="application/x-webkit-test-netscape" data="object-attr">
-            <param name="src" value="object-param"></param>
-            <embed id="embed1" type="application/x-webkit-test-netscape" src="embed-attr">
-        </object>
-        <object id="object2" type="application/x-webkit-test-netscape">
-            <param name="movie" value="object-param"></param>
-            <embed id="embed2" type="application/x-webkit-test-netscape" src="embed-attr">
-        </object>
-        <object id="object3">
-            <embed id="embed3" type="application/x-webkit-test-netscape" src="embed-attr">
-        </object>
-        <object id="object4">
-            <param name="code" value="object-param"></param>
-            <embed id="embed4" type="application/x-webkit-test-netscape" src="embed-attr">
-        </object>
-        <object id="object5">
-            <param name="url" value="object-param"></param>
-            <param name="type" value="application/x-webkit-test-netscape"></param>
-        </object>
-    </body>
-</html>
diff --git a/LayoutTests/http/tests/cache/cancel-during-revalidation-succeeded-expected.txt b/LayoutTests/http/tests/cache/cancel-during-revalidation-succeeded-expected.txt
deleted file mode 100644 (file)
index 8a2a193..0000000
+++ /dev/null
@@ -1 +0,0 @@
-It's possible for a successful revalidation to cause events to fire synchronously. We shouldn't crash if one of those events stops the load. See https://bugs.webkit.org/show_bug.cgi?id=72762.  
diff --git a/LayoutTests/http/tests/cache/cancel-during-revalidation-succeeded.html b/LayoutTests/http/tests/cache/cancel-during-revalidation-succeeded.html
deleted file mode 100644 (file)
index 6f3aa66..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-<html>
-<head>
-<link id="img" rel="stylesheet" href="resources/stylesheet304.php">
-</head>
-<body>
-It's possible for a successful revalidation to cause events to fire synchronously.
-We shouldn't crash if one of those events stops the load.
-See https://bugs.webkit.org/show_bug.cgi?id=72762.
-<script>
-if (window.testRunner) {
-    testRunner.dumpAsText();
-    testRunner.waitUntilDone();
-}
-
-function obl(e) {
-    if (window.sessionStorage.getItem("reloaded")) {
-        window.stop();
-        window.sessionStorage.removeItem("reloaded");
-        setTimeout(finish, 0);
-    } else {
-        window.sessionStorage.reloaded = "true";
-        location.reload();
-    }
-}
-
-function finish() {
-    if (window.testRunner)
-        testRunner.notifyDone();
-}
-</script>
-<object type="application/x-no-such-mime" onbeforeload="obl();"></embed>
-</body>
-</html>
index 7a62767..739c3f5 100644 (file)
@@ -1,7 +1,6 @@
 
 Test that stalling very early, while loading meta-data, stops delaying the load event.
 
-EVENT(beforeload)
 EVENT(loadstart)
 EVENT(stalled)
 EVENT(window.onload)
diff --git a/LayoutTests/http/tests/plugins/navigation-during-load-embed-expected.txt b/LayoutTests/http/tests/plugins/navigation-during-load-embed-expected.txt
deleted file mode 100644 (file)
index eeb33d1..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-Check that forcing a navigation during an embed element load is well-behaved.
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-
-PASS successfullyParsed is true
-
-TEST COMPLETE
-
diff --git a/LayoutTests/http/tests/plugins/navigation-during-load-embed.html b/LayoutTests/http/tests/plugins/navigation-during-load-embed.html
deleted file mode 100644 (file)
index 578cee0..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-<script src="/js-test-resources/js-test.js"></script>
-<script>
-if (window.internals && internals.settings)
-    internals.settings.setShouldRestrictBaseURLSchemes(false);
-
-var embed;
-
-function embedLoad() {
-    embed = document.getElementById('embed');
-
-    embed.onbeforeload = () => {
-        embed.onbeforeload = null;
-
-        let base = document.head.appendChild(document.createElement('base'));
-        base.href = 'javascript:///%0aalert("FAIL");//';
-        finishJSTest();
-    };
-    embed.src = 'xxxxx';
-};
-</script>
-</head>
-<body>
-<script>
-description("Check that forcing a navigation during an embed element load is well-behaved.")
-
-window.jsTestIsAsync = true;
-</script>
-<embed id='embed' type='image/png' src='/resources/square100.png' onload='embedLoad()'>
-</embed>
-</body>
-</html>
\ No newline at end of file
diff --git a/LayoutTests/http/tests/plugins/navigation-during-load-expected.txt b/LayoutTests/http/tests/plugins/navigation-during-load-expected.txt
deleted file mode 100644 (file)
index ca60e0a..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-Check that forcing a navigation during an object element load is well-behaved.
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-
-PASS successfullyParsed is true
-
-TEST COMPLETE
-
diff --git a/LayoutTests/http/tests/plugins/navigation-during-load.html b/LayoutTests/http/tests/plugins/navigation-during-load.html
deleted file mode 100644 (file)
index 63445b4..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-<script src="/js-test-resources/js-test.js"></script>
-<script>
-if (window.internals && internals.settings)
-    internals.settings.setShouldRestrictBaseURLSchemes(false);
-
-var object;
-
-function objectLoad() {
-    object = document.getElementById('object');
-
-    object.onbeforeload = () => {
-        object.onbeforeload = null;
-
-        let base = document.head.appendChild(document.createElement('base'));
-        base.href = 'javascript:///%0aalert("FAIL");//';
-        finishJSTest();
-    };
-    object.data = 'xxxxx';
-};
-</script>
-</head>
-<body>
-<script>
-description("Check that forcing a navigation during an object element load is well-behaved.")
-
-window.jsTestIsAsync = true;
-</script>
-<object id='object' type='text/html' data='http://127.0.0.1:8000/plugins/resources/cross-frame-object-access.html' onload='objectLoad()'>
-</object>
-</body>
-</html>
\ No newline at end of file
index 1d472f3..5a85275 100644 (file)
@@ -1,2 +1 @@
-CONSOLE MESSAGE: http://127.0.0.1:8000/security/resources/client-redir.html?url=http://localhost:8000/security/resources/post-done.html
 This test produces output in the console. Only the initial URL should be logged. 
index 80a3666..5a85275 100644 (file)
@@ -1,2 +1 @@
-CONSOLE MESSAGE: http://127.0.0.1:8000/resources/redirect.php?url=http://localhost:8000/security/resources/post-done.html
 This test produces output in the console. Only the initial URL should be logged. 
index bfeab66..de463ac 100644 (file)
@@ -1,4 +1,4 @@
-CONSOLE MESSAGE: The XSS Auditor refused to execute a script in 'http://localhost:8000/security/xssAuditor/resources/echo-intertag.pl?test=/security/xssAuditor/object-embed-tag-control-char.html&relay-target-ids-for-event=beforeload&q=%3Cobject%20id=%27object%27%20name=%27plugin%27%20type=%27application/x-webkit-test-netscape%27%3E%3Cparam%20name=%27movie%27%20value=%27http://127.0.0.1:8000/security/xssAuditor/resources/dummy.swf%05%27%20/%3E%3Cembed%20id=%27embed%27%20name=%27plugin%27%20type=%27application/x-webkit-test-netscape%27%20src=%27http://127.0.0.1:8000/security/xssAuditor/resources/dummy.swf%05%27%20/%3E%3C/object%3E' because its source code was found within the request. The auditor was enabled because the server did not send an 'X-XSS-Protection' header.
-CONSOLE MESSAGE: The XSS Auditor refused to execute a script in 'http://localhost:8000/security/xssAuditor/resources/echo-intertag.pl?test=/security/xssAuditor/object-embed-tag-control-char.html&relay-target-ids-for-event=beforeload&q=%3Cobject%20id=%27object%27%20name=%27plugin%27%20type=%27application/x-webkit-test-netscape%27%3E%3Cparam%20name=%27movie%27%20value=%27http://127.0.0.1:8000/security/xssAuditor/resources/dummy.swf%05%27%20/%3E%3Cembed%20id=%27embed%27%20name=%27plugin%27%20type=%27application/x-webkit-test-netscape%27%20src=%27http://127.0.0.1:8000/security/xssAuditor/resources/dummy.swf%05%27%20/%3E%3C/object%3E' because its source code was found within the request. The auditor was enabled because the server did not send an 'X-XSS-Protection' header.
-CONSOLE MESSAGE: The XSS Auditor refused to execute a script in 'http://localhost:8000/security/xssAuditor/resources/echo-intertag.pl?test=/security/xssAuditor/object-embed-tag-control-char.html&relay-target-ids-for-event=beforeload&q=%3Cobject%20id=%27object%27%20name=%27plugin%27%20type=%27application/x-webkit-test-netscape%27%3E%3Cparam%20name=%27movie%27%20value=%27http://127.0.0.1:8000/security/xssAuditor/resources/dummy.swf%05%27%20/%3E%3Cembed%20id=%27embed%27%20name=%27plugin%27%20type=%27application/x-webkit-test-netscape%27%20src=%27http://127.0.0.1:8000/security/xssAuditor/resources/dummy.swf%05%27%20/%3E%3C/object%3E' because its source code was found within the request. The auditor was enabled because the server did not send an 'X-XSS-Protection' header.
+CONSOLE MESSAGE: The XSS Auditor refused to execute a script in 'http://localhost:8000/security/xssAuditor/resources/echo-intertag.pl?test=/security/xssAuditor/object-embed-tag-control-char.html&wait-for-load=1&q=%3Cobject%20id=%27object%27%20name=%27plugin%27%20type=%27application/x-webkit-test-netscape%27%3E%3Cparam%20name=%27movie%27%20value=%27http://127.0.0.1:8000/security/xssAuditor/resources/dummy.swf%05%27%20/%3E%3Cembed%20id=%27embed%27%20name=%27plugin%27%20type=%27application/x-webkit-test-netscape%27%20src=%27http://127.0.0.1:8000/security/xssAuditor/resources/dummy.swf%05%27%20/%3E%3C/object%3E' because its source code was found within the request. The auditor was enabled because the server did not send an 'X-XSS-Protection' header.
+CONSOLE MESSAGE: The XSS Auditor refused to execute a script in 'http://localhost:8000/security/xssAuditor/resources/echo-intertag.pl?test=/security/xssAuditor/object-embed-tag-control-char.html&wait-for-load=1&q=%3Cobject%20id=%27object%27%20name=%27plugin%27%20type=%27application/x-webkit-test-netscape%27%3E%3Cparam%20name=%27movie%27%20value=%27http://127.0.0.1:8000/security/xssAuditor/resources/dummy.swf%05%27%20/%3E%3Cembed%20id=%27embed%27%20name=%27plugin%27%20type=%27application/x-webkit-test-netscape%27%20src=%27http://127.0.0.1:8000/security/xssAuditor/resources/dummy.swf%05%27%20/%3E%3C/object%3E' because its source code was found within the request. The auditor was enabled because the server did not send an 'X-XSS-Protection' header.
+CONSOLE MESSAGE: The XSS Auditor refused to execute a script in 'http://localhost:8000/security/xssAuditor/resources/echo-intertag.pl?test=/security/xssAuditor/object-embed-tag-control-char.html&wait-for-load=1&q=%3Cobject%20id=%27object%27%20name=%27plugin%27%20type=%27application/x-webkit-test-netscape%27%3E%3Cparam%20name=%27movie%27%20value=%27http://127.0.0.1:8000/security/xssAuditor/resources/dummy.swf%05%27%20/%3E%3Cembed%20id=%27embed%27%20name=%27plugin%27%20type=%27application/x-webkit-test-netscape%27%20src=%27http://127.0.0.1:8000/security/xssAuditor/resources/dummy.swf%05%27%20/%3E%3C/object%3E' because its source code was found within the request. The auditor was enabled because the server did not send an 'X-XSS-Protection' header.
 
index f4afca4..18ddcac 100644 (file)
@@ -7,12 +7,12 @@ if (window.testRunner) {
   testRunner.dumpAsText();
   testRunner.setXSSAuditorEnabled(true);
   testRunner.waitUntilDone();
-  notifyDoneAfterReceivingBeforeloadFromIds(["object", "embed"]);
+  notifyDoneAfterReceivingLoaded();
 }
 </script>
 </head>
 <body>
-<iframe src="http://localhost:8000/security/xssAuditor/resources/echo-intertag.pl?test=/security/xssAuditor/object-embed-tag-control-char.html&relay-target-ids-for-event=beforeload&q=<object id='object' name='plugin' type='application/x-webkit-test-netscape'><param name='movie' value='http://127.0.0.1:8000/security/xssAuditor/resources/dummy.swf%05' /><embed id='embed' name='plugin' type='application/x-webkit-test-netscape' src='http://127.0.0.1:8000/security/xssAuditor/resources/dummy.swf%05' /></object>">
+<iframe src="http://localhost:8000/security/xssAuditor/resources/echo-intertag.pl?test=/security/xssAuditor/object-embed-tag-control-char.html&wait-for-load=1&q=<object id='object' name='plugin' type='application/x-webkit-test-netscape'><param name='movie' value='http://127.0.0.1:8000/security/xssAuditor/resources/dummy.swf%05' /><embed id='embed' name='plugin' type='application/x-webkit-test-netscape' src='http://127.0.0.1:8000/security/xssAuditor/resources/dummy.swf%05' /></object>">
 </iframe>
 </body>
 </html>
index 5c710db..1c3e85e 100644 (file)
@@ -1,4 +1,4 @@
-CONSOLE MESSAGE: The XSS Auditor refused to execute a script in 'http://localhost:8000/security/xssAuditor/resources/echo-intertag.pl?test=/security/xssAuditor/object-embed-tag.html&relay-target-ids-for-event=beforeload&q=%3Cobject%20id=%27object%27%20name=%27plugin%27%20type=%27application/x-webkit-test-netscape%27%3E%3Cparam%20name=%27movie%27%20value=%27http://127.0.0.1:8000/security/xssAuditor/resources/dummy.swf%27%20/%3E%3Cembed%20id=%27embed%27%20name=%27plugin%27%20type=%27application/x-webkit-test-netscape%27%20src=%27http://127.0.0.1:8000/security/xssAuditor/resources/dummy.swf%27%20/%3E%3C/object%3E' because its source code was found within the request. The auditor was enabled because the server did not send an 'X-XSS-Protection' header.
-CONSOLE MESSAGE: The XSS Auditor refused to execute a script in 'http://localhost:8000/security/xssAuditor/resources/echo-intertag.pl?test=/security/xssAuditor/object-embed-tag.html&relay-target-ids-for-event=beforeload&q=%3Cobject%20id=%27object%27%20name=%27plugin%27%20type=%27application/x-webkit-test-netscape%27%3E%3Cparam%20name=%27movie%27%20value=%27http://127.0.0.1:8000/security/xssAuditor/resources/dummy.swf%27%20/%3E%3Cembed%20id=%27embed%27%20name=%27plugin%27%20type=%27application/x-webkit-test-netscape%27%20src=%27http://127.0.0.1:8000/security/xssAuditor/resources/dummy.swf%27%20/%3E%3C/object%3E' because its source code was found within the request. The auditor was enabled because the server did not send an 'X-XSS-Protection' header.
-CONSOLE MESSAGE: The XSS Auditor refused to execute a script in 'http://localhost:8000/security/xssAuditor/resources/echo-intertag.pl?test=/security/xssAuditor/object-embed-tag.html&relay-target-ids-for-event=beforeload&q=%3Cobject%20id=%27object%27%20name=%27plugin%27%20type=%27application/x-webkit-test-netscape%27%3E%3Cparam%20name=%27movie%27%20value=%27http://127.0.0.1:8000/security/xssAuditor/resources/dummy.swf%27%20/%3E%3Cembed%20id=%27embed%27%20name=%27plugin%27%20type=%27application/x-webkit-test-netscape%27%20src=%27http://127.0.0.1:8000/security/xssAuditor/resources/dummy.swf%27%20/%3E%3C/object%3E' because its source code was found within the request. The auditor was enabled because the server did not send an 'X-XSS-Protection' header.
+CONSOLE MESSAGE: The XSS Auditor refused to execute a script in 'http://localhost:8000/security/xssAuditor/resources/echo-intertag.pl?test=/security/xssAuditor/object-embed-tag.html&wait-for-load=1&q=%3Cobject%20id=%27object%27%20name=%27plugin%27%20type=%27application/x-webkit-test-netscape%27%3E%3Cparam%20name=%27movie%27%20value=%27http://127.0.0.1:8000/security/xssAuditor/resources/dummy.swf%27%20/%3E%3Cembed%20id=%27embed%27%20name=%27plugin%27%20type=%27application/x-webkit-test-netscape%27%20src=%27http://127.0.0.1:8000/security/xssAuditor/resources/dummy.swf%27%20/%3E%3C/object%3E' because its source code was found within the request. The auditor was enabled because the server did not send an 'X-XSS-Protection' header.
+CONSOLE MESSAGE: The XSS Auditor refused to execute a script in 'http://localhost:8000/security/xssAuditor/resources/echo-intertag.pl?test=/security/xssAuditor/object-embed-tag.html&wait-for-load=1&q=%3Cobject%20id=%27object%27%20name=%27plugin%27%20type=%27application/x-webkit-test-netscape%27%3E%3Cparam%20name=%27movie%27%20value=%27http://127.0.0.1:8000/security/xssAuditor/resources/dummy.swf%27%20/%3E%3Cembed%20id=%27embed%27%20name=%27plugin%27%20type=%27application/x-webkit-test-netscape%27%20src=%27http://127.0.0.1:8000/security/xssAuditor/resources/dummy.swf%27%20/%3E%3C/object%3E' because its source code was found within the request. The auditor was enabled because the server did not send an 'X-XSS-Protection' header.
+CONSOLE MESSAGE: The XSS Auditor refused to execute a script in 'http://localhost:8000/security/xssAuditor/resources/echo-intertag.pl?test=/security/xssAuditor/object-embed-tag.html&wait-for-load=1&q=%3Cobject%20id=%27object%27%20name=%27plugin%27%20type=%27application/x-webkit-test-netscape%27%3E%3Cparam%20name=%27movie%27%20value=%27http://127.0.0.1:8000/security/xssAuditor/resources/dummy.swf%27%20/%3E%3Cembed%20id=%27embed%27%20name=%27plugin%27%20type=%27application/x-webkit-test-netscape%27%20src=%27http://127.0.0.1:8000/security/xssAuditor/resources/dummy.swf%27%20/%3E%3C/object%3E' because its source code was found within the request. The auditor was enabled because the server did not send an 'X-XSS-Protection' header.
 
index 2e56a42..d2dd7d7 100644 (file)
@@ -1,4 +1,4 @@
-CONSOLE MESSAGE: The XSS Auditor refused to execute a script in 'http://localhost:8000/security/xssAuditor/resources/echo-intertag.pl?test=/security/xssAuditor/object-embed-tag-null-char.html&relay-target-ids-for-event=beforeload&q=%3Cobject%20id=%27object%27%20name=%27plugin%27%20type=%27application/x-webkit-test-netscape%27%3E%3Cparam%20name=%27movie%27%20value=%27http://127.0.0.1:8000/sec%00urity/xssAuditor/resources/dummy.swf%27%20/%3E%3Cembed%20id=%27embed%27%20name=%27plugin%27%20type=%27application/x-webkit-test-netscape%27%20src=%27http://127.0.0.1:8000/sec%00urity/xssAuditor/resources/dummy.swf%27%20/%3E%3C/object%3E' because its source code was found within the request. The auditor was enabled because the server did not send an 'X-XSS-Protection' header.
-CONSOLE MESSAGE: The XSS Auditor refused to execute a script in 'http://localhost:8000/security/xssAuditor/resources/echo-intertag.pl?test=/security/xssAuditor/object-embed-tag-null-char.html&relay-target-ids-for-event=beforeload&q=%3Cobject%20id=%27object%27%20name=%27plugin%27%20type=%27application/x-webkit-test-netscape%27%3E%3Cparam%20name=%27movie%27%20value=%27http://127.0.0.1:8000/sec%00urity/xssAuditor/resources/dummy.swf%27%20/%3E%3Cembed%20id=%27embed%27%20name=%27plugin%27%20type=%27application/x-webkit-test-netscape%27%20src=%27http://127.0.0.1:8000/sec%00urity/xssAuditor/resources/dummy.swf%27%20/%3E%3C/object%3E' because its source code was found within the request. The auditor was enabled because the server did not send an 'X-XSS-Protection' header.
-CONSOLE MESSAGE: The XSS Auditor refused to execute a script in 'http://localhost:8000/security/xssAuditor/resources/echo-intertag.pl?test=/security/xssAuditor/object-embed-tag-null-char.html&relay-target-ids-for-event=beforeload&q=%3Cobject%20id=%27object%27%20name=%27plugin%27%20type=%27application/x-webkit-test-netscape%27%3E%3Cparam%20name=%27movie%27%20value=%27http://127.0.0.1:8000/sec%00urity/xssAuditor/resources/dummy.swf%27%20/%3E%3Cembed%20id=%27embed%27%20name=%27plugin%27%20type=%27application/x-webkit-test-netscape%27%20src=%27http://127.0.0.1:8000/sec%00urity/xssAuditor/resources/dummy.swf%27%20/%3E%3C/object%3E' because its source code was found within the request. The auditor was enabled because the server did not send an 'X-XSS-Protection' header.
+CONSOLE MESSAGE: The XSS Auditor refused to execute a script in 'http://localhost:8000/security/xssAuditor/resources/echo-intertag.pl?test=/security/xssAuditor/object-embed-tag-null-char.html&wait-for-load=1&q=%3Cobject%20id=%27object%27%20name=%27plugin%27%20type=%27application/x-webkit-test-netscape%27%3E%3Cparam%20name=%27movie%27%20value=%27http://127.0.0.1:8000/sec%00urity/xssAuditor/resources/dummy.swf%27%20/%3E%3Cembed%20id=%27embed%27%20name=%27plugin%27%20type=%27application/x-webkit-test-netscape%27%20src=%27http://127.0.0.1:8000/sec%00urity/xssAuditor/resources/dummy.swf%27%20/%3E%3C/object%3E' because its source code was found within the request. The auditor was enabled because the server did not send an 'X-XSS-Protection' header.
+CONSOLE MESSAGE: The XSS Auditor refused to execute a script in 'http://localhost:8000/security/xssAuditor/resources/echo-intertag.pl?test=/security/xssAuditor/object-embed-tag-null-char.html&wait-for-load=1&q=%3Cobject%20id=%27object%27%20name=%27plugin%27%20type=%27application/x-webkit-test-netscape%27%3E%3Cparam%20name=%27movie%27%20value=%27http://127.0.0.1:8000/sec%00urity/xssAuditor/resources/dummy.swf%27%20/%3E%3Cembed%20id=%27embed%27%20name=%27plugin%27%20type=%27application/x-webkit-test-netscape%27%20src=%27http://127.0.0.1:8000/sec%00urity/xssAuditor/resources/dummy.swf%27%20/%3E%3C/object%3E' because its source code was found within the request. The auditor was enabled because the server did not send an 'X-XSS-Protection' header.
+CONSOLE MESSAGE: The XSS Auditor refused to execute a script in 'http://localhost:8000/security/xssAuditor/resources/echo-intertag.pl?test=/security/xssAuditor/object-embed-tag-null-char.html&wait-for-load=1&q=%3Cobject%20id=%27object%27%20name=%27plugin%27%20type=%27application/x-webkit-test-netscape%27%3E%3Cparam%20name=%27movie%27%20value=%27http://127.0.0.1:8000/sec%00urity/xssAuditor/resources/dummy.swf%27%20/%3E%3Cembed%20id=%27embed%27%20name=%27plugin%27%20type=%27application/x-webkit-test-netscape%27%20src=%27http://127.0.0.1:8000/sec%00urity/xssAuditor/resources/dummy.swf%27%20/%3E%3C/object%3E' because its source code was found within the request. The auditor was enabled because the server did not send an 'X-XSS-Protection' header.
 
index a923f39..cf52021 100644 (file)
@@ -7,12 +7,12 @@ if (window.testRunner) {
   testRunner.dumpAsText();
   testRunner.setXSSAuditorEnabled(true);
   testRunner.waitUntilDone();
-  notifyDoneAfterReceivingBeforeloadFromIds(["object", "embed"]);
+  notifyDoneAfterReceivingLoaded();
 }
 </script>
 </head>
 <body>
-<iframe src="http://localhost:8000/security/xssAuditor/resources/echo-intertag.pl?test=/security/xssAuditor/object-embed-tag-null-char.html&relay-target-ids-for-event=beforeload&q=<object id='object' name='plugin' type='application/x-webkit-test-netscape'><param name='movie' value='http://127.0.0.1:8000/sec%00urity/xssAuditor/resources/dummy.swf' /><embed id='embed' name='plugin' type='application/x-webkit-test-netscape' src='http://127.0.0.1:8000/sec%00urity/xssAuditor/resources/dummy.swf' /></object>">
+<iframe src="http://localhost:8000/security/xssAuditor/resources/echo-intertag.pl?test=/security/xssAuditor/object-embed-tag-null-char.html&wait-for-load=1&q=<object id='object' name='plugin' type='application/x-webkit-test-netscape'><param name='movie' value='http://127.0.0.1:8000/sec%00urity/xssAuditor/resources/dummy.swf' /><embed id='embed' name='plugin' type='application/x-webkit-test-netscape' src='http://127.0.0.1:8000/sec%00urity/xssAuditor/resources/dummy.swf' /></object>">
 </iframe>
 </body>
 </html>
index 0da60a9..eb7edb1 100644 (file)
@@ -7,12 +7,12 @@ if (window.testRunner) {
   testRunner.dumpAsText();
   testRunner.setXSSAuditorEnabled(true);
   testRunner.waitUntilDone();
-  notifyDoneAfterReceivingBeforeloadFromIds(["object", "embed"]);
+  notifyDoneAfterReceivingLoaded();
 }
 </script>
 </head>
 <body>
-<iframe src="http://localhost:8000/security/xssAuditor/resources/echo-intertag.pl?test=/security/xssAuditor/object-embed-tag.html&relay-target-ids-for-event=beforeload&q=<object id='object' name='plugin' type='application/x-webkit-test-netscape'><param name='movie' value='http://127.0.0.1:8000/security/xssAuditor/resources/dummy.swf' /><embed id='embed' name='plugin' type='application/x-webkit-test-netscape' src='http://127.0.0.1:8000/security/xssAuditor/resources/dummy.swf' /></object>">
+<iframe src="http://localhost:8000/security/xssAuditor/resources/echo-intertag.pl?test=/security/xssAuditor/object-embed-tag.html&wait-for-load=1&q=<object id='object' name='plugin' type='application/x-webkit-test-netscape'><param name='movie' value='http://127.0.0.1:8000/security/xssAuditor/resources/dummy.swf' /><embed id='embed' name='plugin' type='application/x-webkit-test-netscape' src='http://127.0.0.1:8000/security/xssAuditor/resources/dummy.swf' /></object>">
 </iframe>
 </body>
 </html>
index cd810f8..3a44fcb 100644 (file)
@@ -7,12 +7,12 @@ if (window.testRunner) {
   testRunner.dumpAsText();
   testRunner.setXSSAuditorEnabled(true);
   testRunner.waitUntilDone();
-  notifyDoneAfterReceivingBeforeloadFromIds(["object"]);
+  notifyDoneAfterReceivingLoaded();
 }
 </script>
 </head>
 <body>
-<iframe src="http://localhost:8000/security/xssAuditor/resources/echo-object-src.pl?relay-target-ids-for-event=beforeload&q=http://127.0.0.1:8000/security/xssAuditor/resources/dummy.swf">
+<iframe src="http://localhost:8000/security/xssAuditor/resources/echo-object-src.pl?wait-for-load=1&q=http://127.0.0.1:8000/security/xssAuditor/resources/dummy.swf">
 </iframe>
 </body>
 </html>
index fb1d06f..2c8a648 100644 (file)
@@ -1,3 +1,3 @@
-CONSOLE MESSAGE: The XSS Auditor refused to execute a script in 'http://localhost:8000/security/xssAuditor/resources/echo-intertag.pl?test=/security/xssAuditor/object-tag.html&relay-target-ids-for-event=beforeload&q=%3Cobject%20id=%27object%27%20name=%27plugin%27%20type=%27application/x-webkit-test-netscape%27%3E%3Cparam%20name=%27movie%27%20value=%27http://127.0.0.1:8000/security/xssAuditor/resources/dummy.swf%27%20/%3E%3C/object%3E' because its source code was found within the request. The auditor was enabled because the server did not send an 'X-XSS-Protection' header.
-CONSOLE MESSAGE: The XSS Auditor refused to execute a script in 'http://localhost:8000/security/xssAuditor/resources/echo-intertag.pl?test=/security/xssAuditor/object-tag.html&relay-target-ids-for-event=beforeload&q=%3Cobject%20id=%27object%27%20name=%27plugin%27%20type=%27application/x-webkit-test-netscape%27%3E%3Cparam%20name=%27movie%27%20value=%27http://127.0.0.1:8000/security/xssAuditor/resources/dummy.swf%27%20/%3E%3C/object%3E' because its source code was found within the request. The auditor was enabled because the server did not send an 'X-XSS-Protection' header.
+CONSOLE MESSAGE: The XSS Auditor refused to execute a script in 'http://localhost:8000/security/xssAuditor/resources/echo-intertag.pl?test=/security/xssAuditor/object-tag.html&wait-for-load=1&q=%3Cobject%20id=%27object%27%20name=%27plugin%27%20type=%27application/x-webkit-test-netscape%27%3E%3Cparam%20name=%27movie%27%20value=%27http://127.0.0.1:8000/security/xssAuditor/resources/dummy.swf%27%20/%3E%3C/object%3E' because its source code was found within the request. The auditor was enabled because the server did not send an 'X-XSS-Protection' header.
+CONSOLE MESSAGE: The XSS Auditor refused to execute a script in 'http://localhost:8000/security/xssAuditor/resources/echo-intertag.pl?test=/security/xssAuditor/object-tag.html&wait-for-load=1&q=%3Cobject%20id=%27object%27%20name=%27plugin%27%20type=%27application/x-webkit-test-netscape%27%3E%3Cparam%20name=%27movie%27%20value=%27http://127.0.0.1:8000/security/xssAuditor/resources/dummy.swf%27%20/%3E%3C/object%3E' because its source code was found within the request. The auditor was enabled because the server did not send an 'X-XSS-Protection' header.
 
index aa8af3d..d991af8 100644 (file)
@@ -1,2 +1,2 @@
-CONSOLE MESSAGE: The XSS Auditor refused to execute a script in 'http://localhost:8000/security/xssAuditor/resources/echo-intertag.pl?test=/security/xssAuditor/object-tag-javascript-url.html&relay-target-ids-for-event=beforeload&q=%3Cobject%20id=%27object%27%20data=%27javascript:alert(document.domain)%27%3E%3C/object%3E' because its source code was found within the request. The auditor was enabled because the server did not send an 'X-XSS-Protection' header.
+CONSOLE MESSAGE: The XSS Auditor refused to execute a script in 'http://localhost:8000/security/xssAuditor/resources/echo-intertag.pl?test=/security/xssAuditor/object-tag-javascript-url.html&wait-for-load=1&q=%3Cobject%20id=%27object%27%20data=%27javascript:alert(document.domain)%27%3E%3C/object%3E' because its source code was found within the request. The auditor was enabled because the server did not send an 'X-XSS-Protection' header.
 
index 8cfa54e..e6c9bc8 100644 (file)
@@ -7,12 +7,12 @@ if (window.testRunner) {
   testRunner.dumpAsText();
   testRunner.setXSSAuditorEnabled(true);
   testRunner.waitUntilDone();
-  notifyDoneAfterReceivingBeforeloadFromIds(["object"]);
+  notifyDoneAfterReceivingLoaded();
 }
 </script>
 </head>
 <body>
-<iframe src="http://localhost:8000/security/xssAuditor/resources/echo-intertag.pl?test=/security/xssAuditor/object-tag-javascript-url.html&relay-target-ids-for-event=beforeload&q=<object id='object' data='javascript:alert(document.domain)'></object>">
+<iframe src="http://localhost:8000/security/xssAuditor/resources/echo-intertag.pl?test=/security/xssAuditor/object-tag-javascript-url.html&wait-for-load=1&q=<object id='object' data='javascript:alert(document.domain)'></object>">
 </iframe>
 </body>
 </html>
index 588695c..8f9c026 100644 (file)
@@ -7,12 +7,12 @@ if (window.testRunner) {
   testRunner.dumpAsText();
   testRunner.setXSSAuditorEnabled(true);
   testRunner.waitUntilDone();
-  notifyDoneAfterReceivingBeforeloadFromIds(["object"]);
+  notifyDoneAfterReceivingLoaded();
 }
 </script>
 </head>
 <body>
-<iframe src="http://localhost:8000/security/xssAuditor/resources/echo-intertag.pl?test=/security/xssAuditor/object-tag.html&relay-target-ids-for-event=beforeload&q=<object id='object' name='plugin' type='application/x-webkit-test-netscape'><param name='movie' value='http://127.0.0.1:8000/security/xssAuditor/resources/dummy.swf' /></object>">
+<iframe src="http://localhost:8000/security/xssAuditor/resources/echo-intertag.pl?test=/security/xssAuditor/object-tag.html&wait-for-load=1&q=<object id='object' name='plugin' type='application/x-webkit-test-netscape'><param name='movie' value='http://127.0.0.1:8000/security/xssAuditor/resources/dummy.swf' /></object>">
 </iframe>
 </body>
 </html>
index 05300b4..93cd556 100755 (executable)
@@ -78,11 +78,11 @@ print "\n\n";
 
 print "<!DOCTYPE html>\n";
 print "<html>\n";
-if ($cgi->param('relay-target-ids-for-event')) {
+if ($cgi->param('wait-for-load')) {
     print "<script>\n";
-    print "document.addEventListener('" . $cgi->param('relay-target-ids-for-event') . "', function(event) {\n";
-    print "    window.parent.postMessage(event.target.id, '*');\n";
-    print "}, true);\n";
+     print "onload = function() {\n";
+    print "    window.parent.postMessage('loaded', '*');\n";
+    print "}\n";
     print "</script>\n";
 }
 if ($cgi->param('inHead')) {
index 23900f3..aeb6577 100755 (executable)
@@ -8,13 +8,11 @@ print "Content-Type: text/html; charset=UTF-8\n\n";
 
 print "<!DOCTYPE html>\n";
 print "<html>\n";
-if ($cgi->param('relay-target-ids-for-event')) {
-    print "<script>\n";
-    print "document.addEventListener('" . $cgi->param('relay-target-ids-for-event') . "', function(event) {\n";
-    print "    window.parent.postMessage(event.target.id, '*');\n";
-    print "}, true);\n";
-    print "</script>\n";
-}
+print "<script>\n";
+print "onload = function() {\n";
+print "    window.parent.postMessage('loaded', '*');\n";
+print "}\n";
+print "</script>\n";
 print "<body>\n";
 print "<object id=\"object\" name=\"plugin\" type=\"application/x-webkit-test-netscape\">\n";
 print "<param name=\"movie\" value=\"".$cgi->param('q')."\" />\n";
index 8af364e..e6801d9 100644 (file)
@@ -48,17 +48,10 @@ function sendRequestFromIFrame(url, params, HTTPMethod, callbackWhenDone)
     frameContent.getElementById('form').submit();
 }
 
-
-function notifyDoneAfterReceivingBeforeloadFromIds(ids)
+function notifyDoneAfterReceivingLoaded()
 {
-    var loadAttempted = 0;
     window.addEventListener("message", function(event) {
-        var index = ids.indexOf(event.data);
-        if (index == -1)
-            return;
-
-        loadAttempted = loadAttempted | (1 << index);
-        if (loadAttempted == (1 << ids.length) - 1)
+        if (event.data == "loaded")
             testRunner.notifyDone();
     }, false);
 }
index b326483..a2c9c09 100644 (file)
@@ -11,7 +11,6 @@ shouldBe('ArrayBuffer.length', '1');
 shouldBe('AudioContext.length', '0');
 shouldBe('AutocompleteErrorEvent.length', '1');
 shouldBe('AnimationEvent.length', '1');
-shouldBe('BeforeLoadEvent.length', '1');
 shouldBe('Blob.length', '0');
 shouldBe('CloseEvent.length', '1');
 shouldBe('CustomEvent.length', '1');
diff --git a/LayoutTests/js/dom/modules/module-will-fire-beforeload-expected.txt b/LayoutTests/js/dom/modules/module-will-fire-beforeload-expected.txt
deleted file mode 100644 (file)
index 3a8d970..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-Test script.beforeload will be fired when the module tag with src is prepared.
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-
-Module is not executed yet.
-PASS successfullyParsed is true
-
-TEST COMPLETE
-
diff --git a/LayoutTests/js/dom/modules/module-will-fire-beforeload.html b/LayoutTests/js/dom/modules/module-will-fire-beforeload.html
deleted file mode 100644 (file)
index c324e81..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<head>
-<script src="../../../resources/js-test-pre.js"></script>
-</head>
-<body>
-<script>
-description('Test script.beforeload will be fired when the module tag with src is prepared.');
-// Module will be executed asynchronously.
-window.jsTestIsAsync = true;
-debug('Module is not executed yet.');
-</script>
-<script src="../../../resources/js-test-post.js"></script>
-<script type="module" onbeforeload="finishJSTest()" src="resources/module-will-fire-beforeload.js"></script>
-</body>
-</html>
diff --git a/LayoutTests/media/media-blocked-by-beforeload-expected.txt b/LayoutTests/media/media-blocked-by-beforeload-expected.txt
deleted file mode 100644 (file)
index 6a34c07..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-
-Test to ensure that a media file blocked by a beforeload handler generates an error and does not block the document's 'load' event.
-
-*** Test initial state ***
-EXPECTED (video.networkState == '0') OK
-EXPECTED (video.error == 'null') OK
-
-*** Test blocking the 'src' attribute ***
-
-EVENT('beforeload')
-EXPECTED (event.target.tagName == 'VIDEO') OK
-blocking load of 'src'
-
-EVENT('error')
-EXPECTED (event.target.tagName == 'VIDEO') OK
-EXPECTED (video.error != 'null') OK
-EXPECTED (video.error.code == '4') OK
-EXPECTED (video.networkState == '3') OK
-
-*** Test using the <source> element ***
-
-EVENT('beforeload')
-EXPECTED (event.target.tagName == 'VIDEO') OK
-blocking load of first <source> element
-
-EVENT('beforeload')
-EXPECTED (event.target.tagName == 'VIDEO') OK
-allowing load of second <source> element
-
-EVENT('error')
-EXPECTED (event.target.tagName == 'SOURCE') OK
-EXPECTED (video.error == 'null') OK
-END OF TEST
-
diff --git a/LayoutTests/media/media-blocked-by-beforeload.html b/LayoutTests/media/media-blocked-by-beforeload.html
deleted file mode 100644 (file)
index b57ee34..0000000
+++ /dev/null
@@ -1,139 +0,0 @@
-<!doctype html>
-<html>
-<head>
-    <style>
-        video { background-color: yellow; width: 320px; height: 240px;}
-    </style>
-    <script src=media-file.js></script>
-    <script src=video-test.js></script>
-</head>
-<body>
-    <video controls ></video>
-    <p>Test to ensure that a media file blocked by a beforeload handler generates an error
-    and does not block the document's 'load' event.</p>
-
-    <script>
-        if (window.testRunner)
-            testRunner.dumpAsText();
-
-        var blockedURL;
-        var allowedURL;
-        var test;
-        var loadedmetadataFired = false;
-        var loadedFired = false;
-        var lastErrorFired = false;
-
-        function logEvent(evt)
-        {
-            consoleWrite("<br>EVENT('" + evt.type + "')");
-        }
-
-        function loadedmetadata(evt)
-        {
-            loadedmetadataFired = true;
-            checkEndTest();
-        }
-
-        function setupSourceTest()
-        {
-            consoleWrite("<br>*** Test using the &lt;source&gt; element ***");
-            blockedURL = relativeURL(video.src);
-            allowedURL = findMediaFile("audio", "content/test");
-
-            // Remove 'src' attribute so <source> will be used when we force a reload
-            video.removeAttribute('src');
-
-            var blockedSource = document.createElement('source');
-            blockedSource.src = blockedURL;
-            blockedSource.type = mimeTypeForExtension(blockedSource.src.split('.').pop());
-            video.appendChild(blockedSource);
-
-            var allowedSource = document.createElement('source');
-            allowedSource.src = allowedURL;
-            allowedSource.type = mimeTypeForExtension(allowedSource.src.split('.').pop());
-            video.appendChild(allowedSource);
-
-            test = 2;
-            video.load();
-        };
-
-        function error(evt)
-        {
-            logEvent(evt);
-            switch (test)
-            {
-                case 1:
-                    testExpected("event.target.tagName", "VIDEO");
-                    testExpected("video.error", null, "!=");
-                    testExpected("video.error.code", MediaError.MEDIA_ERR_SRC_NOT_SUPPORTED);
-                    testExpected("video.networkState", HTMLMediaElement.NETWORK_NO_SOURCE);
-
-                    setupSourceTest();
-                    break;
-                case 2:
-                    // The error should have been fired at the <source> and the media element should
-                    // not be in an error state.
-                    testExpected("event.target.tagName", "SOURCE");
-                    testExpected("video.error", null);
-                    lastErrorFired = true;
-                    checkEndTest();
-                    break;
-                case 3:
-                    failTest("Unexpected 'error' event fired!");
-                    break;
-            }
-        }
-
-        function beforeload(evt)
-        {
-            logEvent(evt);
-            testExpected("event.target.tagName", "VIDEO");
-            switch (test)
-            {
-                case 1:
-                    consoleWrite("blocking load of 'src'");
-                    evt.preventDefault();
-                    break;
-
-                case 2:
-                    if (relativeURL(evt.url) == blockedURL) {
-                        consoleWrite("blocking load of first &lt;source&gt; element");
-                        evt.preventDefault();
-                    } else {
-                        consoleWrite("allowing load of second &lt;source&gt; element");
-                    }
-                    break;
-            }
-        }
-
-        function loaded(evt)
-        {
-            loadedFired = true;
-            checkEndTest();
-        };
-
-        function checkEndTest()
-        {
-            if (loadedmetadataFired && loadedFired && lastErrorFired)
-                endTest();
-        };
-
-        findMediaElement();
-
-        video.addEventListener('loadedmetadata', loadedmetadata, true);
-        video.addEventListener('beforeload', beforeload, true);
-        video.addEventListener('error', error, true);
-        window.addEventListener('load', loaded, true);
-
-        consoleWrite("*** Test initial state ***");
-        testExpected("video.networkState", HTMLMediaElement.NETWORK_EMPTY);
-        testExpected("video.error", null);
-
-        consoleWrite("<br>*** Test blocking the 'src' attribute ***");
-        test = 1;
-        var mediaFile = findMediaFile("video", "content/test");
-        video.src = mediaFile;
-    </script>
-
-</body>
-</html>
diff --git a/LayoutTests/media/video-beforeload-remove-source-expected.txt b/LayoutTests/media/video-beforeload-remove-source-expected.txt
deleted file mode 100644 (file)
index f104257..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-
-Test passes if it does not crash.
diff --git a/LayoutTests/media/video-beforeload-remove-source.html b/LayoutTests/media/video-beforeload-remove-source.html
deleted file mode 100644 (file)
index 8bdf59a..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-<!DOCTYPE html>
-<html>
-    <head>
-        <script src=../resources/gc.js></script>
-        <script>
-        if (window.testRunner) {
-            testRunner.dumpAsText();
-            testRunner.waitUntilDone();
-        }
-
-        function removeNodes(start, end) {
-            var range = document.createRange();
-            range.setStart(start, 0);
-            range.setEnd(end, 0);
-            range.deleteContents();
-        }
-
-        function beforeLoadFunc()
-        {
-            document.removeEventListener("beforeload", beforeLoadFunc, true);
-            var start = document.getElementById("start");
-            var end = document.getElementById("end");
-            removeNodes(start, end);
-
-            gc();
-            if (window.testRunner)
-                setTimeout("testRunner.notifyDone()", 0);
-        }
-
-        document.addEventListener("beforeload", beforeLoadFunc, true);
-        </script>
-    </head>
-    <body>
-    <video controls autoplay>
-        <b id="start"></b>
-        <source src="content/test.mp4" type="video/mp4">
-        <source src="content/test.ogv" type="video/ogg">
-        <b id="end"></b>
-    </video>
-    <div>Test passes if it does not crash.</div>
-    </body>
-</html>
index f9b643d..555d23b 100644 (file)
@@ -7,7 +7,6 @@ PASS ArrayBuffer.length is 1
 FAIL AudioContext.length should be 0. Threw exception ReferenceError: Can't find variable: AudioContext
 FAIL AutocompleteErrorEvent.length should be 1. Threw exception ReferenceError: Can't find variable: AutocompleteErrorEvent
 PASS AnimationEvent.length is 1
-PASS BeforeLoadEvent.length is 1
 PASS Blob.length is 0
 PASS CloseEvent.length is 1
 PASS CustomEvent.length is 1
index 41f72ea..056ee92 100644 (file)
@@ -1551,7 +1551,6 @@ webkit.org/b/89650 svg/W3C-SVG-1.1/animate-elem-82-t.svg [ Failure Pass ]
 webkit.org/b/89650 [ Debug ] svg/W3C-SVG-1.1/animate-elem-85-t.svg [ Failure Pass ]
 webkit.org/b/89650 svg/W3C-SVG-1.1/struct-dom-06-b.svg [ Failure Pass ]
 
-webkit.org/b/89811 media/media-blocked-by-beforeload.html [ Failure Pass ]
 webkit.org/b/84856 media/media-controller-playback.html [ Crash Failure Timeout Pass ]
 
 webkit.org/b/83878 webkit.org/b/198830 media/track/track-mode.html [ Failure Pass ]
index 32421b2..872b783 100644 (file)
@@ -1556,7 +1556,6 @@ editing/style/style-boundary-001.html [ Failure Pass ]
 editing/undo/undo-delete-boundary.html [ Failure Pass ]
 fast/block/nested-renderers.html [ Crash Pass ]
 fast/box-shadow/box-shadow-with-zero-radius.html [ Pass ImageOnlyFailure ]
-fast/dom/HTMLObjectElement/beforeload-set-text-crash.xhtml [ Crash Pass ]
 fast/dom/URL-attribute-reflection.html [ Crash Pass ]
 fast/dynamic/window-scrollbars-test.html [ Failure Pass ]
 fast/events/check-defocus-event-order-when-triggered-by-tab.html [ Failure Pass ]
@@ -1884,7 +1883,6 @@ compositing/video/video-border-radius.html [ Skip ]
 compositing/video/video-object-position.html [ Skip ]
 fast/canvas/canvas-createPattern-video-loading.html [ Skip ]
 fast/canvas/canvas-createPattern-video-modify.html [ Skip ]
-fast/dom/beforeload/video-before-load.html [ Skip ]
 fast/dom/FileList-iterator.html [ Skip ]
 fast/dom/HTMLAnchorElement/anchor-file-blob-download-no-extension.html [ Skip ]
 fast/forms/scroll-into-view-and-show-validation-message.html [ Skip ]
index f0c22c3..dec46d3 100644 (file)
@@ -1169,8 +1169,6 @@ webkit.org/b/171886 imported/w3c/web-platform-tests/streams/readable-byte-stream
 
 webkit.org/b/171957 fast/animation/request-animation-frame-time-unit.html [ Pass Failure ]
 
-webkit.org/b/172772 [ Release ] http/tests/cache/cancel-during-revalidation-succeeded.html [ Skip ]
-
 webkit.org/b/172454 http/tests/navigation/statistics.html [ Pass Failure ]
 
 webkit.org/b/17373 fast/forms/file/input-file-write-files-using-open-panel.html [ Skip ]
index e11c706..672c0c0 100644 (file)
@@ -1754,7 +1754,6 @@ fast/preloader/document-write-2.html [ Failure ]
 fast/preloader/document-write.html [ Failure ]
 fast/preloader/image-srcset.html [ Failure ]
 fast/replaced/invalid-object-with-fallback.html [ Failure ]
-fast/replaced/object-with-embed-url-param.html [ Failure ]
 fast/replaced/percent-height-in-anonymous-block.html [ Failure ]
 fast/ruby/ruby-block-style-not-updated-with-before-after-content.html [ Failure ]
 fast/ruby/ruby-block-style-not-updated.html [ Failure ]
index f9b643d..555d23b 100644 (file)
@@ -7,7 +7,6 @@ PASS ArrayBuffer.length is 1
 FAIL AudioContext.length should be 0. Threw exception ReferenceError: Can't find variable: AudioContext
 FAIL AutocompleteErrorEvent.length should be 1. Threw exception ReferenceError: Can't find variable: AutocompleteErrorEvent
 PASS AnimationEvent.length is 1
-PASS BeforeLoadEvent.length is 1
 PASS Blob.length is 0
 PASS CloseEvent.length is 1
 PASS CustomEvent.length is 1
index f9b643d..555d23b 100644 (file)
@@ -7,7 +7,6 @@ PASS ArrayBuffer.length is 1
 FAIL AudioContext.length should be 0. Threw exception ReferenceError: Can't find variable: AudioContext
 FAIL AutocompleteErrorEvent.length should be 1. Threw exception ReferenceError: Can't find variable: AutocompleteErrorEvent
 PASS AnimationEvent.length is 1
-PASS BeforeLoadEvent.length is 1
 PASS Blob.length is 0
 PASS CloseEvent.length is 1
 PASS CustomEvent.length is 1
index 4064abb..6d9be11 100644 (file)
@@ -1057,7 +1057,6 @@ media/audio-only-video-intrinsic-size.html [ Skip ] # Timeout
 media/audio-play-event.html [ Skip ] # Timeout
 media/controls-drag-timebar.html [ Skip ] # Timeout
 media/event-attributes.html [ Skip ] # Timeout
-media/media-blocked-by-beforeload.html [ Skip ] # Timeout
 media/media-captions.html [ Skip ] # Timeout
 media/media-continues-playing-after-replace-source.html [ Skip ] # Timeout
 media/media-controls-cancel-events.html [ Skip ] # Timeout
index c35d4c9..9dddae4 100644 (file)
@@ -7,7 +7,6 @@ PASS ArrayBuffer.length is 1
 FAIL AudioContext.length should be 0. Threw exception ReferenceError: Can't find variable: AudioContext
 FAIL AutocompleteErrorEvent.length should be 1. Threw exception ReferenceError: Can't find variable: AutocompleteErrorEvent
 PASS AnimationEvent.length is 1
-PASS BeforeLoadEvent.length is 1
 PASS Blob.length is 0
 PASS CloseEvent.length is 1
 PASS CustomEvent.length is 1
index 4235f44..293a350 100644 (file)
@@ -7,7 +7,6 @@ PASS ArrayBuffer.length is 1
 FAIL AudioContext.length should be 0. Threw exception ReferenceError: Can't find variable: AudioContext
 FAIL AutocompleteErrorEvent.length should be 1. Threw exception ReferenceError: Can't find variable: AutocompleteErrorEvent
 PASS AnimationEvent.length is 1
-PASS BeforeLoadEvent.length is 1
 PASS Blob.length is 0
 PASS CloseEvent.length is 1
 PASS CustomEvent.length is 1
index 7866035..f72bedb 100644 (file)
@@ -277,8 +277,6 @@ http/tests/security/javascriptURL/xss-ALLOWED-to-javascript-url-sub-frame-2-leve
 
 # These tests use Flash, which is not a good idea, because it is not installed on all machines that run tests.
 # WebKitTestRunner detects attempts to use Flash, and raises an assertion.
-fast/dom/beforeload/flash-before-load.html [ Skip ]
-fast/dom/beforeload/remove-flash-in-beforeload-listener.html [ Skip ]
 fast/loader/sandboxed-plugin-crash.html [ Skip ]
 plugins/hidden-iframe-with-swf-plugin.html [ Skip ]
 plugins/plugin-document-load-prevented-userscript.html [ Skip ]
index 8e875c5..7ec56ce 100644 (file)
@@ -1,5 +1,4 @@
 CONSOLE MESSAGE: 1. Updating the layout with an embed object inside an iframe
-CONSOLE MESSAGE: 2. beforeload for the object fires and dirties the style tree
 CONSOLE MESSAGE: Tried to use an unsupported plug-in.
 CONSOLE MESSAGE: 3. Updated layout. The test passed.
 This tests entering HTMLPlugInElement::isReplacementObscured() while the top document's style tree is dirty.
index edd02f0..e6cf84b 100644 (file)
@@ -1,3 +1,27 @@
+2020-05-20  Chris Dumez  <cdumez@apple.com>
+
+        Disable support for BeforeLoadEvent
+        https://bugs.webkit.org/show_bug.cgi?id=212140
+        <rdar://problem/62847577>
+
+        Reviewed by Antti Koivisto.
+
+        Disable support for BeforeLoadEvent. Other browsers do not support it and
+        Chrome dropped it shortly after the fork:
+        - https://bugs.chromium.org/p/chromium/issues/detail?id=333318
+
+        This is a synchronous event and therefore very dangerous.
+
+        Test: fast/frames/didBecomeCurrentDocumentInFrame-crash.html
+
+        * bindings/js/WebCoreBuiltinNames.h:
+        * dom/BeforeLoadEvent.idl:
+        * dom/Node.cpp:
+        (WebCore::Node::dispatchBeforeLoadEvent):
+        * page/RuntimeEnabledFeatures.h:
+        (WebCore::RuntimeEnabledFeatures::setLegacyBeforeLoadEventEnabled):
+        (WebCore::RuntimeEnabledFeatures::legacyBeforeLoadEventEnabled const):
+
 2020-05-20  Zalan Bujtas  <zalan@apple.com>
 
         RenderObject::VisibleRectContext members should not be prefixed with m_
index 9cd843d..c91b4df 100644 (file)
@@ -52,6 +52,7 @@ namespace WebCore {
     macro(AuthenticatorAssertionResponse) \
     macro(AuthenticatorAttestationResponse) \
     macro(AuthenticatorResponse) \
+    macro(BeforeLoadEvent) \
     macro(BlobEvent) \
     macro(Cache) \
     macro(CacheStorage) \
index 5dd04ce..733ec3e 100644 (file)
@@ -25,7 +25,8 @@
  */
 
 [
-    Constructor(DOMString type, optional BeforeLoadEventInit eventInitDict)
+    Constructor(DOMString type, optional BeforeLoadEventInit eventInitDict),
+    EnabledAtRuntime=LegacyBeforeLoadEvent
 ] interface BeforeLoadEvent : Event {
     readonly attribute DOMString url;
 };
index 416bf16..a4a03c8 100644 (file)
@@ -64,6 +64,7 @@
 #include "RenderBox.h"
 #include "RenderTextControl.h"
 #include "RenderView.h"
+#include "RuntimeEnabledFeatures.h"
 #include "SVGElement.h"
 #include "ScopedEventQueue.h"
 #include "ScriptDisallowedScope.h"
@@ -2410,6 +2411,9 @@ void Node::dispatchDOMActivateEvent(Event& underlyingClickEvent)
 
 bool Node::dispatchBeforeLoadEvent(const String& sourceURL)
 {
+    if (!RuntimeEnabledFeatures::sharedFeatures().legacyBeforeLoadEventEnabled())
+        return true;
+
     if (!document().hasListenerType(Document::BEFORELOAD_LISTENER))
         return true;
 
index c6122b2..9847388 100644 (file)
@@ -359,6 +359,9 @@ public:
     void setCSSLogicalEnabled(bool isEnabled) { m_CSSLogicalEnabled = isEnabled; }
     bool cssLogicalEnabled() const { return m_CSSLogicalEnabled; }
 
+    void setLegacyBeforeLoadEventEnabled(bool isEnabled) { m_legacyBeforeLoadEventEnabled = isEnabled; }
+    bool legacyBeforeLoadEventEnabled() const { return m_legacyBeforeLoadEventEnabled; }
+
     void setLineHeightUnitsEnabled(bool isEnabled) { m_lineHeightUnitsEnabled = isEnabled; }
     bool lineHeightUnitsEnabled() const { return m_lineHeightUnitsEnabled; }
 
@@ -631,6 +634,8 @@ private:
     bool m_isInAppBrowserPrivacyEnabled { false };
     bool m_needsInAppBrowserPrivacyQuirks { false };
 
+    bool m_legacyBeforeLoadEventEnabled { false };
+
 #if ENABLE(ACCESSIBILITY_ISOLATED_TREE)
     bool m_accessibilityIsolatedTree { false };
 #endif