id of iframe incorrectly sets window name
authorcdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 28 Oct 2015 04:40:04 +0000 (04:40 +0000)
committercdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 28 Oct 2015 04:40:04 +0000 (04:40 +0000)
https://bugs.webkit.org/show_bug.cgi?id=150565

Reviewed by Darin Adler.

Source/WebCore:

As per the specification, the iframe's contentWindow name should be an
empty string if the frame's name attribute is unset:
http://www.whatwg.org/specs/web-apps/current-work/multipage/the-iframe-element.html#attr-iframe-name

Instead, WebKit was using the iframe's id as window name if the name
was unset.

Firefox, IE and Chrome behave according to the specification.

This is a merge of the following Blink commit:
https://src.chromium.org/viewvc/blink?revision=169803&view=revision

Test: fast/frames/iframe-no-name.html

* html/HTMLFrameElementBase.cpp:
(WebCore::HTMLFrameElementBase::parseAttribute):
(WebCore::HTMLFrameElementBase::insertedInto): Deleted.

LayoutTests:

Add a test to check that id of iframe incorrectly sets the window name
when the iframe's name is not set.

Also set frame names in a lot of layout tests so that they keep giving
the same output.

* fast/css-generated-content/positioned-div-with-floating-after-content-crash.html:
* fast/dom/Window/slow-unload-handler-overwritten-date.html:
* fast/dom/Window/timeout-callback-scope.html:
* fast/dom/Window/window-access-after-navigation.html:
* fast/dom/Window/window-collection-length-no-crash.html:
* fast/dom/Window/window-special-properties-expected.txt:
* fast/dom/microtask-detach.html:
* fast/dom/microtask-inorder.html:
* fast/dom/microtask-reverse.html:
* fast/dom/wrapper-context.html:
* fast/dom/xss-DENIED-javascript-variations.html:
* fast/events/onbeforeunload-focused-iframe.html:
* fast/events/open-window-from-another-frame.html:
* fast/events/popup-blocked-to-post-blank.html:
* fast/events/popup-blocking-click-in-iframe.html:
* fast/events/popup-when-select-change.html:
* fast/frames/detach-frame-during-focus.html:
* fast/frames/frame-inherit-noresize-from-frameset.html:
* fast/frames/frame-programmatic-noresize.html:
* fast/frames/frame-with-noresize-can-be-resized-after-removal-of-noresize.html:
* fast/frames/frame-with-noresize-can-be-resized-after-setting-noResize-to-false.html:
* fast/frames/iframe-no-name-expected.txt: Added.
* fast/frames/iframe-no-name.html: Added.
* fast/frames/unload-reparent-sibling-frame.html:
* fast/history/form-submit-in-frame-via-onclick.html:
* fast/history/form-submit-in-frame.html:
* fast/history/same-document-iframes-changing-fragment.html:
* fast/history/same-document-iframes-changing-pushstate.html:
* fast/history/saves-state-after-frame-nav.html:
* fast/images/exif-orientation-image-document.html:
* fast/loader/resources/subframe-navigate-during-main-frame-load2.html:
* fast/overflow/scrollRevealButton.html:
* fast/parser/xml-colon-entity.html:
* fast/parser/xml-declaration-missing-ending-mark.html:
* fast/scrolling/latching/scroll-nested-iframe.html:
* fullscreen/full-screen-frameset.html:
* http/tests/contentextensions/block-cookies-in-csp-report.html:
* http/tests/contentextensions/block-cookies-in-ping.html:
* http/tests/contentextensions/block-cookies-send.html:
* http/tests/contentextensions/block-csp-report.html:
* http/tests/contentextensions/block-everything-unless-domain-iframe.html:
* http/tests/contentextensions/block-ping.html:
* http/tests/contentextensions/hide-on-csp-report.html:
* http/tests/contentextensions/hide-on-ping.html:
* http/tests/loading/text-content-type-with-binary-extension.html:
* http/tests/misc/location-replace-crossdomain.html:
* http/tests/multipart/multipart-wait-before-boundary.html:
* http/tests/navigation/no-referrer-subframe.html:
* http/tests/security/cross-frame-access-child-explicit-domain.html:
* http/tests/security/cross-frame-access-document-direct.html:
* http/tests/security/cross-frame-access-parent-explicit-domain.html:
* http/tests/security/cross-frame-access-port-explicit-domain.html:
* http/tests/security/cross-frame-access-port.html:
* http/tests/security/dataURL/resources/foreign-domain-data-url-accessee-iframe.html:
* http/tests/security/dataURL/resources/foreign-domain-data-url-accessor-iframe.html:
* http/tests/security/dataURL/xss-DENIED-from-data-url-in-foreign-domain-subframe.html:
* http/tests/security/dataURL/xss-DENIED-from-data-url-sub-frame-2-level.html:
* http/tests/security/dataURL/xss-DENIED-from-data-url-sub-frame.html:
* http/tests/security/dataURL/xss-DENIED-from-data-url-to-data-url.html:
* http/tests/security/dataURL/xss-DENIED-to-data-url-from-data-url.html:
* http/tests/security/dataURL/xss-DENIED-to-data-url-sub-frame-2-level.html:
* http/tests/security/dataURL/xss-DENIED-to-data-url-sub-frame-uppercase.html:
* http/tests/security/dataURL/xss-DENIED-to-data-url-sub-frame.html:
* http/tests/security/host-compare-case-insensitive.html:
* http/tests/security/javascriptURL/javascriptURL-execution-context-frame-location-htmldom.html:
* http/tests/security/javascriptURL/javascriptURL-execution-context-frame-src-getAttribute-value.html:
* http/tests/security/javascriptURL/javascriptURL-execution-context-frame-src-htmldom.html:
* http/tests/security/javascriptURL/javascriptURL-execution-context-frame-src-setAttribute.html:
* http/tests/security/javascriptURL/javascriptURL-execution-context-frame-src-setAttributeNS.html:
* http/tests/security/javascriptURL/javascriptURL-execution-context-frame-src-setAttributeNode.html:
* http/tests/security/javascriptURL/javascriptURL-execution-context-frame-src-setAttributeNodeNS.html:
* http/tests/security/javascriptURL/javascriptURL-execution-context-iframe-src-getAttribute-value.html:
* http/tests/security/javascriptURL/javascriptURL-execution-context-iframe-src-htmldom.html:
* http/tests/security/javascriptURL/javascriptURL-execution-context-iframe-src-setAttribute.html:
* http/tests/security/javascriptURL/javascriptURL-execution-context-iframe-src-setAttributeNS.html:
* http/tests/security/javascriptURL/javascriptURL-execution-context-iframe-src-setAttributeNode.html:
* http/tests/security/javascriptURL/javascriptURL-execution-context-iframe-src-setAttributeNodeNS.html:
* http/tests/security/javascriptURL/resources/foreign-domain-javascript-url-accessee-iframe.html:
* http/tests/security/javascriptURL/resources/foreign-domain-javascript-url-accessor-iframe.html:
* http/tests/security/javascriptURL/xss-ALLOWED-from-javascript-url-sub-frame-2-level.html:
* http/tests/security/javascriptURL/xss-ALLOWED-from-javascript-url-sub-frame.html:
* http/tests/security/javascriptURL/xss-ALLOWED-to-javascript-url-from-javscript-url.html:
* http/tests/security/javascriptURL/xss-ALLOWED-to-javascript-url-sub-frame.html:
* http/tests/security/protocol-compare-case-insensitive.html:
* http/tests/security/referrer-policy-redirect-link.html:
* http/tests/security/sandboxed-iframe-blocks-access-from-parent.html:
* http/tests/security/srcdoc-inherits-referrer-for-forms.html:
* http/tests/security/xssAuditor/full-block-base-href.html:
* http/tests/security/xssAuditor/full-block-iframe-javascript-url.html:
* http/tests/security/xssAuditor/full-block-iframe-no-inherit.php:
* http/tests/security/xssAuditor/full-block-javascript-link.html:
* http/tests/security/xssAuditor/full-block-link-onclick.html:
* http/tests/security/xssAuditor/full-block-object-tag.html:
* http/tests/security/xssAuditor/full-block-script-tag-cross-domain.html:
* http/tests/security/xssAuditor/full-block-script-tag-with-source.html:
* http/tests/security/xssAuditor/full-block-script-tag.html:
* http/tests/security/xssAuditor/malformed-xss-protection-header-1.html:
* http/tests/security/xssAuditor/malformed-xss-protection-header-2.html:
* http/tests/security/xssAuditor/malformed-xss-protection-header-3.html:
* http/tests/security/xssAuditor/malformed-xss-protection-header-4.html:
* http/tests/security/xssAuditor/malformed-xss-protection-header-5.html:
* http/tests/security/xssAuditor/malformed-xss-protection-header-6.html:
* http/tests/security/xssAuditor/malformed-xss-protection-header-7.html:
* http/tests/security/xssAuditor/malformed-xss-protection-header-8.html:
* http/tests/security/xssAuditor/malformed-xss-protection-header-9.html:
* http/tests/security/xssAuditor/report-script-tag-replace-state.html:
* http/tests/security/xssAuditor/report-script-tag.html:
* http/tests/security/xssAuditor/resources/utilities.js:
(sendRequestFromIFrame):
* http/tests/security/xssAuditor/xss-protection-parsing-02.html:
* http/tests/security/xssAuditor/xss-protection-parsing-03.html:
* http/tests/security/xssAuditor/xss-protection-parsing-04.html:
* platform/mac/webarchive/archive-empty-frame-dom-expected.txt:
* plugins/plugin-remove-subframe.html:
* webarchive/archive-empty-frame-dom-expected.webarchive:
* webarchive/archive-empty-frame-dom.html:

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

128 files changed:
LayoutTests/ChangeLog
LayoutTests/fast/css-generated-content/positioned-div-with-floating-after-content-crash.html
LayoutTests/fast/dom/Window/slow-unload-handler-overwritten-date.html
LayoutTests/fast/dom/Window/timeout-callback-scope.html
LayoutTests/fast/dom/Window/window-access-after-navigation.html
LayoutTests/fast/dom/Window/window-collection-length-no-crash.html
LayoutTests/fast/dom/Window/window-special-properties-expected.txt
LayoutTests/fast/dom/microtask-detach.html
LayoutTests/fast/dom/microtask-inorder.html
LayoutTests/fast/dom/microtask-reverse.html
LayoutTests/fast/dom/wrapper-context.html
LayoutTests/fast/dom/xss-DENIED-javascript-variations.html
LayoutTests/fast/events/onbeforeunload-focused-iframe.html
LayoutTests/fast/events/open-window-from-another-frame.html
LayoutTests/fast/events/popup-blocked-to-post-blank.html
LayoutTests/fast/events/popup-blocking-click-in-iframe.html
LayoutTests/fast/events/popup-when-select-change.html
LayoutTests/fast/frames/detach-frame-during-focus.html
LayoutTests/fast/frames/frame-inherit-noresize-from-frameset.html
LayoutTests/fast/frames/frame-programmatic-noresize.html
LayoutTests/fast/frames/frame-with-noresize-can-be-resized-after-removal-of-noresize.html
LayoutTests/fast/frames/frame-with-noresize-can-be-resized-after-setting-noResize-to-false.html
LayoutTests/fast/frames/iframe-no-name-expected.txt [new file with mode: 0644]
LayoutTests/fast/frames/iframe-no-name.html [new file with mode: 0644]
LayoutTests/fast/frames/sandboxed-iframe-plugins.html
LayoutTests/fast/frames/unload-reparent-sibling-frame.html
LayoutTests/fast/history/form-submit-in-frame-via-onclick.html
LayoutTests/fast/history/form-submit-in-frame.html
LayoutTests/fast/history/same-document-iframes-changing-fragment.html
LayoutTests/fast/history/same-document-iframes-changing-pushstate.html
LayoutTests/fast/history/saves-state-after-frame-nav.html
LayoutTests/fast/images/exif-orientation-image-document.html
LayoutTests/fast/loader/resources/subframe-navigate-during-main-frame-load2.html
LayoutTests/fast/overflow/scrollRevealButton.html
LayoutTests/fast/parser/xml-colon-entity.html
LayoutTests/fast/parser/xml-declaration-missing-ending-mark.html
LayoutTests/fast/scrolling/latching/scroll-nested-iframe.html
LayoutTests/fullscreen/full-screen-frameset.html
LayoutTests/http/tests/contentextensions/block-cookies-in-csp-report.html
LayoutTests/http/tests/contentextensions/block-cookies-in-ping.html
LayoutTests/http/tests/contentextensions/block-cookies-send.html
LayoutTests/http/tests/contentextensions/block-csp-report.html
LayoutTests/http/tests/contentextensions/block-everything-unless-domain-iframe.html
LayoutTests/http/tests/contentextensions/block-ping.html
LayoutTests/http/tests/contentextensions/hide-on-csp-report.html
LayoutTests/http/tests/contentextensions/hide-on-ping.html
LayoutTests/http/tests/loading/redirect-methods.html
LayoutTests/http/tests/loading/text-content-type-with-binary-extension.html
LayoutTests/http/tests/misc/location-replace-crossdomain.html
LayoutTests/http/tests/multipart/multipart-wait-before-boundary.html
LayoutTests/http/tests/navigation/no-referrer-subframe.html
LayoutTests/http/tests/navigation/resources/forward-and-cancel-frames.html
LayoutTests/http/tests/security/cross-frame-access-child-explicit-domain.html
LayoutTests/http/tests/security/cross-frame-access-document-direct.html
LayoutTests/http/tests/security/cross-frame-access-parent-explicit-domain.html
LayoutTests/http/tests/security/cross-frame-access-port-explicit-domain.html
LayoutTests/http/tests/security/cross-frame-access-port.html
LayoutTests/http/tests/security/cross-frame-access-protocol-explicit-domain.html
LayoutTests/http/tests/security/cross-frame-access-protocol.html
LayoutTests/http/tests/security/dataURL/resources/foreign-domain-data-url-accessee-iframe.html
LayoutTests/http/tests/security/dataURL/resources/foreign-domain-data-url-accessor-iframe.html
LayoutTests/http/tests/security/dataURL/xss-DENIED-from-data-url-in-foreign-domain-subframe.html
LayoutTests/http/tests/security/dataURL/xss-DENIED-from-data-url-sub-frame-2-level.html
LayoutTests/http/tests/security/dataURL/xss-DENIED-from-data-url-sub-frame.html
LayoutTests/http/tests/security/dataURL/xss-DENIED-from-data-url-to-data-url.html
LayoutTests/http/tests/security/dataURL/xss-DENIED-to-data-url-from-data-url.html
LayoutTests/http/tests/security/dataURL/xss-DENIED-to-data-url-sub-frame-2-level.html
LayoutTests/http/tests/security/dataURL/xss-DENIED-to-data-url-sub-frame-uppercase.html
LayoutTests/http/tests/security/dataURL/xss-DENIED-to-data-url-sub-frame.html
LayoutTests/http/tests/security/host-compare-case-insensitive.html
LayoutTests/http/tests/security/javascriptURL/javascriptURL-execution-context-frame-location-htmldom.html
LayoutTests/http/tests/security/javascriptURL/javascriptURL-execution-context-frame-src-getAttribute-value.html
LayoutTests/http/tests/security/javascriptURL/javascriptURL-execution-context-frame-src-htmldom.html
LayoutTests/http/tests/security/javascriptURL/javascriptURL-execution-context-frame-src-setAttribute.html
LayoutTests/http/tests/security/javascriptURL/javascriptURL-execution-context-frame-src-setAttributeNS.html
LayoutTests/http/tests/security/javascriptURL/javascriptURL-execution-context-frame-src-setAttributeNode.html
LayoutTests/http/tests/security/javascriptURL/javascriptURL-execution-context-frame-src-setAttributeNodeNS.html
LayoutTests/http/tests/security/javascriptURL/javascriptURL-execution-context-iframe-src-getAttribute-value.html
LayoutTests/http/tests/security/javascriptURL/javascriptURL-execution-context-iframe-src-htmldom.html
LayoutTests/http/tests/security/javascriptURL/javascriptURL-execution-context-iframe-src-setAttribute.html
LayoutTests/http/tests/security/javascriptURL/javascriptURL-execution-context-iframe-src-setAttributeNS.html
LayoutTests/http/tests/security/javascriptURL/javascriptURL-execution-context-iframe-src-setAttributeNode.html
LayoutTests/http/tests/security/javascriptURL/javascriptURL-execution-context-iframe-src-setAttributeNodeNS.html
LayoutTests/http/tests/security/javascriptURL/resources/foreign-domain-javascript-url-accessee-iframe.html
LayoutTests/http/tests/security/javascriptURL/resources/foreign-domain-javascript-url-accessor-iframe.html
LayoutTests/http/tests/security/javascriptURL/xss-ALLOWED-from-javascript-url-sub-frame-2-level.html
LayoutTests/http/tests/security/javascriptURL/xss-ALLOWED-from-javascript-url-sub-frame.html
LayoutTests/http/tests/security/javascriptURL/xss-ALLOWED-to-javascript-url-from-javscript-url.html
LayoutTests/http/tests/security/javascriptURL/xss-ALLOWED-to-javascript-url-sub-frame-2-level.html
LayoutTests/http/tests/security/javascriptURL/xss-ALLOWED-to-javascript-url-sub-frame.html
LayoutTests/http/tests/security/protocol-compare-case-insensitive.html
LayoutTests/http/tests/security/referrer-policy-redirect-link.html
LayoutTests/http/tests/security/sandboxed-iframe-blocks-access-from-parent.html
LayoutTests/http/tests/security/srcdoc-inherits-referrer-for-forms.html
LayoutTests/http/tests/security/xssAuditor/full-block-base-href.html
LayoutTests/http/tests/security/xssAuditor/full-block-iframe-javascript-url.html
LayoutTests/http/tests/security/xssAuditor/full-block-iframe-no-inherit.php
LayoutTests/http/tests/security/xssAuditor/full-block-javascript-link.html
LayoutTests/http/tests/security/xssAuditor/full-block-link-onclick.html
LayoutTests/http/tests/security/xssAuditor/full-block-object-tag.html
LayoutTests/http/tests/security/xssAuditor/full-block-script-tag-cross-domain.html
LayoutTests/http/tests/security/xssAuditor/full-block-script-tag-with-source.html
LayoutTests/http/tests/security/xssAuditor/full-block-script-tag.html
LayoutTests/http/tests/security/xssAuditor/malformed-xss-protection-header-1.html
LayoutTests/http/tests/security/xssAuditor/malformed-xss-protection-header-2.html
LayoutTests/http/tests/security/xssAuditor/malformed-xss-protection-header-3.html
LayoutTests/http/tests/security/xssAuditor/malformed-xss-protection-header-4.html
LayoutTests/http/tests/security/xssAuditor/malformed-xss-protection-header-5.html
LayoutTests/http/tests/security/xssAuditor/malformed-xss-protection-header-6.html
LayoutTests/http/tests/security/xssAuditor/malformed-xss-protection-header-7.html
LayoutTests/http/tests/security/xssAuditor/malformed-xss-protection-header-8.html
LayoutTests/http/tests/security/xssAuditor/malformed-xss-protection-header-9.html
LayoutTests/http/tests/security/xssAuditor/report-script-tag-replace-state.html
LayoutTests/http/tests/security/xssAuditor/report-script-tag.html
LayoutTests/http/tests/security/xssAuditor/resources/utilities.js
LayoutTests/http/tests/security/xssAuditor/xss-protection-parsing-02.html
LayoutTests/http/tests/security/xssAuditor/xss-protection-parsing-03.html
LayoutTests/http/tests/security/xssAuditor/xss-protection-parsing-04.html
LayoutTests/platform/mac/webarchive/archive-empty-frame-dom-expected.txt
LayoutTests/platform/mac/webarchive/archive-empty-frame-source-expected.txt
LayoutTests/plugins/get-url-with-iframe-target.html
LayoutTests/plugins/plugin-remove-subframe.html
LayoutTests/webarchive/archive-empty-frame-dom-expected.webarchive
LayoutTests/webarchive/archive-empty-frame-dom.html
LayoutTests/webarchive/archive-empty-frame-source-expected.webarchive
LayoutTests/webarchive/archive-empty-frame-source.html
Source/WebCore/ChangeLog
Source/WebCore/html/HTMLFrameElementBase.cpp

index 48fcc41..48ce1a7 100644 (file)
@@ -1,3 +1,133 @@
+2015-10-27  Chris Dumez  <cdumez@apple.com>
+
+        id of iframe incorrectly sets window name
+        https://bugs.webkit.org/show_bug.cgi?id=150565
+
+        Reviewed by Darin Adler.
+
+        Add a test to check that id of iframe incorrectly sets the window name
+        when the iframe's name is not set.
+
+        Also set frame names in a lot of layout tests so that they keep giving
+        the same output.
+
+        * fast/css-generated-content/positioned-div-with-floating-after-content-crash.html:
+        * fast/dom/Window/slow-unload-handler-overwritten-date.html:
+        * fast/dom/Window/timeout-callback-scope.html:
+        * fast/dom/Window/window-access-after-navigation.html:
+        * fast/dom/Window/window-collection-length-no-crash.html:
+        * fast/dom/Window/window-special-properties-expected.txt:
+        * fast/dom/microtask-detach.html:
+        * fast/dom/microtask-inorder.html:
+        * fast/dom/microtask-reverse.html:
+        * fast/dom/wrapper-context.html:
+        * fast/dom/xss-DENIED-javascript-variations.html:
+        * fast/events/onbeforeunload-focused-iframe.html:
+        * fast/events/open-window-from-another-frame.html:
+        * fast/events/popup-blocked-to-post-blank.html:
+        * fast/events/popup-blocking-click-in-iframe.html:
+        * fast/events/popup-when-select-change.html:
+        * fast/frames/detach-frame-during-focus.html:
+        * fast/frames/frame-inherit-noresize-from-frameset.html:
+        * fast/frames/frame-programmatic-noresize.html:
+        * fast/frames/frame-with-noresize-can-be-resized-after-removal-of-noresize.html:
+        * fast/frames/frame-with-noresize-can-be-resized-after-setting-noResize-to-false.html:
+        * fast/frames/iframe-no-name-expected.txt: Added.
+        * fast/frames/iframe-no-name.html: Added.
+        * fast/frames/unload-reparent-sibling-frame.html:
+        * fast/history/form-submit-in-frame-via-onclick.html:
+        * fast/history/form-submit-in-frame.html:
+        * fast/history/same-document-iframes-changing-fragment.html:
+        * fast/history/same-document-iframes-changing-pushstate.html:
+        * fast/history/saves-state-after-frame-nav.html:
+        * fast/images/exif-orientation-image-document.html:
+        * fast/loader/resources/subframe-navigate-during-main-frame-load2.html:
+        * fast/overflow/scrollRevealButton.html:
+        * fast/parser/xml-colon-entity.html:
+        * fast/parser/xml-declaration-missing-ending-mark.html:
+        * fast/scrolling/latching/scroll-nested-iframe.html:
+        * fullscreen/full-screen-frameset.html:
+        * http/tests/contentextensions/block-cookies-in-csp-report.html:
+        * http/tests/contentextensions/block-cookies-in-ping.html:
+        * http/tests/contentextensions/block-cookies-send.html:
+        * http/tests/contentextensions/block-csp-report.html:
+        * http/tests/contentextensions/block-everything-unless-domain-iframe.html:
+        * http/tests/contentextensions/block-ping.html:
+        * http/tests/contentextensions/hide-on-csp-report.html:
+        * http/tests/contentextensions/hide-on-ping.html:
+        * http/tests/loading/text-content-type-with-binary-extension.html:
+        * http/tests/misc/location-replace-crossdomain.html:
+        * http/tests/multipart/multipart-wait-before-boundary.html:
+        * http/tests/navigation/no-referrer-subframe.html:
+        * http/tests/security/cross-frame-access-child-explicit-domain.html:
+        * http/tests/security/cross-frame-access-document-direct.html:
+        * http/tests/security/cross-frame-access-parent-explicit-domain.html:
+        * http/tests/security/cross-frame-access-port-explicit-domain.html:
+        * http/tests/security/cross-frame-access-port.html:
+        * http/tests/security/dataURL/resources/foreign-domain-data-url-accessee-iframe.html:
+        * http/tests/security/dataURL/resources/foreign-domain-data-url-accessor-iframe.html:
+        * http/tests/security/dataURL/xss-DENIED-from-data-url-in-foreign-domain-subframe.html:
+        * http/tests/security/dataURL/xss-DENIED-from-data-url-sub-frame-2-level.html:
+        * http/tests/security/dataURL/xss-DENIED-from-data-url-sub-frame.html:
+        * http/tests/security/dataURL/xss-DENIED-from-data-url-to-data-url.html:
+        * http/tests/security/dataURL/xss-DENIED-to-data-url-from-data-url.html:
+        * http/tests/security/dataURL/xss-DENIED-to-data-url-sub-frame-2-level.html:
+        * http/tests/security/dataURL/xss-DENIED-to-data-url-sub-frame-uppercase.html:
+        * http/tests/security/dataURL/xss-DENIED-to-data-url-sub-frame.html:
+        * http/tests/security/host-compare-case-insensitive.html:
+        * http/tests/security/javascriptURL/javascriptURL-execution-context-frame-location-htmldom.html:
+        * http/tests/security/javascriptURL/javascriptURL-execution-context-frame-src-getAttribute-value.html:
+        * http/tests/security/javascriptURL/javascriptURL-execution-context-frame-src-htmldom.html:
+        * http/tests/security/javascriptURL/javascriptURL-execution-context-frame-src-setAttribute.html:
+        * http/tests/security/javascriptURL/javascriptURL-execution-context-frame-src-setAttributeNS.html:
+        * http/tests/security/javascriptURL/javascriptURL-execution-context-frame-src-setAttributeNode.html:
+        * http/tests/security/javascriptURL/javascriptURL-execution-context-frame-src-setAttributeNodeNS.html:
+        * http/tests/security/javascriptURL/javascriptURL-execution-context-iframe-src-getAttribute-value.html:
+        * http/tests/security/javascriptURL/javascriptURL-execution-context-iframe-src-htmldom.html:
+        * http/tests/security/javascriptURL/javascriptURL-execution-context-iframe-src-setAttribute.html:
+        * http/tests/security/javascriptURL/javascriptURL-execution-context-iframe-src-setAttributeNS.html:
+        * http/tests/security/javascriptURL/javascriptURL-execution-context-iframe-src-setAttributeNode.html:
+        * http/tests/security/javascriptURL/javascriptURL-execution-context-iframe-src-setAttributeNodeNS.html:
+        * http/tests/security/javascriptURL/resources/foreign-domain-javascript-url-accessee-iframe.html:
+        * http/tests/security/javascriptURL/resources/foreign-domain-javascript-url-accessor-iframe.html:
+        * http/tests/security/javascriptURL/xss-ALLOWED-from-javascript-url-sub-frame-2-level.html:
+        * http/tests/security/javascriptURL/xss-ALLOWED-from-javascript-url-sub-frame.html:
+        * http/tests/security/javascriptURL/xss-ALLOWED-to-javascript-url-from-javscript-url.html:
+        * http/tests/security/javascriptURL/xss-ALLOWED-to-javascript-url-sub-frame.html:
+        * http/tests/security/protocol-compare-case-insensitive.html:
+        * http/tests/security/referrer-policy-redirect-link.html:
+        * http/tests/security/sandboxed-iframe-blocks-access-from-parent.html:
+        * http/tests/security/srcdoc-inherits-referrer-for-forms.html:
+        * http/tests/security/xssAuditor/full-block-base-href.html:
+        * http/tests/security/xssAuditor/full-block-iframe-javascript-url.html:
+        * http/tests/security/xssAuditor/full-block-iframe-no-inherit.php:
+        * http/tests/security/xssAuditor/full-block-javascript-link.html:
+        * http/tests/security/xssAuditor/full-block-link-onclick.html:
+        * http/tests/security/xssAuditor/full-block-object-tag.html:
+        * http/tests/security/xssAuditor/full-block-script-tag-cross-domain.html:
+        * http/tests/security/xssAuditor/full-block-script-tag-with-source.html:
+        * http/tests/security/xssAuditor/full-block-script-tag.html:
+        * http/tests/security/xssAuditor/malformed-xss-protection-header-1.html:
+        * http/tests/security/xssAuditor/malformed-xss-protection-header-2.html:
+        * http/tests/security/xssAuditor/malformed-xss-protection-header-3.html:
+        * http/tests/security/xssAuditor/malformed-xss-protection-header-4.html:
+        * http/tests/security/xssAuditor/malformed-xss-protection-header-5.html:
+        * http/tests/security/xssAuditor/malformed-xss-protection-header-6.html:
+        * http/tests/security/xssAuditor/malformed-xss-protection-header-7.html:
+        * http/tests/security/xssAuditor/malformed-xss-protection-header-8.html:
+        * http/tests/security/xssAuditor/malformed-xss-protection-header-9.html:
+        * http/tests/security/xssAuditor/report-script-tag-replace-state.html:
+        * http/tests/security/xssAuditor/report-script-tag.html:
+        * http/tests/security/xssAuditor/resources/utilities.js:
+        (sendRequestFromIFrame):
+        * http/tests/security/xssAuditor/xss-protection-parsing-02.html:
+        * http/tests/security/xssAuditor/xss-protection-parsing-03.html:
+        * http/tests/security/xssAuditor/xss-protection-parsing-04.html:
+        * platform/mac/webarchive/archive-empty-frame-dom-expected.txt:
+        * plugins/plugin-remove-subframe.html:
+        * webarchive/archive-empty-frame-dom-expected.webarchive:
+        * webarchive/archive-empty-frame-dom.html:
+
 2015-10-27  Jiewen Tan  <jiewen_tan@apple.com>
 
         Null dereference loading Blink layout test editing/execCommand/format-block-uneditable-crash.html
index aeaeee2..0373d32 100644 (file)
@@ -8,4 +8,4 @@ function runTest() {
 }
 window.onload = runTest;
 </script>
-<iframe id="frame" src="resources/positioned-div-with-floating-after-content-crash-frame1.html"></iframe>
+<iframe id="frame" name="frame" src="resources/positioned-div-with-floating-after-content-crash-frame1.html"></iframe>
index 1d1d10d..7f7d880 100644 (file)
@@ -28,6 +28,6 @@ function loaded() {
     Succeeds if it does not crash.
 </p>
 <p id="results" class="pass"></p>
-<iframe id="theiframe" style="border: 0" src="resources/slow-unload-handler-overwritten-date1.html">
+<iframe id="theiframe" name="theiframe" style="border: 0" src="resources/slow-unload-handler-overwritten-date1.html">
 </body>
 </html>
index fd01a35..db0ef9d 100644 (file)
@@ -37,6 +37,6 @@ function checkResult() {
 <p>Test verifies that a timeout callback is run in the proper execution context. 2 timeouts are set on a child iframe's window. 'Closure' callback should execute in the main page, 'string' callback should execute in the iframe. Test passes if you see 2 lines 'PASS' below.</p>
 <div id=closureResult>FAIL</div>
 <div id=stringResult>FAIL</div>
-<iframe style="display:none" src="about:blank" id=testIframe></iframe>
+<iframe style="display:none" src="about:blank" id=testIframe name=testIframe></iframe>
 </body>
 </html>
index 810e55c..95ce1ae 100644 (file)
@@ -26,6 +26,6 @@ function checkWindowAccess()
 <p>Test for <a href="http://bugs.webkit.org/show_bug.cgi?id=27394">bug 27394</a>:
 properties on a window object should be accessible after the frame of the window object has navigated to another page.</p>
 <div id='result'>FAILED</div>
-<iframe id='subframe' onload='checkWindowAccess()'></iframe>
+<iframe id='subframe' name='subframe' onload='checkWindowAccess()'></iframe>
 </body>
 </html>
index 46696e0..92ec4aa 100644 (file)
@@ -3,7 +3,7 @@
 <body>
 <p id="description"></p>
 <br>
-<iframe id="subframe"></iframe>
+<iframe id="subframe" name='subframe'></iframe>
 <br>
 This tests that window.frames.length does not crash the browser after the
 frame navigates away from the current page. You should see "SUCCESS" below
index 4bbe4b9..b0ff6a8 100644 (file)
@@ -42,8 +42,8 @@ Embed by id/name mixed: collection(4) EMBED(id) EMBED(name) EMBED(name) EMBED(id
 Nonexistent iframe name: undefined
 Iframe by name (unique): single WINDOW
 Iframe by name (multiple): single WINDOW
-Iframe by id (unique): single WINDOW
-Iframe by id (multiple): single WINDOW
+Iframe by id (unique): single IFRAME(id)
+Iframe by id (multiple): collection(2) IFRAME(id) IFRAME(id)
 Iframe by id/name mixed: single WINDOW
 
 Nonexistent span name: undefined
@@ -53,7 +53,7 @@ Span by id (unique): single SPAN(id)
 Span by id (multiple): collection(2) SPAN(id) SPAN(id)
 Span by id/name mixed: collection(2) SPAN(id) SPAN(id)
 
-Mixed by id: single WINDOW
+Mixed by id: collection(7) IMG(id) FORM(id) APPLET(id) EMBED(id) OBJECT(id) IFRAME(id) SPAN(id)
 Mixed by name: single WINDOW
 Mixed by id (no iframe): collection(6) IMG(id) FORM(id) APPLET(id) EMBED(id) OBJECT(id) SPAN(id)
 Mixed by name (no iframe): collection(5) IMG(name) FORM(name) APPLET(name) EMBED(name) OBJECT(name)
index 8977732..f550729 100644 (file)
@@ -7,8 +7,8 @@ if (window.testRunner) {
 }
 </script>
 <body>
-<iframe id="frame1"></iframe>
-<iframe id="frame2"></iframe>
+<iframe id="frame1" name="frame1"></iframe>
+<iframe id="frame2" name="frame2"></iframe>
 <script>
 
 (function() {
index 79c8e2f..9f53bc2 100644 (file)
@@ -6,8 +6,8 @@ if (window.testRunner) {
     testRunner.waitUntilDone();
 }
 </script>
-<iframe id="frame1"></iframe>
-<iframe id="frame2"></iframe>
+<iframe id="frame1" name="frame1"></iframe>
+<iframe id="frame2" name="frame2"></iframe>
 <script>
 
 var iframe1 = document.querySelector("#frame1").contentWindow;
index b1b4e77..b6a2bcf 100644 (file)
@@ -6,8 +6,8 @@ if (window.testRunner) {
     testRunner.waitUntilDone();
 }
 </script>
-<iframe id="frame1"></iframe>
-<iframe id="frame2"></iframe>
+<iframe id="frame1" name="frame1"></iframe>
+<iframe id="frame2" name="frame2"></iframe>
 <script>
 
 var iframe1 = document.querySelector("#frame1").contentWindow;
index 0f34be3..7b5c9be 100644 (file)
@@ -4,7 +4,7 @@ Tests that node wrappers are created in the context to which they belong.
 You should see PASS below.
 <br>
 <div id="output"></div>
-<iframe id="inner" src="resources/wrapper-context-inner.html"></iframe>
+<iframe id="inner" name="inner" src="resources/wrapper-context-inner.html"></iframe>
 <script>
 if (window.testRunner) {
     testRunner.dumpAsText();
index 4e09d97..b994691 100644 (file)
@@ -31,7 +31,7 @@ function runTest() {
 </head>
 <body onload="runTest()">
 <br>
-<iframe id = 'DUPA' src="data:text/html,<p>Inner text should not be replaced.<p>"></iframe>
+<iframe id = 'DUPA' name='DUPA' src="data:text/html,<p>Inner text should not be replaced.<p>"></iframe>
 
 </body>
 </html>
index 55bcfe5..49da93f 100644 (file)
@@ -2,7 +2,7 @@
 <body>
     New window with beforeUnload handler.<br>
     You should see "beforeUnload" in the console log if you try to close the window.<br>
-    <iframe src="resources/onbeforeunload-focused-iframe-frame.html" id="focusedFrame"></iframe>
+    <iframe src="resources/onbeforeunload-focused-iframe-frame.html" id="focusedFrame" name="focusedFrame"></iframe>
     <script>
         if (window.testRunner) {
             testRunner.dumpAsText();
index db19794..3f5c7d0 100644 (file)
@@ -35,7 +35,7 @@
         This tests that window.open works across frames.<br>
         To run manually click the link below.<br>
         <a href="resources/greenbox.png" id="link">GreenBox or Success page.</a><br>
-        <iframe src="resources/open-window-from-another-frame-otherFrame.html" id="otherFrame"></iframe>
+        <iframe src="resources/open-window-from-another-frame-otherFrame.html" id="otherFrame" name="otherFrame"></iframe>
         <div id="res"></div>
     </body>
 </html>
index 4ba21a5..84337c1 100644 (file)
@@ -27,6 +27,6 @@ Window object. Otherwise, the test passes.
 <form id="form2" action="data:text/html,<b>hello!</b><script>window.testRunner && testRunner.notifyDone()</script>" target="target">
 <input type="submit" value="Submit local page Javascript"/>
 </form>
-<iframe id="target"></iframe>
+<iframe id="target" name="target"></iframe>
 </body>
 </html>
index bab684f..0549c62 100644 (file)
@@ -51,7 +51,7 @@
         </script>
     </head>
     <body style="border: 0; margin: 0" onload="test()">
-        <iframe style="border: 0; margin: 0" src="resources/popup-blocking-click-in-iframe-otherFrame.html" id="otherFrame"></iframe>
+        <iframe style="border: 0; margin: 0" src="resources/popup-blocking-click-in-iframe-otherFrame.html" id="otherFrame" name="otherFrame"></iframe>
 
         <p>This tests that popup blocking does not supress windows opened in an iframe if the event handler is a function from an enclosing frame.</p>
         <p>To run manually click the link in the iframe above with popup blocking enabled.</p>
index c7e3125..b87112a 100644 (file)
@@ -45,6 +45,6 @@ If the pop-up was not blocked then there will be an PASS message. Otherwise, the
 <form id="form2" action="data:text/html,<b>hello!</b><script>window.testRunner && testRunner.notifyDone()</script>" target="panel">
 <input type="submit" value="Submit local page Javascript"/>
 </form>
-<iframe id="target"></iframe><iframe id="panel"></iframe>
+<iframe id="target" name="target"></iframe><iframe id="panel" name="panel"></iframe>
 </body>
 </html>
index 880ae7d..48e5ccc 100644 (file)
@@ -23,5 +23,5 @@ function startTest() {
 </script>
 <div>
  <input value="foo" id="outerInput">
- <iframe onload="startTest()" id="frame1" height="100" width="540" srcdoc="&lt;input id='innerInput'>"></iframe>
+ <iframe onload="startTest()" id="frame1" name="frame1" height="100" width="540" srcdoc="&lt;input id='innerInput'>"></iframe>
 </div>
index 7463438..96ff948 100644 (file)
@@ -22,7 +22,7 @@ function runTests()
 </script>
 </head>
 <frameset cols="200,*" border="10" noresize>
-    <frame id="testFrame" src="about:blank">
-    <frame id="results" src="data:text/html,<p id='description'>This test can only be run using DRT.</p><pre id='console'></pre>">
+    <frame id="testFrame" name="testFrame" src="about:blank">
+    <frame id="results" name="results" src="data:text/html,<p id='description'>This test can only be run using DRT.</p><pre id='console'></pre>">
 </frameset>
 </html>
index b94211b..70f3421 100644 (file)
@@ -45,7 +45,7 @@ function runTests()
 </script>
 </head>
 <frameset cols="200,*" border="10">
-    <frame id="testFrame" src="about:blank">
-    <frame id="results" src="data:text/html,<p id='description'>This test can only be run using DRT.</p><pre id='console'></pre>">
+    <frame id="testFrame" name="testFrame" src="about:blank">
+    <frame id="results" name="results" src="data:text/html,<p id='description'>This test can only be run using DRT.</p><pre id='console'></pre>">
 </frameset>
 </html>
index a54f842..8c963ac 100644 (file)
@@ -22,7 +22,7 @@ function runTests()
 </script>
 </head>
 <frameset cols="200,*" border="10">
-    <frame id="testFrame" src="about:blank" noresize>
-    <frame id="results" src="data:text/html,<p id='description'>This test can only be run using DRT.</p><pre id='console'></pre>">
+    <frame id="testFrame" name="testFrame" src="about:blank" noresize>
+    <frame id="results" name="results" src="data:text/html,<p id='description'>This test can only be run using DRT.</p><pre id='console'></pre>">
 </frameset>
 </html>
index 0d466e3..3a8190f 100644 (file)
@@ -22,7 +22,7 @@ function runTests()
 </script>
 </head>
 <frameset cols="200,*" border="10">
-    <frame id="testFrame" src="about:blank" noresize>
-    <frame id="results" src="data:text/html,<p id='description'>This test can only be run using DRT.</p><pre id='console'></pre>">
+    <frame id="testFrame" name="testFrame" src="about:blank" noresize>
+    <frame id="results" name="results" src="data:text/html,<p id='description'>This test can only be run using DRT.</p><pre id='console'></pre>">
 </frameset>
 </html>
diff --git a/LayoutTests/fast/frames/iframe-no-name-expected.txt b/LayoutTests/fast/frames/iframe-no-name-expected.txt
new file mode 100644 (file)
index 0000000..33c066f
--- /dev/null
@@ -0,0 +1,12 @@
+Checks that the id of an iframe does not set the contentWindow's name if the iframe's name is not set.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS frames[0].name is ""
+PASS frames[1].name is "name"
+PASS frames[2].name is "name"
+PASS successfullyParsed is true
+
+TEST COMPLETE
+  
diff --git a/LayoutTests/fast/frames/iframe-no-name.html b/LayoutTests/fast/frames/iframe-no-name.html
new file mode 100644 (file)
index 0000000..db506c4
--- /dev/null
@@ -0,0 +1,18 @@
+<!DOCTYPE html>
+<html>
+<head>
+<link rel="help" href="http://www.whatwg.org/specs/web-apps/current-work/multipage/the-iframe-element.html#attr-iframe-name">
+<script src="../../resources/js-test.js"></script>
+</head>
+<body>
+<iframe id="id"></iframe>
+<iframe name="name"></iframe>
+<iframe id="id" name="name"></iframe>
+<script>
+description("Checks that the id of an iframe does not set the contentWindow's name if the iframe's name is not set.");
+shouldBeEqualToString("frames[0].name", "");
+shouldBeEqualToString("frames[1].name", "name");
+shouldBeEqualToString("frames[2].name", "name");
+</script>
+</body>
+</html>
index 2978f0d..1a449df 100644 (file)
@@ -30,11 +30,11 @@ window.onload = function() {
 
     <!-- Applets -->
     
-    <iframe id="appletFrame1" 
+    <iframe id="appletFrame1" name="appletFrame1" 
             style="width: 200px; height: 100px;" 
             src="resources/sandboxed-iframe-plugins-frame-applet.html"> 
     </iframe> 
-    <iframe id="appletFrame2" 
+    <iframe id="appletFrame2" name="appletFrame2"
             style="width: 200px; height: 100px;" 
             sandbox="allow-same-origin allow-scripts" 
             src="resources/sandboxed-iframe-plugins-frame-applet.html"> 
@@ -42,11 +42,11 @@ window.onload = function() {
 
     <!-- Embeds -->
     
-    <iframe id="embedFrame1"
+    <iframe id="embedFrame1" name="embedFrame1"
             style="width: 200px; height: 100px;"
             src="resources/sandboxed-iframe-plugins-frame-embed.html">
     </iframe>
-    <iframe id="embedFrame2"
+    <iframe id="embedFrame2" name="embedFrame2"
             style="width: 200px; height: 100px;"
             sandbox="allow-same-origin"
             src="resources/sandboxed-iframe-plugins-frame-embed.html">
@@ -54,11 +54,11 @@ window.onload = function() {
 
     <!-- Objects -->
     
-    <iframe id="objectFrame1"
+    <iframe id="objectFrame1" name="objectFrame1"
             style="width: 200px; height: 100px;"
             src="resources/sandboxed-iframe-plugins-frame-object.html">
     </iframe>
-    <iframe id="objectFrame2"
+    <iframe id="objectFrame2" name="objectFrame2"
             style="width: 200px; height: 100px;"
             sandbox="allow-same-origin"
             src="resources/sandboxed-iframe-plugins-frame-object.html">
index c1e8e6e..7fd9197 100644 (file)
@@ -4,8 +4,8 @@
 
 <div id="container">
     <div id="inside">
-        <iframe id="frame1" srcdoc="frame1"></iframe>
-        <iframe id="frame2" srcdoc="frame2"></iframe>
+        <iframe id="frame1" name="frame1" srcdoc="frame1"></iframe>
+        <iframe id="frame2" name="frame2" srcdoc="frame2"></iframe>
     </div>
 </div>
 
index d108a5e..683f527 100644 (file)
@@ -39,7 +39,7 @@ function submitForm()
 }
 </script>
 
-<iframe id="the-frame" src="resources/form-with-onclick-submit.html" onload="submitForm()"></iframe>
+<iframe id="the-frame" name="the-frame" src="resources/form-with-onclick-submit.html" onload="submitForm()"></iframe>
 
 </body>
 </html>
index 7ac0d82..f3de54d 100644 (file)
@@ -39,7 +39,7 @@ function submitForm()
 }
 </script>
 
-<iframe id="the-frame" src="resources/form-with-input-submit.html" onload="submitForm()"></iframe>
+<iframe id="the-frame" name="the-frame" src="resources/form-with-input-submit.html" onload="submitForm()"></iframe>
 
 </body>
 </html>
index f5330dc..5970754 100644 (file)
@@ -7,8 +7,8 @@
 <p id="description"></p>
 <pre id="console"></pre>
 
-<iframe src="data:text/plain,iframe1" id="iframe1"></iframe> 
-<iframe src="data:text/plain,iframe2" id="iframe2"></iframe> 
+<iframe src="data:text/plain,iframe1" id="iframe1" name="iframe1"></iframe> 
+<iframe src="data:text/plain,iframe2" id="iframe2" name="iframe2"></iframe> 
 
 <script>
 var wentBack = false;
@@ -63,4 +63,4 @@ var jsTestIsAsync = true;
 </script>  
 <script src="../../resources/js-test-post.js"></script>
 </body>
-</html>
\ No newline at end of file
+</html>
index 2c4cf0b..b336f4d 100644 (file)
@@ -7,8 +7,8 @@
 <p id="description"></p>
 <pre id="console"></pre>
 
-<iframe src="data:text/plain,iframe1" id="iframe1"></iframe> 
-<iframe src="data:text/plain,iframe2" id="iframe2"></iframe> 
+<iframe src="data:text/plain,iframe1" id="iframe1" name="iframe1"></iframe> 
+<iframe src="data:text/plain,iframe2" id="iframe2" name="iframe2"></iframe> 
 
 <script>
 var wentBack = false;
@@ -63,4 +63,4 @@ var jsTestIsAsync = true;
 </script>  
 <script src="../../resources/js-test-post.js"></script>
 </body>
-</html>
\ No newline at end of file
+</html>
index bb41c7a..a10e131 100644 (file)
@@ -60,7 +60,7 @@ onload = function () {
 
 <a href="resources/subframe-with-form.html" id="link" target="frame">Link</a>
 <br>
-<iframe id="frame" src="resources/subframe.html" onload="frameLoaded()"></iframe>
+<iframe id="frame" name="frame" src="resources/subframe.html" onload="frameLoaded()"></iframe>
 
 </body>
 </html>
index 5de3e9f..921b3e5 100644 (file)
@@ -13,8 +13,8 @@ function log(str) {
     console.appendChild(li);
 }
 
-function imageSize(id) {
-    var img = window.frames[id].document.querySelector('img');
+function imageSize(name) {
+    var img = window.frames[name].document.querySelector('img');
     return [img.offsetWidth, img.offsetHeight];
 }
 
@@ -41,17 +41,17 @@ iframe { display: inline-block; margin-right: 20px; margin-bottom: 10px; width:
 </head>
 <body onload="load()">
 <b>The images should be rotated respecting their EXIF orientation. In image documents, this happens independent of WebKitShouldRespectImageOrientation.</b><br><br>
-<iframe id="img1" src="resources/exif-orientation-1-ul.jpg" frameborder=0></iframe>
-<iframe id="img2" src="resources/exif-orientation-2-ur.jpg" frameborder=0></iframe>
-<iframe id="img3" src="resources/exif-orientation-3-lr.jpg" frameborder=0></iframe>
-<iframe id="img4" src="resources/exif-orientation-4-lol.jpg" frameborder=0></iframe>
+<iframe name="img1" src="resources/exif-orientation-1-ul.jpg" frameborder=0></iframe>
+<iframe name="img2" src="resources/exif-orientation-2-ur.jpg" frameborder=0></iframe>
+<iframe name="img3" src="resources/exif-orientation-3-lr.jpg" frameborder=0></iframe>
+<iframe name="img4" src="resources/exif-orientation-4-lol.jpg" frameborder=0></iframe>
 <br>
-<iframe id="img5" src="resources/exif-orientation-5-lu.jpg" frameborder=0></iframe>
-<iframe id="img6" src="resources/exif-orientation-6-ru.jpg" frameborder=0></iframe>
-<iframe id="img7" src="resources/exif-orientation-7-rl.jpg" frameborder=0></iframe>
-<iframe id="img8" src="resources/exif-orientation-8-llo.jpg" frameborder=0></iframe>
+<iframe name="img5" src="resources/exif-orientation-5-lu.jpg" frameborder=0></iframe>
+<iframe name="img6" src="resources/exif-orientation-6-ru.jpg" frameborder=0></iframe>
+<iframe name="img7" src="resources/exif-orientation-7-rl.jpg" frameborder=0></iframe>
+<iframe name="img8" src="resources/exif-orientation-8-llo.jpg" frameborder=0></iframe>
 <br>
-<iframe id="img9" src="resources/exif-orientation-9-u.jpg" frameborder=0></iframe>
+<iframe name="img9" src="resources/exif-orientation-9-u.jpg" frameborder=0></iframe>
 <br>
 <ul id="console"></ul>
 </body>
index 313b7c1..de96187 100644 (file)
@@ -13,7 +13,7 @@ function runTest()
 <body onload="runTest();">
 This test navigates an iframe while it's onload handler is still running.<br>
 The iframe navigation should *not* result in a second back-history item being created for the top level navigation.<br>
-<iframe id="subframe" src="about:blank"></iframe><br>
+<iframe id="subframe" name="subframe" src="about:blank"></iframe><br>
 
 </body>
 
index 3d0646c..c94e27c 100644 (file)
@@ -2,7 +2,7 @@
 <body onload="document.getElementById('fr').contentDocument.getElementById('bt').focus();">
 <script>if(window.testRunner) testRunner.dumpChildFrameScrollPositions();</script>
 <div style="height:500px"></div>
-<iframe src="resources/scrollButton1.html" id="fr"></iframe>
+<iframe src="resources/scrollButton1.html" id="fr" name="fr"></iframe>
 <div style="height:500px"></div>
 </body>
-</html>
\ No newline at end of file
+</html>
index ccdc18e..d37acc6 100644 (file)
@@ -10,6 +10,6 @@ if (window.testRunner) {
 
 <p>If you don't crash, you pass. A parsing error in the "xml-parser" subframe is expected.</p>
 
-<iframe id="xml-parser" src="resources/xml-colon-entity.xml"></iframe>
+<iframe id="xml-parser" name="xml-parser" src="resources/xml-colon-entity.xml"></iframe>
 </body>
 </html>
index 17f2235..1cc653a 100644 (file)
@@ -14,6 +14,6 @@ if (window.testRunner) {
 
 <p>If you don't crash, you pass. A parsing error in the "xml-parser" subframe is expected.</p>
 
-<iframe id="xml-parser" src="resources/xml-declaration-missing-ending-mark.xml"></iframe>
+<iframe id="xml-parser" name="xml-parser" src="resources/xml-declaration-missing-ending-mark.xml"></iframe>
 </body>
 </html>
index f232f51..3f80cde 100644 (file)
@@ -81,7 +81,7 @@ function setupTopLevel() {
     <div id="source" style="height: 20px">
         Put mouse inside the iframe (below) and flick downwards
     </div>
-    <iframe id="scrollable_iframe" src="resources/scroll_nested_iframe_test_outer.html" onload="setupTopLevel();">
+    <iframe id="scrollable_iframe" name="scrollable_iframe" src="resources/scroll_nested_iframe_test_outer.html" onload="setupTopLevel();">
     </iframe>
 </div>
 <div id="console"></div>
index 2036f00..400ce4c 100644 (file)
@@ -31,5 +31,5 @@ function runTest() {
 </script>
 <frameset rows="150,*">
     <frame name="header" src="resources/not-allowed.html" webkitfullscreenallowed onload="runTest()">
-    <frame id="frame" src="resources/inner.html" onload="runTest()">
+    <frame id="frame" name="frame" src="resources/inner.html" onload="runTest()">
 </frameset>
index a95fc21..98080b7 100644 (file)
@@ -35,6 +35,6 @@ This test creates a CSP violation report, but the report URL matches a 'block-co
 <img src="/cookies/resources/cookie-utility.php?queryfunction=setFooCookie"
     onerror="deletePing();">
 <div id="delete_ping_container"></div>
-<iframe id="result_frame"><!-- Will contain ping data received by server --></iframe>
+<iframe id="result_frame" name="result_frame"><!-- Will contain ping data received by server --></iframe>
 </body>
 
index d11f8b5..bacd00d 100644 (file)
@@ -49,7 +49,7 @@ function showPingResult() {
 This test sets a cookie, then follows a link with a ping attribute where the ping URL matches a 'block-cookie' rule.
 <img src="http://localhost:8000/cookies/resources/cookie-utility.php?queryfunction=setFooCookie"
     onerror="loadLinkWithPing();">
-<iframe id="link_frame"><!-- Will contain link with ping --></iframe>
-<iframe id="result_frame"><!-- Will contain ping data received by server --></iframe>
+<iframe id="link_frame" name="link_frame"><!-- Will contain link with ping --></iframe>
+<iframe id="result_frame" name="result_frame"><!-- Will contain ping data received by server --></iframe>
 </body>
 
index 807e420..576baaa 100644 (file)
@@ -26,4 +26,4 @@ function imageDone()
 This test loads a resource that sets a cookie, then verifies that the cookie is not sent out when it should be blocked.<br>
 <div id="logger"></div>
 <img src="http://127.0.0.1:8000/cookies/resources/cookie-utility.php?queryfunction=setFooCookie" onerror="imageDone();">
-<iframe id="iframe"></iframe>
+<iframe id="iframe" name="iframe"></iframe>
index cedfe38..11024c9 100644 (file)
@@ -32,6 +32,6 @@ function showPingResult() {
 <body>
 This test creates a CSP violation report, but the report URL matches a 'block' rule.
 <img src="resources/delete-ping.php?test=contentextensions-block-csp-report" onerror="loadCrossDomainImage();">
-<iframe id="result_frame"><!-- Will contain ping data received by server --></iframe>
+<iframe id="result_frame" name="result_frame"><!-- Will contain ping data received by server --></iframe>
 </body>
 
index dde302a..1238c47 100644 (file)
@@ -51,7 +51,7 @@ function showPingResult() {
 
 <body onload="loadLinkWithPing();">
 This test follows a link with a ping attribute where the ping URL matches a 'block' rule.
-<iframe id="link_frame"><!-- Will contain link with ping --></iframe>
-<iframe id="result_frame"><!-- Will contain ping data received by server --></iframe>
+<iframe id="link_frame" name="link_frame"><!-- Will contain link with ping --></iframe>
+<iframe id="result_frame" name="result_frame"><!-- Will contain ping data received by server --></iframe>
 </body>
 
index caaacdc..9c5cb5b 100644 (file)
@@ -30,6 +30,6 @@ This test creates a CSP violation report, but the report URL matches a 'css-disp
 <p class="foo">This text should be hidden once the report is sent.</p>
 <p class="bar">This text should remain visible.</p>
 <img src="resources/delete-ping.php?test=contentextensions-hide-on-csp-report" onerror="loadCrossDomainImage();">
-<iframe id="result_frame"><!-- Will contain ping data received by server --></iframe>
+<iframe id="result_frame" name="result_frame"><!-- Will contain ping data received by server --></iframe>
 </body>
 
index 5a54fd5..6a2427c 100644 (file)
@@ -36,6 +36,6 @@ This test follows a link with a ping attribute where the ping URL matches a 'css
 <img src="resources/delete-ping.php?test=contentextensions-hide-on-ping" onerror="clickOnLinkWithPing();">
 <a id="a" href="#a" ping="resources/save-ping.php?test=contentextensions-hide-on-ping" onclick="showPingResult();">Link with ping</a>
 </div>
-<iframe id="result_frame"><!-- Will contain ping data received by server --></iframe>
+<iframe id="result_frame" name="result_frame"><!-- Will contain ping data received by server --></iframe>
 </body>
 
index 0178579..55e2cdb 100644 (file)
@@ -21,6 +21,7 @@ function createFrame(index)
     var iframe = document.createElement("iframe");
     iframe.setAttribute("testCode", testCodes[index]);
     iframe.setAttribute("id", index);
+    iframe.setAttribute("name", index);
     iframe.setAttribute("height", "90px");
     document.body.appendChild(iframe);
     iframe.src="resources/redirect-methods-form.html";
index f43d34d..ef0f04f 100644 (file)
@@ -42,5 +42,5 @@
     <p id="result">
         Test running...
     </p>
-    <iframe id="iframe" src="resources/binaryData.sitx" onload="iframeLoaded()"></iframe>
+    <iframe id="iframe" name="iframe" src="resources/binaryData.sitx" onload="iframeLoaded()"></iframe>
 </body>
index 31795ec..2202500 100644 (file)
@@ -14,7 +14,7 @@ if (window.testRunner)
 </script>
 </head>
 <body onload="test();">
-<iframe id="crossDomainFrame" src="http://localhost:8000/misc/resources/failure.html"></iframe>
+<iframe id="crossDomainFrame" name="crossDomainFrame" src="http://localhost:8000/misc/resources/failure.html"></iframe>
 </body>
 </html>
 <!--     
index df2a261..780e68e 100644 (file)
@@ -18,6 +18,6 @@
 </head>
 <body>
     <p id="status">RUNNING...</p>
-    <iframe id="iframe" src="resources/multipart-wait-before-boundary.php">
+    <iframe id="iframe" name="iframe" src="resources/multipart-wait-before-boundary.php">
 </body>
 </html>
index e97b726..7fefcb7 100644 (file)
@@ -1,7 +1,7 @@
 <html><body>
 This tests behavior of "noreferrer" links in subframes. A referrer should not be sent and window.opener should remain null.<br/>
 <a id="link" href="resources/no-referrer-helper.php" rel="noreferrer" target="subframe">Load subframe</a>
-<iframe id="subframe" src="about:blank"></iframe>
+<iframe id="subframe" name="subframe" src="about:blank"></iframe>
 <script>
     window.name = "consoleWindow";
     if (window.testRunner) {
index 6023195..deb07a6 100644 (file)
@@ -9,7 +9,7 @@ function clickLink() {
 }
 </script>
 <!-- Child iframe -->
-<iframe id="frame1" src="about:blank"></iframe>
+<iframe id="frame1" name="frame1" src="about:blank"></iframe>
 <br>
 <p>This test checks that the backForward list is not corrupted when a frame load is canceled.
 <p>If testing manually, <a id="link" href="slow-resource.pl?delay=250" target="frame1">click here</a> and then Back.  Then click Forward and quickly click Stop.  Ensure that Back and Forward still work.
index 2818705..df29593 100644 (file)
@@ -3,7 +3,7 @@
     <script src="resources/cross-frame-access.js"></script>
 </head>
 <body>
-<iframe id="aFrame"></iframe>
+<iframe id="aFrame" name="aFrame"></iframe>
 <pre id="console"></pre>
 <script>
     var url = "http://127.0.0.1:8000/security/resources/cross-frame-iframe-with-explicit-domain-set.html";
index f9be3b8..4d7dd82 100644 (file)
@@ -19,6 +19,6 @@
 </script>
 <body>
     <p>Test cross-origin direct document access.</p>
-    <iframe id="theFrame" src="resources/cross-frame-iframe-for-document-direct-test.html"></iframe>
+    <iframe id="theFrame" name="theFrame" src="resources/cross-frame-iframe-for-document-direct-test.html"></iframe>
 </body>
 </html>
index eedb364..038704c 100644 (file)
@@ -3,7 +3,7 @@
     <script src="resources/cross-frame-access.js"></script>
 </head>
 <body>
-<iframe id="aFrame"></iframe>
+<iframe id="aFrame" name="aFrame"></iframe>
 <pre id="console"></pre>
 <script>
     // Explicitly set the domain.
index cff00c7..7d7a677 100644 (file)
@@ -4,7 +4,7 @@
 </head>
 <body>
 <p>This test currently fails because we check the port and protocol even if document.domain is explicitly set (rdar://problem/5366437).</p> 
-<iframe id="aFrame"></iframe>
+<iframe id="aFrame" name="aFrame"></iframe>
 <pre id="console"></pre>
 <script>
     // Explicitly set the domain.
index 98202ea..4e03085 100644 (file)
@@ -3,7 +3,7 @@
     <script src="resources/cross-frame-access.js"></script>
 </head>
 <body>
-<iframe id="aFrame"></iframe>
+<iframe id="aFrame" name="aFrame"></iframe>
 <pre id="console"></pre>
 <script>
     var url = "http://127.0.0.1:8080/security/resources/cross-frame-iframe.html";
index 6dc5fc3..812f6e4 100644 (file)
@@ -4,7 +4,7 @@
 </head>
 <body>
 <p>This test currently fails because we check the port and protocol even if document.domain is explicitly set (rdar://problem/5366437).</p> 
-<iframe id="aFrame"></iframe>
+<iframe id="aFrame" name="aFrame"></iframe>
 <pre id="console"></pre>
 <script>
     // Explicitly set the domain.
index 3f2e9f2..386f965 100644 (file)
@@ -3,7 +3,7 @@
     <script src="resources/cross-frame-access.js"></script>
 </head>
 <body>
-<iframe id="aFrame"></iframe>
+<iframe id="aFrame" name="aFrame"></iframe>
 <pre id="console"></pre>
 <script>
     var url = "https://127.0.0.1:8443/security/resources/cross-frame-iframe.html";
index b5cbaa2..db529f7 100644 (file)
@@ -1,7 +1,7 @@
 <html>
 <body>
     <p>Inner iframe on a foreign domain.</p>
-    <iframe id="aFrame"></iframe>
+    <iframe id="aFrame" name="aFrame"></iframe>
     <script>
         var url = "data:text/html,<html>"
             + "<head>"
index d3ec031..929c58b 100644 (file)
@@ -1,7 +1,7 @@
 <html>
 <body>
 <p>Inner iframe on a foreign domain.</p>
-<iframe id="aFrame"></iframe>
+<iframe id="aFrame" name="aFrame"></iframe>
 <script>
     window.onload = function() {
         var url = "data:text/html,<html>"
index 3d686d6..dcb8218 100644 (file)
@@ -13,6 +13,6 @@ if (window.testRunner) {
         is an iframe which loads a data: URL.  This tests that the data: URL loaded iframe does not have access
         to the main frame using top.document.</p>
     <p id='accessMe'>Pass: Cross frame access from a data: URL on a different domain was denied.</p>
-    <iframe id='aFrame' src="http://localhost:8000/security/dataURL/resources/foreign-domain-data-url-accessor-iframe.html" style="width: 400px; height:200px;"></iframe>
+    <iframe id='aFrame' name="aFrame" src="http://localhost:8000/security/dataURL/resources/foreign-domain-data-url-accessor-iframe.html" style="width: 400px; height:200px;"></iframe>
 </body>
 </html>
index 160be8d..9d05396 100644 (file)
@@ -39,7 +39,7 @@
 </head>
 <body onload="loaded();">
     <p>This tests that a data: URL loaded in an iframe inside another data: URL loaded iframe doesn't have access to the main frame.</p>
-    <iframe id="aFrame" style="width: 500px; height: 300px;"></iframe>
+    <iframe id="aFrame" name="aFrame" style="width: 500px; height: 300px;"></iframe>
     <p id='accessMe'>PASS: Cross frame access from a data: URL inside another data: URL was denied.</p>
 </body>
 </html>
index 10b02bd..155a157 100644 (file)
@@ -33,7 +33,7 @@
 </head>
 <body onload="loaded();">
     <p>This tests that a data: URL loaded in an iframe doesn't have access to its parent's frame</p>
-    <iframe id="aFrame"></iframe>
+    <iframe id="aFrame" name="aFrame"></iframe>
     <p id='accessMe'>PASS: Cross frame access from a data: URL was denied.</p>
 </body>
 </html>
index c13dc59..a3abd56 100644 (file)
@@ -60,7 +60,7 @@
                 +     "</scr" + "ipt>"
                 + "</head>"
                 + "<body onload='loaded();'>"
-                +     "<iframe id='inner'></iframe>"
+                +     "<iframe id='inner' name='inner'></iframe>"
                 +     "<p>Inner iframe.</p>"
                 +     "<button onclick='performTest();'>Test</button>"
                 +     "<pre id='console'></pre>"
index 37bcc77..80a5222 100644 (file)
@@ -43,6 +43,6 @@
 <body>
     <p>This tests that a data: URL loaded in an iframe inside another data: URL loaded iframe doesn't have access to its parent, the 
         first data: URL loaded iframe.</p>
-    <iframe id="aFrame" style="width: 500px; height: 300px;"></iframe>
+    <iframe id="aFrame" name="aFrame" style="width: 500px; height: 300px;"></iframe>
 </body>
 </html>
index 6696712..f88bd78 100644 (file)
@@ -71,7 +71,7 @@
 <body onload="loaded();">
     <p>This tests that the main frame doesn't have access to a data: URL loaded in an iframe inside another data: URL loaded iframe.</p>
     <button onclick="performTest()">Test</button>
-    <iframe id="aFrame" style="width: 500px; height: 300px;"></iframe>
+    <iframe id="aFrame" name="aFrame" style="width: 500px; height: 300px;"></iframe>
     <pre id='console'></pre>
 </body>
 </html>
index 2a0f725..8a1878f 100644 (file)
@@ -5,7 +5,7 @@
 <body>
     <p>This tests that the main frame can't access the contents of an iframe that contains a data: URL loaded page using the
         uppercased variant DATA:</p>
-    <iframe id="aFrame"></iframe>
+    <iframe id="aFrame" name="aFrame"></iframe>
     <pre id="console"></pre>
     <script>
         var url = "DATA:text/html,<html><scr" + "ipt>onload = function() { parent.postMessage(\'LOADED\', \'*\'); } </scr" + "ipt><body><p id=\'accessMe\'></p><p>Inner iframe.</p></body></html>";
index 1365bbf..a41d2af 100644 (file)
@@ -4,7 +4,7 @@
 </head>
 <body>
     <p>This tests that the main frame can't access the contents of an iframe that contains a data: URL loaded page</p>
-    <iframe id="aFrame"></iframe>
+    <iframe id="aFrame" name="aFrame"></iframe>
     <pre id="console"></pre>
     <script>
         var url = "data:text/html,<html><scr" + "ipt>onload = function() { parent.postMessage(\'LOADED\', \'*\'); } </scr" + "ipt><body><p id=\'accessMe\'></p><p>Inner iframe.</p></body></html>";
index 19d3471..89cf121 100644 (file)
@@ -10,7 +10,7 @@
 </head>
 <body>
     <p>This tests that the comparison of the host for security is done case insensitive.</p>
-    <iframe id="frameA" src="http://localhost:8000/security/resources/cross-frame-iframe.html"></iframe>
-    <iframe id="frameB" src="http://LOCALHOST:8000/security/resources/localhost-accesssor.html"></iframe>
+    <iframe id="frameA" name="frameA" src="http://localhost:8000/security/resources/cross-frame-iframe.html"></iframe>
+    <iframe id="frameB" name="frameB" src="http://LOCALHOST:8000/security/resources/localhost-accesssor.html"></iframe>
 </body>
 </html>
index 1ee1d7e..7d3d0e5 100644 (file)
@@ -38,7 +38,7 @@
     </script>
 </head>
 <frameset rows="10%,*">
-    <frame id='main' src="data:text/html,<p>This test passes as long as the word 'FAIL' and an accompanying message do not appear in the frame below.</p>">
-    <frame id='aFrame' src='http://localhost:8000/security/resources/cross-frame-iframe.html'>
+    <frame id='main' name='main' src="data:text/html,<p>This test passes as long as the word 'FAIL' and an accompanying message do not appear in the frame below.</p>">
+    <frame id='aFrame' name='aFrame' src='http://localhost:8000/security/resources/cross-frame-iframe.html'>
 </frameset>
 </html>
index da1b410..4ed12fa 100644 (file)
@@ -40,7 +40,7 @@
     </script>
 </head>
 <frameset rows="10%,*">
-    <frame id='main' src="data:text/html,<p>This test passes as long as the word 'FAIL' and an accompanying message do not appear in the frame below.</p>">
-    <frame id='aFrame' src='http://localhost:8000/security/resources/cross-frame-iframe.html'>
+    <frame id='main' name='main' src="data:text/html,<p>This test passes as long as the word 'FAIL' and an accompanying message do not appear in the frame below.</p>">
+    <frame id='aFrame' name='aFrame' src='http://localhost:8000/security/resources/cross-frame-iframe.html'>
 </frameset>
 </html>
index 7300774..45b92e7 100644 (file)
@@ -38,7 +38,7 @@
     </script>
 </head>
 <frameset rows="10%,*">
-    <frame id='main' src="data:text/html,<p>This test passes as long as the word 'FAIL' and an accompanying message do not appear in the frame below.</p>">
-    <frame id='aFrame' src='http://localhost:8000/security/resources/cross-frame-iframe.html'>
+    <frame id='main' name='main' src="data:text/html,<p>This test passes as long as the word 'FAIL' and an accompanying message do not appear in the frame below.</p>">
+    <frame id='aFrame' name='aFrame' src='http://localhost:8000/security/resources/cross-frame-iframe.html'>
 </frameset>
 </html>
index 7e571fd..6262618 100644 (file)
@@ -38,7 +38,7 @@
     </script>
 </head>
 <frameset rows="10%,*">
-    <frame id='main' src="data:text/html,<p>This test passes as long as the word 'FAIL' and an accompanying message do not appear in the frame below.</p>">
-    <frame id='aFrame' src='http://localhost:8000/security/resources/cross-frame-iframe.html'>
+    <frame id='main' name='main' src="data:text/html,<p>This test passes as long as the word 'FAIL' and an accompanying message do not appear in the frame below.</p>">
+    <frame id='aFrame' name='aFrame' src='http://localhost:8000/security/resources/cross-frame-iframe.html'>
 </frameset>
 </html>
index 96a3bfe..dbd79f1 100644 (file)
@@ -38,7 +38,7 @@
     </script>
 </head>
 <frameset rows="10%,*">
-    <frame id='main' src="data:text/html,<p>This test passes as long as the word 'FAIL' and an accompanying message do not appear in the frame below.</p>">
-    <frame id='aFrame' src='http://localhost:8000/security/resources/cross-frame-iframe.html'>
+    <frame id='main' name='main' src="data:text/html,<p>This test passes as long as the word 'FAIL' and an accompanying message do not appear in the frame below.</p>">
+    <frame id='aFrame' name='aFrame' src='http://localhost:8000/security/resources/cross-frame-iframe.html'>
 </frameset>
 </html>
index 337af04..54d14d0 100644 (file)
@@ -44,7 +44,7 @@
     </script>
 </head>
 <frameset rows="10%,*">
-    <frame id='main' src="data:text/html,<p>This test passes as long as the word 'FAIL' and an accompanying message do not appear in the frame below.</p>">
-    <frame id='aFrame' src='http://localhost:8000/security/resources/cross-frame-iframe.html'>
+    <frame id='main' name='main' src="data:text/html,<p>This test passes as long as the word 'FAIL' and an accompanying message do not appear in the frame below.</p>">
+    <frame id='aFrame' name='aFrame' src='http://localhost:8000/security/resources/cross-frame-iframe.html'>
 </frameset>
 </html>
index e55fc1e..43c971c 100644 (file)
@@ -44,7 +44,7 @@
     </script>
 </head>
 <frameset rows="10%,*">
-    <frame id='main' src="data:text/html,<p>This test passes as long as the word 'FAIL' and an accompanying message do not appear in the frame below.</p>">
-    <frame id='aFrame' src='http://localhost:8000/security/resources/cross-frame-iframe.html'>
+    <frame id='main' name='main' src="data:text/html,<p>This test passes as long as the word 'FAIL' and an accompanying message do not appear in the frame below.</p>">
+    <frame id='aFrame' name='aFrame' src='http://localhost:8000/security/resources/cross-frame-iframe.html'>
 </frameset>
 </html>
index 1c9d8a4..298876e 100644 (file)
@@ -46,6 +46,6 @@
 <body>
     <p>This test passes as long as the word 'FAIL' and an accompanying message do not appear in the subframe.</p>
     <pre id='console'></pre>
-    <iframe id='aFrame' src='http://localhost:8000/security/resources/cross-frame-iframe.html'></iframe>
+    <iframe id='aFrame' name='aFrame' src='http://localhost:8000/security/resources/cross-frame-iframe.html'></iframe>
 </body>
 </html>
index 1f5f6c4..5f8b750 100644 (file)
@@ -45,6 +45,6 @@
 <body>
     <p>This test passes as long as the word 'FAIL' and an accompanying message do not appear in the subframe.</p>
     <pre id='console'></pre>
-    <iframe id='aFrame' src='http://localhost:8000/security/resources/cross-frame-iframe.html'></iframe>
+    <iframe id='aFrame' name='aFrame' src='http://localhost:8000/security/resources/cross-frame-iframe.html'></iframe>
 </body>
 </html>
index 180737f..5ab5197 100644 (file)
@@ -45,6 +45,6 @@
 <body>
     <p>This test passes as long as the word 'FAIL' and an accompanying message do not appear in the subframe.</p>
     <pre id='console'></pre>
-    <iframe id='aFrame' src='http://localhost:8000/security/resources/cross-frame-iframe.html'></iframe>
+    <iframe id='aFrame' name='aFrame' src='http://localhost:8000/security/resources/cross-frame-iframe.html'></iframe>
 </body>
 </html>
index 85691b4..7bf062d 100644 (file)
@@ -45,6 +45,6 @@
 <body>
     <p>This test passes as long as the word 'FAIL' and an accompanying message do not appear in the subframe.</p>
     <pre id='console'></pre>
-    <iframe id='aFrame' src='http://localhost:8000/security/resources/cross-frame-iframe.html'></iframe>
+    <iframe id='aFrame' name='aFrame' src='http://localhost:8000/security/resources/cross-frame-iframe.html'></iframe>
 </body>
 </html>
index 821927f..ae95e0b 100644 (file)
@@ -51,6 +51,6 @@
 <body>
     <p>This test passes as long as the word 'FAIL' and an accompanying message do not appear in the subframe.</p>
     <pre id='console'></pre>
-    <iframe id='aFrame' src='http://localhost:8000/security/resources/cross-frame-iframe.html'></iframe>
+    <iframe id='aFrame' name='aFrame' src='http://localhost:8000/security/resources/cross-frame-iframe.html'></iframe>
 </body>
 </html>
index 69eb060..f3e5c54 100644 (file)
@@ -51,6 +51,6 @@
 <body>
     <p>This test passes as long as the word 'FAIL' and an accompanying message do not appear in the subframe.</p>
     <pre id='console'></pre>
-    <iframe id='aFrame' src='http://localhost:8000/security/resources/cross-frame-iframe.html'></iframe>
+    <iframe id='aFrame' name='aFrame' src='http://localhost:8000/security/resources/cross-frame-iframe.html'></iframe>
 </body>
 </html>
index dbb55e8..f3ecf7e 100644 (file)
@@ -1,7 +1,7 @@
 <html>
 <body>
     <p>Inner iframe on a foreign domain.</p>
-    <iframe id="aFrame"></iframe>
+    <iframe id="aFrame" name="aFrame"></iframe>
     <script>
         var url = "javascript:\"<html>"
             + "<head>"
index 3c11c94..f46c948 100644 (file)
@@ -1,7 +1,7 @@
 <html>
 <body>
     <p>Inner iframe on a foreign domain.</p>
-    <iframe id="aFrame"></iframe>
+    <iframe id="aFrame" name="aFrame"></iframe>
     <script>
         var url = "javascript:\"<html>"
             + "<head>"
index f9e65a7..85ab9be 100644 (file)
@@ -1,7 +1,7 @@
 <html>
 <body>
     <p>This tests that a javascript: URL loaded in an iframe inside another javascript: URL loaded iframe has access to the main frame.</p>
-    <iframe id="aFrame" style="width: 500px; height: 300px;"></iframe>
+    <iframe id="aFrame" name='aFrame' style="width: 500px; height: 300px;"></iframe>
     <p id='accessMe'>FAIL: Cross frame access from a javascript: URL inside another javascript: URL was denied.</p>
     <script>
         if (window.testRunner) {
index 2574ae6..ce83c72 100644 (file)
@@ -1,7 +1,7 @@
 <html>
 <body>
     <p>This tests that a javascript: URL loaded in an iframe has access to its parent's frame</p>
-    <iframe id="aFrame"></iframe>
+    <iframe id="aFrame" name="aFrame"></iframe>
     <p id='accessMe'>FAIL: Cross frame access from a javascript: URL was denied.</p>
     <script>
         if (window.testRunner) {
index 4102c23..17f9af7 100644 (file)
@@ -2,7 +2,7 @@
 <body>
     <p>This tests that a javascript: URL loaded in an iframe inside another javascript: URL loaded iframe has access to it's parent, the 
         first javascript: URL loaded iframe.</p>
-    <iframe id="aFrame" style="width: 500px; height: 300px;"></iframe>
+    <iframe id="aFrame" name="aFrame" style="width: 500px; height: 300px;"></iframe>
     <script>
         if (window.testRunner) {
             testRunner.dumpAsText();
index 13e9f8b..e7d6756 100644 (file)
@@ -70,7 +70,7 @@
 </head>
 <body>
     <p>This tests that the main frame has access to a javascript: URL loaded in an iframe inside another javascript: URL loaded iframe.</p>
-    <iframe id="aFrame" style="width: 500px; height: 300px;"></iframe>
+    <iframe id="aFrame" name="aFrame" style="width: 500px; height: 300px;"></iframe>
     <pre id='console'></pre>
 </body>
 </html>
index a437545..8b75448 100644 (file)
@@ -4,7 +4,7 @@
 </head>
 <body>
     <p>This tests that the main frame can access the contents of an iframe that contains a javascript: URL loaded page</p>
-    <iframe id="aFrame"></iframe>
+    <iframe id="aFrame" name="aFrame"></iframe>
     <pre id="console"></pre>
     <script>
         var url = "javascript:\"<html><scr" + "ipt>onload = function() { parent.postMessage(\'LOADED\', \'*\'); } </scr" + "ipt><body><p id=\'accessMe\'></p><p>Inner iframe.</p></body></html>\"";
index 68c6efc..16a5627 100644 (file)
@@ -3,7 +3,7 @@
     <script src="resources/cross-frame-access.js"></script>
 </head>
 <body>
-<iframe id="aFrame"></iframe>
+<iframe id="aFrame" name="aFrame"></iframe>
 <pre id="console"></pre>
 <script>
     var url = "HTTP://127.0.0.1:8000/security/resources/cross-frame-iframe.html";
index 4cac55c..c092a55 100644 (file)
@@ -20,6 +20,6 @@ function runTest() {
 This test checks the referrer policy is obeyed along the redirect chain.  The
 test passes if the referrer is https://127.0.0.1:8443
 </p>
-<iframe id="iframe" onload="runTest()" src="https://127.0.0.1:8443/security/resources/referrer-policy-redirect-link.html"></iframe>
+<iframe id="iframe" name="iframe" onload="runTest()" src="https://127.0.0.1:8443/security/resources/referrer-policy-redirect-link.html"></iframe>
 </body>
 </html>
index 42a684d..37d82cb 100644 (file)
@@ -19,6 +19,6 @@
     containing document shouldn't have script access to. This test passes if a
     console warning is generated, noting the access violation.</p>
 
-    <iframe src="resources/blank.html" id="testframe" sandbox onload="test();"></iframe>
+    <iframe src="resources/blank.html" id="testframe" name="testframe" sandbox onload="test();"></iframe>
 </body>
 </html>
index af02da0..e13fd11 100644 (file)
@@ -8,8 +8,8 @@ if (window.testRunner) {
 The srcdoc iframe below should use this document's URL as its referrer.
 <iframe srcdoc="
 This iframe logs information about its referrer:<br>
-<iframe id='tg'></iframe>
-<form target='tg' id='fm' method='GET' action='resources/referrer-policy-log.php'></form>
+<iframe id='tg' name='tg'></iframe>
+<form target='tg' id='fm' name='fm' method='GET' action='resources/referrer-policy-log.php'></form>
 <script>
 document.getElementById('tg').addEventListener('load', function() {
     if (window.testRunner)
index 82027d0..bc4cd2b 100644 (file)
@@ -13,7 +13,7 @@ if (window.testRunner) {
 </head>
 <body>
 <p>There should be no content in the iframe below:</p>
-<iframe id="frame" onload="checkIfFrameLocationMatchesSrcAndCallDone('frame')" src="http://127.0.0.1:8000/security/xssAuditor/resources/echo-head-base-href.pl?enable-full-block=1&q=<base href='http://localhost:8000/security/xssAuditor/resources/base-href/'>">
+<iframe id="frame" name="frame" onload="checkIfFrameLocationMatchesSrcAndCallDone('frame')" src="http://127.0.0.1:8000/security/xssAuditor/resources/echo-head-base-href.pl?enable-full-block=1&q=<base href='http://localhost:8000/security/xssAuditor/resources/base-href/'>">
 </iframe>
 </body>
 </html>
index 4f595bb..8bdba59 100644 (file)
@@ -13,7 +13,7 @@ if (window.testRunner) {
 </head>
 <body>
 <p>There should be no content in the iframe below:</p>
-<iframe id="frame" onload="checkIfFrameLocationMatchesSrcAndCallDone('frame')" src='http://127.0.0.1:8000/security/xssAuditor/resources/echo-intertag.pl?test=/security/xssAuditor/full-block-iframe-javascript-url.html&enable-full-block=1&q=%3Ciframe%20src=javascript:alert(document.domain)%3E'>
+<iframe id="frame" name="frame" onload="checkIfFrameLocationMatchesSrcAndCallDone('frame')" src='http://127.0.0.1:8000/security/xssAuditor/resources/echo-intertag.pl?test=/security/xssAuditor/full-block-iframe-javascript-url.html&enable-full-block=1&q=%3Ciframe%20src=javascript:alert(document.domain)%3E'>
 </iframe>
 </body>
 </html>
index e90a319..bb1a3f6 100644 (file)
@@ -16,7 +16,7 @@ if (window.testRunner) {
 </head>
 <body>
 <p>This tests that the header X-XSS-Protection is not inherited by the iframe below:</p>
-<iframe id="frame" onload="checkIfFrameLocationMatchesSrcAndCallDone('frame')" src="http://127.0.0.1:8000/security/xssAuditor/resources/echo-intertag.pl?test=/security/xssAuditor/full-block-iframe-no-inherit.html&q=<script>alert(/XSS/)</script><p>If you see this message and no JavaScript alert() then the test PASSED.</p>">
+<iframe id="frame" name="frame" onload="checkIfFrameLocationMatchesSrcAndCallDone('frame')" src="http://127.0.0.1:8000/security/xssAuditor/resources/echo-intertag.pl?test=/security/xssAuditor/full-block-iframe-no-inherit.html&q=<script>alert(/XSS/)</script><p>If you see this message and no JavaScript alert() then the test PASSED.</p>">
 </iframe>
 </body>
 </html>
index c007588..d456125 100644 (file)
@@ -13,7 +13,7 @@ if (window.testRunner) {
 </head>
 <body>
 <p>There should be no content in the iframe below:</p>
-<iframe id="frame" onload="checkIfFrameLocationMatchesSrcAndCallDone('frame')" src='http://127.0.0.1:8000/security/xssAuditor/resources/echo-intertag-click-and-notify.pl?enable-full-block=1&elmid=anchorLink&q=%3Ca+id%3DanchorLink+href%3Djavascript%3Aalert%280%29%3Etest%3C/a%3E'>
+<iframe id="frame" name="frame" onload="checkIfFrameLocationMatchesSrcAndCallDone('frame')" src='http://127.0.0.1:8000/security/xssAuditor/resources/echo-intertag-click-and-notify.pl?enable-full-block=1&elmid=anchorLink&q=%3Ca+id%3DanchorLink+href%3Djavascript%3Aalert%280%29%3Etest%3C/a%3E'>
 </iframe>
 </body>
 </html>
index c543952..96ba8db 100644 (file)
@@ -13,7 +13,7 @@ if (window.testRunner) {
 </head>
 <body>
 <p>There should be no content in the iframe below:</p>
-<iframe id="frame" onload="checkIfFrameLocationMatchesSrcAndCallDone('frame')" src="http://127.0.0.1:8000/security/xssAuditor/resources/echo-intertag.pl?test=/security/xssAuditor/full-block-link-onclick.html&enable-full-block=1&q=<a%20onclick='alert(String.fromCharCode(0x58,0x53,0x53))'>Click</a>">
+<iframe id="frame" name="frame" onload="checkIfFrameLocationMatchesSrcAndCallDone('frame')" src="http://127.0.0.1:8000/security/xssAuditor/resources/echo-intertag.pl?test=/security/xssAuditor/full-block-link-onclick.html&enable-full-block=1&q=<a%20onclick='alert(String.fromCharCode(0x58,0x53,0x53))'>Click</a>">
 </iframe>
 </body>
 </html>
index aa74ccd..0f8cca9 100644 (file)
@@ -13,7 +13,7 @@ if (window.testRunner) {
 </head>
 <body>
 <p>There should be no content in the iframe below:</p>
-<iframe id="frame" onload="checkIfFrameLocationMatchesSrcAndCallDone('frame')" src="http://127.0.0.1:8000/security/xssAuditor/resources/echo-intertag.pl?test=/security/xssAuditor/full-block-object-tag.html&enable-full-block=1&q=<object name='plugin' type='application/x-webkit-test-netscape'><param name='movie' value='http://localhost:8000/security/xssAuditor/resources/dummy.swf' /></object>">
+<iframe id="frame" name="frame" onload="checkIfFrameLocationMatchesSrcAndCallDone('frame')" src="http://127.0.0.1:8000/security/xssAuditor/resources/echo-intertag.pl?test=/security/xssAuditor/full-block-object-tag.html&enable-full-block=1&q=<object name='plugin' type='application/x-webkit-test-netscape'><param name='movie' value='http://localhost:8000/security/xssAuditor/resources/dummy.swf' /></object>">
 </iframe>
 </body>
 </html>
index 8625ce5..0f8e838 100644 (file)
@@ -22,7 +22,7 @@ function checkframe()
 </head>
 <body>
 <p>There should be no content in the iframe below:</p>
-<iframe id="frame" onload="checkframe()" src="http://localhost:8000/security/xssAuditor/resources/echo-intertag.pl?test=/security/xssAuditor/full-block-script-tag-cross-domain.html&enable-full-block=1&q=<script>alert(String.fromCharCode(0x58,0x53,0x53))</script>">
+<iframe id="frame" name="frame" onload="checkframe()" src="http://localhost:8000/security/xssAuditor/resources/echo-intertag.pl?test=/security/xssAuditor/full-block-script-tag-cross-domain.html&enable-full-block=1&q=<script>alert(String.fromCharCode(0x58,0x53,0x53))</script>">
 </iframe>
 </body>
 </html>
index 7651e1b..8e03109 100644 (file)
@@ -13,7 +13,7 @@ if (window.testRunner) {
 </head>
 <body>
 <p>There should be no content in the iframe below:</p>
-<iframe id="frame" onload="checkIfFrameLocationMatchesSrcAndCallDone('frame')" src="http://127.0.0.1:8000/security/xssAuditor/resources/echo-intertag.pl?test=/security/xssAuditor/full-block-script-tag-with-source.html&enable-full-block=1&q=<script src='http://localhost:8000/security/xssAuditor/resources/xss.js'></script>">
+<iframe id="frame" name="frame" onload="checkIfFrameLocationMatchesSrcAndCallDone('frame')" src="http://127.0.0.1:8000/security/xssAuditor/resources/echo-intertag.pl?test=/security/xssAuditor/full-block-script-tag-with-source.html&enable-full-block=1&q=<script src='http://localhost:8000/security/xssAuditor/resources/xss.js'></script>">
 </iframe>
 </body>
 </html>
index 3815b39..2e445c8 100644 (file)
@@ -22,7 +22,7 @@ function checkframe()
 </head>
 <body>
 <p>There should be no content in the iframe below:</p>
-<iframe id="frame" onload="checkframe()" src="http://127.0.0.1:8000/security/xssAuditor/resources/echo-intertag.pl?test=/security/xssAuditor/full-block-script-tag.html&enable-full-block=1&q=<script>alert(String.fromCharCode(0x58,0x53,0x53))</script>">
+<iframe id="frame" name="frame" onload="checkframe()" src="http://127.0.0.1:8000/security/xssAuditor/resources/echo-intertag.pl?test=/security/xssAuditor/full-block-script-tag.html&enable-full-block=1&q=<script>alert(String.fromCharCode(0x58,0x53,0x53))</script>">
 </iframe>
 </body>
 </html>
index dfabf37..d572c5c 100644 (file)
@@ -13,7 +13,7 @@ if (window.testRunner) {
 </head>
 <body>
 <p>This tests that a malformed X-XSS-Protection header is not ignored when the length of its value exceeds <a href="https://bugs.webkit.org/show_bug.cgi?id=27312#c13">16 characters, and that an error is reported.</a></p>
-<iframe id="frame" onload="checkIfFrameLocationMatchesSrcAndCallDone('frame')" src="http://127.0.0.1:8000/security/xssAuditor/resources/echo-intertag.pl?test=/security/xssAuditor/malformed-xss-protection-header-1.html&notifyDone=1&malformed-header=1&q=<script>alert(String.fromCharCode(0x58,0x53,0x53))</script><p>If you see this message and no JavaScript alert() then the test PASSED.</p>">
+<iframe id="frame" name="frame" onload="checkIfFrameLocationMatchesSrcAndCallDone('frame')" src="http://127.0.0.1:8000/security/xssAuditor/resources/echo-intertag.pl?test=/security/xssAuditor/malformed-xss-protection-header-1.html&notifyDone=1&malformed-header=1&q=<script>alert(String.fromCharCode(0x58,0x53,0x53))</script><p>If you see this message and no JavaScript alert() then the test PASSED.</p>">
 </iframe>
 </body>
 </html>
index 85f99c1..90e7f55 100644 (file)
@@ -13,7 +13,7 @@ if (window.testRunner) {
 </head>
 <body>
 <p>This tests that the X-XSS-Protection header is not ignored when the first character is not 0 or 1, and that we issue an error.</p>
-<iframe id="frame" onload="checkIfFrameLocationMatchesSrcAndCallDone('frame')" src="http://127.0.0.1:8000/security/xssAuditor/resources/echo-intertag.pl?test=/security/xssAuditor/malformed-xss-protection-header-2.html&notifyDone=1&malformed-header=2&q=<script>alert(String.fromCharCode(0x58,0x53,0x53))</script><p>If you see this message and no JavaScript alert() then the test PASSED.</p>">
+<iframe id="frame" name="frame" onload="checkIfFrameLocationMatchesSrcAndCallDone('frame')" src="http://127.0.0.1:8000/security/xssAuditor/resources/echo-intertag.pl?test=/security/xssAuditor/malformed-xss-protection-header-2.html&notifyDone=1&malformed-header=2&q=<script>alert(String.fromCharCode(0x58,0x53,0x53))</script><p>If you see this message and no JavaScript alert() then the test PASSED.</p>">
 </iframe>
 </body>
 </html>
index 7b265ef..f218e53 100644 (file)
@@ -13,7 +13,7 @@ if (window.testRunner) {
 </head>
 <body>
 <p>This tests that a malformed X-XSS-Protection header is not ignored and an error is reported when the mode= token is invalid.</p>
-<iframe id="frame" onload="checkIfFrameLocationMatchesSrcAndCallDone('frame')" src="http://127.0.0.1:8000/security/xssAuditor/resources/echo-intertag.pl?test=/security/xssAuditor/malformed-xss-protection-header-3.html&notifyDone=1&malformed-header=3&q=<script>alert(String.fromCharCode(0x58,0x53,0x53))</script><p>If you see this message and no JavaScript alert() then the test PASSED.</p>">
+<iframe id="frame" name="frame" onload="checkIfFrameLocationMatchesSrcAndCallDone('frame')" src="http://127.0.0.1:8000/security/xssAuditor/resources/echo-intertag.pl?test=/security/xssAuditor/malformed-xss-protection-header-3.html&notifyDone=1&malformed-header=3&q=<script>alert(String.fromCharCode(0x58,0x53,0x53))</script><p>If you see this message and no JavaScript alert() then the test PASSED.</p>">
 </iframe>
 </body>
 </html>
index 64c8f41..d1bc84e 100644 (file)
@@ -13,7 +13,7 @@ if (window.testRunner) {
 </head>
 <body>
 <p>This tests that the X-XSS-Protection header is not ignored when there is a trailing garbage after mode=block, and we issue an error</p>
-<iframe id="frame" onload="checkIfFrameLocationMatchesSrcAndCallDone('frame')" src="http://127.0.0.1:8000/security/xssAuditor/resources/echo-intertag.pl?test=/security/xssAuditor/malformed-xss-protection-header-4.html&notifyDone=1&malformed-header=4&q=<script>alert(String.fromCharCode(0x58,0x53,0x53))</script><p>If you see this message and no JavaScript alert() then the test PASSED.</p>">
+<iframe id="frame" name="frame" onload="checkIfFrameLocationMatchesSrcAndCallDone('frame')" src="http://127.0.0.1:8000/security/xssAuditor/resources/echo-intertag.pl?test=/security/xssAuditor/malformed-xss-protection-header-4.html&notifyDone=1&malformed-header=4&q=<script>alert(String.fromCharCode(0x58,0x53,0x53))</script><p>If you see this message and no JavaScript alert() then the test PASSED.</p>">
 </iframe>
 </body>
 </html>
index 7dafc50..ccd40a7 100644 (file)
@@ -13,7 +13,7 @@ if (window.testRunner) {
 </head>
 <body>
 <p>This tests that the X-XSS-Protection header is not ignored when there is an incomplete report url following mode=block, and we issue an error</p>
-<iframe id="frame" onload="checkIfFrameLocationMatchesSrcAndCallDone('frame')" src="http://127.0.0.1:8000/security/xssAuditor/resources/echo-intertag.pl?test=/security/xssAuditor/malformed-xss-protection-header-5.html&notifyDone=1&malformed-header=5&q=<script>alert(String.fromCharCode(0x58,0x53,0x53))</script><p>If you see this message and no JavaScript alert() then the test PASSED.</p>">
+<iframe id="frame" name="frame" onload="checkIfFrameLocationMatchesSrcAndCallDone('frame')" src="http://127.0.0.1:8000/security/xssAuditor/resources/echo-intertag.pl?test=/security/xssAuditor/malformed-xss-protection-header-5.html&notifyDone=1&malformed-header=5&q=<script>alert(String.fromCharCode(0x58,0x53,0x53))</script><p>If you see this message and no JavaScript alert() then the test PASSED.</p>">
 </iframe>
 </body>
 </html>
index 4c93b11..738fb1a 100644 (file)
@@ -13,7 +13,7 @@ if (window.testRunner) {
 </head>
 <body>
 <p>This tests that the X-XSS-Protection header is not ignored when there is an incomplete report directive, and we issue an error</p>
-<iframe id="frame" onload="checkIfFrameLocationMatchesSrcAndCallDone('frame')" src="http://127.0.0.1:8000/security/xssAuditor/resources/echo-intertag.pl?test=/security/xssAuditor/malformed-xss-protection-header-6.html&notifyDone=1&malformed-header=6&q=<script>alert(String.fromCharCode(0x58,0x53,0x53))</script><p>If you see this message and no JavaScript alert() then the test PASSED.</p>">
+<iframe id="frame" name="frame" onload="checkIfFrameLocationMatchesSrcAndCallDone('frame')" src="http://127.0.0.1:8000/security/xssAuditor/resources/echo-intertag.pl?test=/security/xssAuditor/malformed-xss-protection-header-6.html&notifyDone=1&malformed-header=6&q=<script>alert(String.fromCharCode(0x58,0x53,0x53))</script><p>If you see this message and no JavaScript alert() then the test PASSED.</p>">
 </iframe>
 </body>
 </html>
index 44b4787..ef671d1 100644 (file)
@@ -13,7 +13,7 @@ if (window.testRunner) {
 </head>
 <body>
 <p>This tests that the X-XSS-Protection header is not ignored when there is an invalid directive, and we issue an error</p>
-<iframe id="frame" onload="checkIfFrameLocationMatchesSrcAndCallDone('frame')" src="http://127.0.0.1:8000/security/xssAuditor/resources/echo-intertag.pl?test=/security/xssAuditor/malformed-xss-protection-header-7.html&notifyDone=1&malformed-header=7&q=<script>alert(String.fromCharCode(0x58,0x53,0x53))</script><p>If you see this message and no JavaScript alert() then the test PASSED.</p>">
+<iframe id="frame" name="frame" onload="checkIfFrameLocationMatchesSrcAndCallDone('frame')" src="http://127.0.0.1:8000/security/xssAuditor/resources/echo-intertag.pl?test=/security/xssAuditor/malformed-xss-protection-header-7.html&notifyDone=1&malformed-header=7&q=<script>alert(String.fromCharCode(0x58,0x53,0x53))</script><p>If you see this message and no JavaScript alert() then the test PASSED.</p>">
 </iframe>
 </body>
 </html>
index 74f2b33..abf28d7 100644 (file)
@@ -13,7 +13,7 @@ if (window.testRunner) {
 </head>
 <body>
 <p>This tests that the X-XSS-Protection header is not ignored when there is an duplicate mode directive, and we issue an error</p>
-<iframe id="frame" onload="checkIfFrameLocationMatchesSrcAndCallDone('frame')" src="http://127.0.0.1:8000/security/xssAuditor/resources/echo-intertag.pl?test=/security/xssAuditor/malformed-xss-protection-header-8.html&notifyDone=1&malformed-header=8&q=<script>alert(String.fromCharCode(0x58,0x53,0x53))</script><p>If you see this message and no JavaScript alert() then the test PASSED.</p>">
+<iframe id="frame" name="frame" onload="checkIfFrameLocationMatchesSrcAndCallDone('frame')" src="http://127.0.0.1:8000/security/xssAuditor/resources/echo-intertag.pl?test=/security/xssAuditor/malformed-xss-protection-header-8.html&notifyDone=1&malformed-header=8&q=<script>alert(String.fromCharCode(0x58,0x53,0x53))</script><p>If you see this message and no JavaScript alert() then the test PASSED.</p>">
 </iframe>
 </body>
 </html>
index a11cffb..ba42e29 100644 (file)
@@ -13,7 +13,7 @@ if (window.testRunner) {
 </head>
 <body>
 <p>This tests that the X-XSS-Protection header is not ignored when there is a duplicate report directive, and we issue an error</p>
-<iframe id="frame" onload="checkIfFrameLocationMatchesSrcAndCallDone('frame')" src="http://127.0.0.1:8000/security/xssAuditor/resources/echo-intertag.pl?test=/security/xssAuditor/malformed-xss-protection-header-9.html&notifyDone=1&malformed-header=9&q=<script>alert(String.fromCharCode(0x58,0x53,0x53))</script><p>If you see this message and no JavaScript alert() then the test PASSED.</p>">
+<iframe id="frame" name="frame" onload="checkIfFrameLocationMatchesSrcAndCallDone('frame')" src="http://127.0.0.1:8000/security/xssAuditor/resources/echo-intertag.pl?test=/security/xssAuditor/malformed-xss-protection-header-9.html&notifyDone=1&malformed-header=9&q=<script>alert(String.fromCharCode(0x58,0x53,0x53))</script><p>If you see this message and no JavaScript alert() then the test PASSED.</p>">
 </iframe>
 </body>
 </html>
index 992eb42..a858c06 100644 (file)
@@ -14,7 +14,7 @@ if (window.testRunner) {
 <body>
 <p>This tests that the X-XSS-Protection reports are sent out properly with
 the original, unmodified URL even when a history.replaceState() changes it.</p>
-<iframe id="frame" src="http://127.0.0.1:8000/security/xssAuditor/resources/echo-intertag.pl?test=/security/xssAuditor/report-script-tag-replace-state.html&test=report-script-tag.html&echo-report=1&enable-report=1&replaceState=1&q=<script>alert(String.fromCharCode(0x58,0x53,0x53))</script><p>If you see this message, no JavaScript alert(), and a dump of the report below, then the test PASSED.</p>">
+<iframe id="frame" name="frame" src="http://127.0.0.1:8000/security/xssAuditor/resources/echo-intertag.pl?test=/security/xssAuditor/report-script-tag-replace-state.html&test=report-script-tag.html&echo-report=1&enable-report=1&replaceState=1&q=<script>alert(String.fromCharCode(0x58,0x53,0x53))</script><p>If you see this message, no JavaScript alert(), and a dump of the report below, then the test PASSED.</p>">
 </iframe>
 </body>
 </html>
index 13ab0a6..adffeae 100644 (file)
@@ -13,7 +13,7 @@ if (window.testRunner) {
 </head>
 <body>
 <p>This tests that the X-XSS-Protection reports are sent out properly</p>
-<iframe id="frame" src="http://127.0.0.1:8000/security/xssAuditor/resources/echo-intertag.pl?test=/security/xssAuditor/report-script-tag.html&echo-report=1&enable-report=1&q=<script>alert(String.fromCharCode(0x58,0x53,0x53))</script><p>If you see this message, no JavaScript alert(), and a dump of the report below, then the test PASSED.</p>">
+<iframe id="frame" name="frame" src="http://127.0.0.1:8000/security/xssAuditor/resources/echo-intertag.pl?test=/security/xssAuditor/report-script-tag.html&echo-report=1&enable-report=1&q=<script>alert(String.fromCharCode(0x58,0x53,0x53))</script><p>If you see this message, no JavaScript alert(), and a dump of the report below, then the test PASSED.</p>">
 </iframe>
 </body>
 </html>
index 7c1ed46..ee27fc1 100644 (file)
@@ -27,6 +27,7 @@ function sendRequestFromIFrame(url, params, HTTPMethod, callbackWhenDone)
         document.body.removeChild(document.getElementById('frame'));
     var iFrameObj = document.createElement('iframe');
     iFrameObj.id = 'frame';
+    iFrameObj.name = 'frame';
     document.body.appendChild(iFrameObj);
     var frameContent = iFrameObj.contentDocument;
     frameContent.open();
index 289cd5a..2279090 100644 (file)
@@ -14,7 +14,7 @@ if (window.testRunner) {
 <body>
 <p>This tests that the X-XSS-Protection header is not ignored when there is a trailing semicolon.
 Although theoretically malformed, we tolerate this case without issuing an error. </p>
-<iframe id="frame" onload="checkIfFrameLocationMatchesSrcAndCallDone('frame')" src="http://127.0.0.1:8000/security/xssAuditor/resources/echo-intertag.pl?test=/security/xssAuditor/xss-protection-parsing-02.html&notifyDone=1&valid-header=2&q=<script>alert(String.fromCharCode(0x58,0x53,0x53))</script><p>If you see this message and no JavaScript alert() then the test PASSED.</p>">
+<iframe id="frame" name="frame" onload="checkIfFrameLocationMatchesSrcAndCallDone('frame')" src="http://127.0.0.1:8000/security/xssAuditor/resources/echo-intertag.pl?test=/security/xssAuditor/xss-protection-parsing-02.html&notifyDone=1&valid-header=2&q=<script>alert(String.fromCharCode(0x58,0x53,0x53))</script><p>If you see this message and no JavaScript alert() then the test PASSED.</p>">
 </iframe>
 </body>
 </html>
index 4dbec62..8dad45e 100644 (file)
@@ -14,7 +14,7 @@ if (window.testRunner) {
 <body>
 <p>This tests that the X-XSS-Protection header is not ignored when there is a trailing semicolon following mode=blank.
 Although theoretically malformed, we tolerate this case without issuing an error. </p>
-<iframe id="frame" onload="checkIfFrameLocationMatchesSrcAndCallDone('frame')" src="http://127.0.0.1:8000/security/xssAuditor/resources/echo-intertag.pl?test=/security/xssAuditor/xss-protection-parsing-03.html&notifyDone=1&valid-header=3&q=<script>alert(String.fromCharCode(0x58,0x53,0x53))</script><p>If you see this message and no JavaScript alert() then the test PASSED.</p>">
+<iframe id="frame" name="frame" onload="checkIfFrameLocationMatchesSrcAndCallDone('frame')" src="http://127.0.0.1:8000/security/xssAuditor/resources/echo-intertag.pl?test=/security/xssAuditor/xss-protection-parsing-03.html&notifyDone=1&valid-header=3&q=<script>alert(String.fromCharCode(0x58,0x53,0x53))</script><p>If you see this message and no JavaScript alert() then the test PASSED.</p>">
 </iframe>
 </body>
 </html>
index 3edf1ae..4061466 100644 (file)
@@ -13,7 +13,7 @@ if (window.testRunner) {
 </head>
 <body>
 <p>This tests that the X-XSS-Protection header is not ignored when the report and mode directives are swapped.</p>
-<iframe id="frame" onload="checkIfFrameLocationMatchesSrcAndCallDone('frame')" src="http://127.0.0.1:8000/security/xssAuditor/resources/echo-intertag.pl?test=/security/xssAuditor/xss-protection-parsing-04.html&notifyDone=1&valid-header=4&q=<script>alert(String.fromCharCode(0x58,0x53,0x53))</script><p>If you see this message and no JavaScript alert() then the test PASSED.</p>">
+<iframe id="frame" name="frame" onload="checkIfFrameLocationMatchesSrcAndCallDone('frame')" src="http://127.0.0.1:8000/security/xssAuditor/resources/echo-intertag.pl?test=/security/xssAuditor/xss-protection-parsing-04.html&notifyDone=1&valid-header=4&q=<script>alert(String.fromCharCode(0x58,0x53,0x53))</script><p>If you see this message and no JavaScript alert() then the test PASSED.</p>">
 </iframe>
 </body>
 </html>
index bc71a70..7b0ffb4 100644 (file)
@@ -18,7 +18,7 @@
 Here lies an `iframe` with no content/src:
 &lt;/p&gt;&lt;p&gt;
 
-&lt;iframe id="emptyFrame" style="width: 100%; height: 100px; border: solid 2px red;"&gt;
+&lt;iframe name="emptyFrame" style="width: 100%; height: 100px; border: solid 2px red;"&gt;
 &lt;/iframe&gt;
 
 
index a7a220c..1f56aa5 100644 (file)
@@ -21,7 +21,7 @@
 Here lies an `iframe` with no content/src:
 &lt;p&gt;
 
-&lt;iframe id="emptyFrame" style="width: 100%; height: 100px; border: solid 2px red;"&gt;
+&lt;iframe name="emptyFrame" style="width: 100%; height: 100px; border: solid 2px red;"&gt;
 &lt;/iframe&gt;
 
 &lt;/body&gt;
index 1b11903..19e17cf 100644 (file)
@@ -28,6 +28,6 @@ function runtest() {
 <embed id="plg" type="application/x-webkit-test-netscape"></embed>
 This tests that the plugin properly receives NPP_URLNotify for subframe loads.
 <div id="result">FAILED</div>
-<iframe id="frame"></iframe>
+<iframe id="frame" name="frame"></iframe>
 </body>
 </html>
index 82825c1..72195fb 100644 (file)
@@ -30,6 +30,6 @@ RTÉ video crashes Safari.</p>
 <p>Only works with DumpRenderTree.</p>
 
 <div id='d'>
-  <iframe id='subframe' src='resources/plugin-remove-subframe-iframe.html'></iframe>
+  <iframe id='subframe' name='subframe' src='resources/plugin-remove-subframe-iframe.html'></iframe>
 </div>
 </body>
index bc71a70..7b0ffb4 100644 (file)
@@ -18,7 +18,7 @@
 Here lies an `iframe` with no content/src:
 &lt;/p&gt;&lt;p&gt;
 
-&lt;iframe id="emptyFrame" style="width: 100%; height: 100px; border: solid 2px red;"&gt;
+&lt;iframe name="emptyFrame" style="width: 100%; height: 100px; border: solid 2px red;"&gt;
 &lt;/iframe&gt;
 
 
index 47c1128..7a56faa 100644 (file)
@@ -14,7 +14,7 @@
 Here lies an `iframe` with no content/src:
 <p>
 
-<iframe id="emptyFrame" style="width: 100%; height: 100px; border: solid 2px red;">
+<iframe name="emptyFrame" style="width: 100%; height: 100px; border: solid 2px red;">
 </iframe>
 
 </body>
index a7a220c..1f56aa5 100644 (file)
@@ -21,7 +21,7 @@
 Here lies an `iframe` with no content/src:
 &lt;p&gt;
 
-&lt;iframe id="emptyFrame" style="width: 100%; height: 100px; border: solid 2px red;"&gt;
+&lt;iframe name="emptyFrame" style="width: 100%; height: 100px; border: solid 2px red;"&gt;
 &lt;/iframe&gt;
 
 &lt;/body&gt;
index 3ef2820..3520639 100644 (file)
@@ -14,7 +14,7 @@
 Here lies an `iframe` with no content/src:
 <p>
 
-<iframe id="emptyFrame" style="width: 100%; height: 100px; border: solid 2px red;">
+<iframe name="emptyFrame" style="width: 100%; height: 100px; border: solid 2px red;">
 </iframe>
 
 </body>
index 2609d00..f8fe222 100644 (file)
@@ -1,3 +1,28 @@
+2015-10-27  Chris Dumez  <cdumez@apple.com>
+
+        id of iframe incorrectly sets window name
+        https://bugs.webkit.org/show_bug.cgi?id=150565
+
+        Reviewed by Darin Adler.
+
+        As per the specification, the iframe's contentWindow name should be an
+        empty string if the frame's name attribute is unset:
+        http://www.whatwg.org/specs/web-apps/current-work/multipage/the-iframe-element.html#attr-iframe-name
+
+        Instead, WebKit was using the iframe's id as window name if the name
+        was unset.
+
+        Firefox, IE and Chrome behave according to the specification.
+
+        This is a merge of the following Blink commit:
+        https://src.chromium.org/viewvc/blink?revision=169803&view=revision
+
+        Test: fast/frames/iframe-no-name.html
+
+        * html/HTMLFrameElementBase.cpp:
+        (WebCore::HTMLFrameElementBase::parseAttribute):
+        (WebCore::HTMLFrameElementBase::insertedInto): Deleted.
+
 2015-10-27  Joseph Pecoraro  <pecoraro@apple.com>
 
         Web Inspector: Remove Timeline MarkDOMContent and MarkLoad, data is already available
index 7361c5b..c71ec0d 100644 (file)
@@ -96,10 +96,7 @@ void HTMLFrameElementBase::parseAttribute(const QualifiedName& name, const Atomi
         setLocation("about:srcdoc");
     else if (name == srcAttr && !fastHasAttribute(srcdocAttr))
         setLocation(stripLeadingAndTrailingHTMLSpaces(value));
-    else if (name == HTMLNames::idAttr) {
-        HTMLFrameOwnerElement::parseAttribute(name, value);
-        m_frameName = value;
-    } else if (name == nameAttr) {
+    else if (name == nameAttr) {
         m_frameName = value;
         // FIXME: If we are already attached, this doesn't actually change the frame's name.
         // FIXME: If we are already attached, this doesn't check for frame name
@@ -124,8 +121,6 @@ void HTMLFrameElementBase::parseAttribute(const QualifiedName& name, const Atomi
 void HTMLFrameElementBase::setNameAndOpenURL()
 {
     m_frameName = getNameAttribute();
-    if (m_frameName.isNull())
-        m_frameName = getIdAttribute();
     openURL();
 }