Handle crossorigin in link and refactor crossorigin handling

Implemented Step three and handled step four of obtain the resource part
of 4.2.4 The link element.
Link to spec : https://html.spec.whatwg.org/multipage/semantics.html#concept-link-obtain

Refactored crossOrigin handling in HTMLScriptElement, HTMLImageElement
This commit is contained in:
mrnayak 2017-01-13 23:35:00 +05:30
parent dc93a72997
commit 3d9e44a8c4
10 changed files with 81 additions and 202 deletions

View file

@ -1041,15 +1041,9 @@
[HTMLBaseElement interface: document.createElement("base") must inherit property "target" with the proper type (1)]
expected: FAIL
[HTMLLinkElement interface: attribute crossOrigin]
expected: FAIL
[HTMLLinkElement interface: attribute sizes]
expected: FAIL
[HTMLLinkElement interface: document.createElement("link") must inherit property "crossOrigin" with the proper type (1)]
expected: FAIL
[HTMLLinkElement interface: document.createElement("link") must inherit property "sizes" with the proper type (7)]
expected: FAIL

View file

@ -2715,12 +2715,6 @@
[link.tabIndex: IDL set to -2147483648 followed by getAttribute()]
expected: FAIL
[link.crossOrigin: typeof IDL attribute]
expected: FAIL
[link.crossOrigin: IDL get with DOM attribute unset]
expected: FAIL
[link.crossOrigin: setAttribute() to "" followed by IDL get]
expected: FAIL
@ -8832,156 +8826,6 @@
[link.tabIndex: IDL set to -2147483648]
expected: FAIL
[link.crossOrigin: setAttribute() to ""]
expected: FAIL
[link.crossOrigin: setAttribute() to " \\0\\x01\\x02\\x03\\x04\\x05\\x06\\x07 \\b\\t\\n\\v\\f\\r\\x0e\\x0f \\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17 \\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f foo "]
expected: FAIL
[link.crossOrigin: setAttribute() to undefined]
expected: FAIL
[link.crossOrigin: setAttribute() to 7]
expected: FAIL
[link.crossOrigin: setAttribute() to 1.5]
expected: FAIL
[link.crossOrigin: setAttribute() to true]
expected: FAIL
[link.crossOrigin: setAttribute() to false]
expected: FAIL
[link.crossOrigin: setAttribute() to object "[object Object\]"]
expected: FAIL
[link.crossOrigin: setAttribute() to NaN]
expected: FAIL
[link.crossOrigin: setAttribute() to Infinity]
expected: FAIL
[link.crossOrigin: setAttribute() to -Infinity]
expected: FAIL
[link.crossOrigin: setAttribute() to "\\0"]
expected: FAIL
[link.crossOrigin: setAttribute() to null]
expected: FAIL
[link.crossOrigin: setAttribute() to object "test-toString"]
expected: FAIL
[link.crossOrigin: setAttribute() to object "test-valueOf"]
expected: FAIL
[link.crossOrigin: setAttribute() to "anonymous"]
expected: FAIL
[link.crossOrigin: setAttribute() to "xanonymous"]
expected: FAIL
[link.crossOrigin: setAttribute() to "anonymous\\0"]
expected: FAIL
[link.crossOrigin: setAttribute() to "nonymous"]
expected: FAIL
[link.crossOrigin: setAttribute() to "ANONYMOUS"]
expected: FAIL
[link.crossOrigin: setAttribute() to "use-credentials"]
expected: FAIL
[link.crossOrigin: setAttribute() to "xuse-credentials"]
expected: FAIL
[link.crossOrigin: setAttribute() to "use-credentials\\0"]
expected: FAIL
[link.crossOrigin: setAttribute() to "se-credentials"]
expected: FAIL
[link.crossOrigin: setAttribute() to "USE-CREDENTIALS"]
expected: FAIL
[link.crossOrigin: IDL set to ""]
expected: FAIL
[link.crossOrigin: IDL set to " \\0\\x01\\x02\\x03\\x04\\x05\\x06\\x07 \\b\\t\\n\\v\\f\\r\\x0e\\x0f \\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17 \\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f foo "]
expected: FAIL
[link.crossOrigin: IDL set to undefined]
expected: FAIL
[link.crossOrigin: IDL set to 7]
expected: FAIL
[link.crossOrigin: IDL set to 1.5]
expected: FAIL
[link.crossOrigin: IDL set to true]
expected: FAIL
[link.crossOrigin: IDL set to false]
expected: FAIL
[link.crossOrigin: IDL set to object "[object Object\]"]
expected: FAIL
[link.crossOrigin: IDL set to NaN]
expected: FAIL
[link.crossOrigin: IDL set to Infinity]
expected: FAIL
[link.crossOrigin: IDL set to -Infinity]
expected: FAIL
[link.crossOrigin: IDL set to "\\0"]
expected: FAIL
[link.crossOrigin: IDL set to null]
expected: FAIL
[link.crossOrigin: IDL set to object "test-toString"]
expected: FAIL
[link.crossOrigin: IDL set to object "test-valueOf"]
expected: FAIL
[link.crossOrigin: IDL set to "anonymous"]
expected: FAIL
[link.crossOrigin: IDL set to "xanonymous"]
expected: FAIL
[link.crossOrigin: IDL set to "anonymous\\0"]
expected: FAIL
[link.crossOrigin: IDL set to "nonymous"]
expected: FAIL
[link.crossOrigin: IDL set to "ANONYMOUS"]
expected: FAIL
[link.crossOrigin: IDL set to "use-credentials"]
expected: FAIL
[link.crossOrigin: IDL set to "xuse-credentials"]
expected: FAIL
[link.crossOrigin: IDL set to "use-credentials\\0"]
expected: FAIL
[link.crossOrigin: IDL set to "se-credentials"]
expected: FAIL
[link.crossOrigin: IDL set to "USE-CREDENTIALS"]
expected: FAIL
[meta.dir: setAttribute() to ""]
expected: FAIL

View file

@ -1,8 +1,7 @@
[subresource-integrity.sub.html]
type: testharness
expected: OK
[Style: <crossorigin='anonymous'> with correct hash, ACAO: *]
expected: FAIL
[Style: Same-origin with correct sha256 and sha512 hash, rel='alternate stylesheet' enabled]
expected: FAIL
@ -13,9 +12,6 @@
[Style: Same-origin with sha256 match, sha512 mismatch]
expected: FAIL
[Style: <crossorigin='use-credentials'> with correct hash, CORS-eligible]
expected: FAIL
[Style: <crossorigin='anonymous'> with CORS-ineligible resource]
expected: FAIL