Added some same-origin-domain checks.

This commit is contained in:
Alan Jeffrey 2017-02-09 14:28:37 -06:00
parent 628cd7de6d
commit 1f61a549a3
45 changed files with 223 additions and 348 deletions

View file

@ -1,5 +1,6 @@
[origin.sub.html]
type: testharness
expected: TIMEOUT
[Verify serialization of non-ascii origin in Blob URLs]
expected: FAIL
expected: TIMEOUT

View file

@ -1,137 +1,138 @@
[remote-origin.htm]
type: testharness
expected: TIMEOUT
[Allow origin: *]
expected: FAIL
expected: TIMEOUT
[Allow origin: _*__]
expected: FAIL
expected: TIMEOUT
[Allow origin: [tab\]*]
expected: FAIL
expected: TIMEOUT
[Allow origin: http://www1.web-platform.test:8000]
expected: FAIL
expected: TIMEOUT
[Allow origin: _http://www1.web-platform.test:8000]
expected: FAIL
expected: TIMEOUT
[Allow origin: _http://www1.web-platform.test:8000___[tab\]_]
expected: FAIL
expected: TIMEOUT
[Allow origin: [tab\]http://www1.web-platform.test:8000]
expected: FAIL
expected: TIMEOUT
[Disallow origin: http://web-platform.test:8000]
expected: FAIL
expected: TIMEOUT
[Disallow origin: //www1.web-platform.test:8000]
expected: FAIL
expected: TIMEOUT
[Disallow origin: ://www1.web-platform.test:8000]
expected: FAIL
expected: TIMEOUT
[Disallow origin: ftp://www1.web-platform.test:8000]
expected: FAIL
expected: TIMEOUT
[Disallow origin: http:://www1.web-platform.test:8000]
expected: FAIL
expected: TIMEOUT
[Disallow origin: http:/www1.web-platform.test:8000]
expected: FAIL
expected: TIMEOUT
[Disallow origin: http:www1.web-platform.test:8000]
expected: FAIL
expected: TIMEOUT
[Disallow origin: www1.web-platform.test:8000]
expected: FAIL
expected: TIMEOUT
[Disallow origin: http://www1.web-platform.test:8000?]
expected: FAIL
expected: TIMEOUT
[Disallow origin: http://www1.web-platform.test:8000/]
expected: FAIL
expected: TIMEOUT
[Disallow origin: http://www1.web-platform.test:8000_/]
expected: FAIL
expected: TIMEOUT
[Disallow origin: http://www1.web-platform.test:8000#]
expected: FAIL
expected: TIMEOUT
[Disallow origin: http://www1.web-platform.test:8000%23]
expected: FAIL
expected: TIMEOUT
[Disallow origin: http://www1.web-platform.test:8000:80]
expected: FAIL
expected: TIMEOUT
[Disallow origin: http://www1.web-platform.test:8000,_*]
expected: FAIL
expected: TIMEOUT
[Disallow origin: http://www1.web-platform.test:8000\\0]
expected: FAIL
expected: TIMEOUT
[Disallow origin: HTTP://WWW1.WEB-PLATFORM.TEST:8000]
expected: FAIL
expected: TIMEOUT
[Disallow origin: HTTP://www1.web-platform.test:8000]
expected: FAIL
expected: TIMEOUT
[Disallow origin: http://WWW1.WEB-PLATFORM.TEST:8000]
expected: FAIL
expected: TIMEOUT
[Disallow origin: -]
expected: FAIL
expected: TIMEOUT
[Disallow origin: **]
expected: FAIL
expected: TIMEOUT
[Disallow origin: \\0*]
expected: FAIL
expected: TIMEOUT
[Disallow origin: *\\0]
expected: FAIL
expected: TIMEOUT
[Disallow origin: '*']
expected: FAIL
expected: TIMEOUT
[Disallow origin: "*"]
expected: FAIL
expected: TIMEOUT
[Disallow origin: *_*]
expected: FAIL
expected: TIMEOUT
[Disallow origin: *http://*]
expected: FAIL
expected: TIMEOUT
[Disallow origin: *http://www1.web-platform.test:8000]
expected: FAIL
expected: TIMEOUT
[Disallow origin: *_http://www1.web-platform.test:8000]
expected: FAIL
expected: TIMEOUT
[Disallow origin: *,_http://www1.web-platform.test:8000]
expected: FAIL
expected: TIMEOUT
[Disallow origin: \\0http://www1.web-platform.test:8000]
expected: FAIL
expected: TIMEOUT
[Disallow origin: null_http://www1.web-platform.test:8000]
expected: FAIL
expected: TIMEOUT
[Disallow origin: http://example.net]
expected: FAIL
expected: TIMEOUT
[Disallow origin: null]
expected: FAIL
expected: TIMEOUT
[Disallow origin: ]
expected: FAIL
expected: TIMEOUT
[Disallow origin: http://web-platform.test:8000/cors/remote-origin.htm]
expected: FAIL
expected: TIMEOUT
[Disallow origin: http://web-platform.test:8000/cors/]
expected: FAIL
expected: TIMEOUT
[Disallow origin: http://www1.web-platform.test:8000/cors/]
expected: FAIL
expected: TIMEOUT

View file

@ -1,5 +0,0 @@
[security_location_0.htm]
type: testharness
[Accessing location object from different origins doesn't raise SECURITY_ERR exception]
expected: FAIL

View file

@ -342,39 +342,15 @@
[A SecurityError exception should not be thrown when window.closed is accessed from a different origin.]
expected: FAIL
[A SecurityError exception should not be thrown when window.frames is accessed from a different origin.]
expected: FAIL
[A SecurityError exception should not be thrown when window.length is accessed from a different origin.]
expected: FAIL
[A SecurityError exception should not be thrown when window.location is accessed from a different origin.]
expected: FAIL
[A SecurityError exception should not be thrown when window.opener is accessed from a different origin.]
expected: FAIL
[A SecurityError exception should not be thrown when window.parent is accessed from a different origin.]
expected: FAIL
[A SecurityError exception should not be thrown when window.self is accessed from a different origin.]
expected: FAIL
[A SecurityError exception should not be thrown when window.top is accessed from a different origin.]
expected: FAIL
[A SecurityError exception should not be thrown when window.window is accessed from a different origin.]
expected: FAIL
[A SecurityError exception should not be thrown when window.blur is accessed from a different origin.]
expected: FAIL
[A SecurityError exception should not be thrown when window.close is accessed from a different origin.]
expected: FAIL
[A SecurityError exception should not be thrown when window.focus is accessed from a different origin.]
expected: FAIL
[A SecurityError exception should not be thrown when window.postMessage is accessed from a different origin.]
expected: FAIL

View file

@ -1,5 +1,6 @@
[frameElement.html]
type: testharness
expected: TIMEOUT
[The window's frameElement attribute must return its container element if it is a nested browsing context]
expected: FAIL
@ -7,5 +8,5 @@
expected: FAIL
[The window's frameElement attribute must return null if the container's document does not have the same effective script origin]
expected: FAIL
expected: TIMEOUT

View file

@ -1,5 +0,0 @@
[iframe-load-event.html]
type: testharness
[load event of blob URL]
expected: FAIL

View file

@ -1,6 +1,6 @@
[iframe_sandbox_allow_script.html]
type: testharness
expected: ERROR
expected: TIMEOUT
[iframe_sandbox_allow_scripts]
expected: NOTRUN

View file

@ -1,5 +0,0 @@
[templates-copy-document-owner.html]
type: testharness
[ownerDocument of cloned template content is set to template content owner. Test loading HTML document from file]
expected: FAIL

View file

@ -1,8 +0,0 @@
[template-contents-owner-document-type.html]
type: testharness
[The template contents owner document type is HTML document (case when document has browsing context and the template is created by HTML parser)]
expected: FAIL
[The template contents owner document type is HTML document (case when document has browsing context and the template is created by createElement())]
expected: FAIL

View file

@ -1,12 +0,0 @@
[template-contents-owner-test-002.html]
type: testharness
disabled: https://github.com/servo/servo/issues/9723
[The template contents owner document must be different from template owner document, which has browsing context. Template element is created by createElement()]
expected: FAIL
[The template contents owner document must be different from template owner document, which has browsing context. Template element is created via innerHTML]
expected: FAIL
[The template contents owner document must be different from template owner document, which has browsing context. Template element is created by HTML parser]
expected: FAIL

View file

@ -1,14 +0,0 @@
[template-contents.html]
type: testharness
[The template contents must be a DocumentFragment (the empty template tag inside HTML file loaded in iframe)]
expected: FAIL
[The template contents must be a DocumentFragment (non empty template tag inside HTML file loaded in iframe)]
expected: FAIL
[The template contents must be a DocumentFragment (the template tag with some text inside HTML file loaded in iframe)]
expected: FAIL
[The template contents must be a DocumentFragment (the template tag with nested template tag inside HTML file loaded in iframe)]
expected: FAIL

View file

@ -1,5 +0,0 @@
[innerhtml.html]
type: testharness
[innerHTML of template element replaces all referenced by the content attribute. Test loading of HTML document from a file]
expected: FAIL

View file

@ -1,8 +0,0 @@
[content-attribute.html]
type: testharness
[Content attribute of template element is read-only. Text value of content attribute of template tag should be ignored, when loading document from a file]
expected: FAIL
[Content attribute of template element is read-only. Test content attribute of a document loaded from a file]
expected: FAIL

View file

@ -1,11 +0,0 @@
[node-document-changes.html]
type: testharness
[Changing of template element's node document. Test document loaded from a file]
expected: FAIL
[Changing of template element's node document. Test the case when both old and new owner documents of template element have browsing context]
expected: FAIL
[Changing of template element's node document. Adobt template element into a document that has a browsing context]
expected: FAIL

View file

@ -1,5 +0,0 @@
[template-content-node-document.html]
type: testharness
[Node document of the template content attribute must be template contents owner. Load HTML file with multiple template elements]
expected: FAIL

View file

@ -1,5 +0,0 @@
[template-descendant-body.html]
type: testharness
[Template element as a descendant of the body element. Test loading from a file]
expected: FAIL

View file

@ -1,11 +0,0 @@
[template-descendant-frameset.html]
type: testharness
[Template element as a descendant of the frameset element. Test loading from a file]
expected: FAIL
[Template element as a descendant of the frameset element. Test template element is assigned to frameset's innerHTML)]
expected: FAIL
[Template element as a descendant of the frameset element. Test template element appended to frameset by appendChild()]
expected: FAIL

View file

@ -1,5 +0,0 @@
[template-descendant-head.html]
type: testharness
[Template element as a descendant of the head element. Test loading from a file]
expected: FAIL

View file

@ -1,8 +0,0 @@
[generating-of-implied-end-tags.html]
type: testharness
[Generating of implied end tags. Test table elements. Loading of HTML document from a file]
expected: FAIL
[Generating of implied end tags. Test div element. Loading of HTML document from a file]
expected: FAIL

View file

@ -1,5 +0,0 @@
[ignore-body-token.html]
type: testharness
[Ignore BODY token. Test loading a HTML file with BODY tag inside template]
expected: FAIL

View file

@ -1,5 +0,0 @@
[ignore-frameset-token.html]
type: testharness
[Ignore frameset token. Test loading a HTML file with FRAMESET tag inside template]
expected: FAIL

View file

@ -1,5 +0,0 @@
[ignore-head-token.html]
type: testharness
[Ignore HEAD token. Test loading a HTML file with HEAD tag inside template]
expected: FAIL

View file

@ -1,5 +0,0 @@
[ignore-html-token.html]
type: testharness
[Ignore HTML token. Test loading a HTML file with HTML tag inside template]
expected: FAIL

View file

@ -1,5 +0,0 @@
[start-tag-html.html]
type: testharness
[In body insertion mode: html start tag should add only absent attributes]
expected: FAIL

View file

@ -1,5 +0,0 @@
[template-end-tag-without-start-one.html]
type: testharness
[</template> tag in HTML body without start one should be ignored. Test HTML document loaded from file]
expected: FAIL

View file

@ -1,5 +0,0 @@
[end-tag-frameset.html]
type: testharness
[<template> tag should be ignored in "in frameset" insertion mode]
expected: FAIL

View file

@ -1,8 +0,0 @@
[generating-of-implied-end-tags.html]
type: testharness
[Generating of implied end tags. Test table elements. Load HTML document from file]
expected: FAIL
[Generating of implied end tags. Test div element. Load HTML document from file]
expected: FAIL

View file

@ -1,5 +0,0 @@
[template-end-tag-without-start-one.html]
type: testharness
[</template> tag in HTML head without start one should be ignored. Test HTML document loaded from file]
expected: FAIL

View file

@ -1,8 +0,0 @@
[template-child-nodes.html]
type: testharness
[Template child nodes must be appended to template content node. Load HTML document from a file]
expected: FAIL
[Template child nodes must be appended to nested template content node. Load HTML document from a file]
expected: FAIL

View file

@ -1,11 +0,0 @@
[template-owner-document.html]
type: testharness
[Test ownerDocument property of two elements in a template. Load HTML document from a file, current DOCUMENT has browsing context]
expected: FAIL
[Test ownerDocument property of the element in a template. Load HTML document from a file, current DOCUMENT has browsing context]
expected: FAIL
[Test ownerDocument property of the element in a nested template. Load HTML document from a file, current DOCUMENT has browsing context]
expected: FAIL

View file

@ -1,3 +0,0 @@
[test_unique_performance_objects.html]
type: testharness
expected: ERROR

View file

@ -25696,7 +25696,7 @@
"support"
],
"mozilla/referrer-policy/generic/common.js": [
"1f4a0fa9285ad504cba75c01b4938c9da78cace3",
"6882adfd624da27cd226e1575988e85ad4e0a562",
"support"
],
"mozilla/referrer-policy/generic/referrer-policy-test-case.js": [

View file

@ -195,8 +195,8 @@ function queryAnchor(url, callback, referrer_policy) {
var url_with_params = url + "&id=" + id + "&tagAttrs=" + JSON.stringify(referrer_policy);
var iframe = appendIframeToBody(url_with_params);
iframe.addEventListener("load", function listener() {
if ((iframe.contentWindow !== null) &&
(iframe.contentWindow.location.toString() === url_with_params)) {
if ((iframe.contentDocument !== null) &&
(iframe.contentDocument.location.toString() === url_with_params)) {
return;
}