diff --git a/testing/web-platform/meta/MANIFEST.json b/testing/web-platform/meta/MANIFEST.json index cf181d6854a..8c5f823470c 100644 --- a/testing/web-platform/meta/MANIFEST.json +++ b/testing/web-platform/meta/MANIFEST.json @@ -16123,6 +16123,10 @@ "path": "quirks-mode/unitless-length.html", "url": "/quirks-mode/unitless-length.html" }, + { + "path": "referrer-policy/no-referrer-policy/no-referrer-policy.html", + "url": "/referrer-policy/no-referrer-policy/no-referrer-policy.html" + }, { "path": "resource-timing/test_resource_timing.html", "url": "/resource-timing/test_resource_timing.html" @@ -24841,7 +24845,7 @@ } ] }, - "rev": "28de405307d9613052ccd1228be7888e109738a6", + "rev": "5aa79b303c81164549041d1bd9f7887390a10f72", "url_base": "/", "version": 2 } \ No newline at end of file diff --git a/testing/web-platform/meta/mozilla-sync b/testing/web-platform/meta/mozilla-sync index ab051b69cd5..4ba277efe22 100644 --- a/testing/web-platform/meta/mozilla-sync +++ b/testing/web-platform/meta/mozilla-sync @@ -1 +1 @@ -6e958cb0c757bc80226f22d98a93f7fec974aa6c \ No newline at end of file +36bf12e75b3d8fc5ac90187f21d50a3eed5a0442 \ No newline at end of file diff --git a/testing/web-platform/tests/IndexedDB/idbcursor_advance_index.htm b/testing/web-platform/tests/IndexedDB/idbcursor_advance_index.htm index 8f2d0c65182..0e5c5147496 100644 --- a/testing/web-platform/tests/IndexedDB/idbcursor_advance_index.htm +++ b/testing/web-platform/tests/IndexedDB/idbcursor_advance_index.htm @@ -16,7 +16,7 @@ var open_rq = createdb(t); open_rq.onupgradeneeded = function(e) { - db = event.target.result; + db = e.target.result; var store = db.createObjectStore("test", {keyPath:"pKey"}); store.createIndex("idx", "iKey"); diff --git a/testing/web-platform/tests/IndexedDB/idbcursor_advance_objectstore.htm b/testing/web-platform/tests/IndexedDB/idbcursor_advance_objectstore.htm index bf7cb70fb60..5ae9a813c70 100644 --- a/testing/web-platform/tests/IndexedDB/idbcursor_advance_objectstore.htm +++ b/testing/web-platform/tests/IndexedDB/idbcursor_advance_objectstore.htm @@ -16,7 +16,7 @@ var open_rq = createdb(t); open_rq.onupgradeneeded = function(e) { - db = event.target.result; + db = e.target.result; var store = db.createObjectStore("test", {keyPath:"pKey"}); for(var i = 0; i < records.length; i++) { diff --git a/testing/web-platform/tests/IndexedDB/idbdatabase_close.htm b/testing/web-platform/tests/IndexedDB/idbdatabase_close.htm index 46485a4303c..dc3f585a8cd 100644 --- a/testing/web-platform/tests/IndexedDB/idbdatabase_close.htm +++ b/testing/web-platform/tests/IndexedDB/idbdatabase_close.htm @@ -29,7 +29,7 @@ open_rq.onsuccess = function(e) { upgradeneeded_fired = counter++; }); rq.onsuccess = t.step_func(function (e) { - assert_equals(versionchange_fired, 0, 'block event fired #') + assert_equals(versionchange_fired, 0, 'versionchange event fired #') assert_equals(blocked_fired, 1, 'block event fired #') assert_equals(upgradeneeded_fired, 2, 'second upgradeneeded event fired #') diff --git a/testing/web-platform/tests/IndexedDB/idbdatabase_createObjectStore11.htm b/testing/web-platform/tests/IndexedDB/idbdatabase_createObjectStore11.htm index 8d98953e065..ae78d46ba07 100644 --- a/testing/web-platform/tests/IndexedDB/idbdatabase_createObjectStore11.htm +++ b/testing/web-platform/tests/IndexedDB/idbdatabase_createObjectStore11.htm @@ -1,6 +1,6 @@ -IDBDatabase.createObjectStore() - Attampt Create Exsists Object Store With Difference keyPath throw ConstraintError +IDBDatabase.createObjectStore() - attempting to create an existing object store with a different keyPath throw ConstraintError diff --git a/testing/web-platform/tests/IndexedDB/idbfactory_open9.htm b/testing/web-platform/tests/IndexedDB/idbfactory_open9.htm index d9f392cfdc3..94819a7ceb3 100644 --- a/testing/web-platform/tests/IndexedDB/idbfactory_open9.htm +++ b/testing/web-platform/tests/IndexedDB/idbfactory_open9.htm @@ -47,7 +47,7 @@ should_throw({ function should_work(val) { var t = async_test("Calling open() with version argument 1.5 should not throw.") - var rq = createdb(t) + var rq = createdb(t, val) rq.onupgradeneeded = function() { t.done() } diff --git a/testing/web-platform/tests/IndexedDB/idbobjectstore_openCursor.htm b/testing/web-platform/tests/IndexedDB/idbobjectstore_openCursor.htm index 914aa57211f..c54760a7cd7 100644 --- a/testing/web-platform/tests/IndexedDB/idbobjectstore_openCursor.htm +++ b/testing/web-platform/tests/IndexedDB/idbobjectstore_openCursor.htm @@ -25,11 +25,14 @@ txn.objectStore("store") .openCursor().onsuccess = this.step_func(function(e) { - if (e.target.result) + if (e.target.result) { + count += 1; e.target.result.continue() + } }) txn.oncomplete = this.step_func(function() { + assert_equals(count, 100); this.done() }) } diff --git a/testing/web-platform/tests/IndexedDB/idbtransaction_abort.htm b/testing/web-platform/tests/IndexedDB/idbtransaction_abort.htm index c93a2da290f..1f37bb40101 100644 --- a/testing/web-platform/tests/IndexedDB/idbtransaction_abort.htm +++ b/testing/web-platform/tests/IndexedDB/idbtransaction_abort.htm @@ -7,7 +7,6 @@ diff --git a/testing/web-platform/tests/html/semantics/forms/the-input-element/pattern_attribute.html b/testing/web-platform/tests/html/semantics/forms/the-input-element/pattern_attribute.html index 01e19a808f8..ef01c297277 100644 --- a/testing/web-platform/tests/html/semantics/forms/the-input-element/pattern_attribute.html +++ b/testing/web-platform/tests/html/semantics/forms/the-input-element/pattern_attribute.html @@ -4,9 +4,9 @@ Pattern Attribute - - - + + + @@ -14,20 +14,20 @@ -

Pattern Attribute

-
- -
+

Pattern Attribute

+
+ +
- + diff --git a/testing/web-platform/tests/html/semantics/forms/the-input-element/required_attribute.html b/testing/web-platform/tests/html/semantics/forms/the-input-element/required_attribute.html index 6674fca2e37..63488e9f4ce 100644 --- a/testing/web-platform/tests/html/semantics/forms/the-input-element/required_attribute.html +++ b/testing/web-platform/tests/html/semantics/forms/the-input-element/required_attribute.html @@ -4,9 +4,9 @@ Required Attribute - - - + + + @@ -14,20 +14,20 @@ -

Required Attribute

-
- -
+

Required Attribute

+
+ +
- + diff --git a/testing/web-platform/tests/html/semantics/forms/the-input-element/search_input.html b/testing/web-platform/tests/html/semantics/forms/the-input-element/search_input.html index f3c346a2396..175cdde99a3 100644 --- a/testing/web-platform/tests/html/semantics/forms/the-input-element/search_input.html +++ b/testing/web-platform/tests/html/semantics/forms/the-input-element/search_input.html @@ -4,9 +4,9 @@ Search Input - - - + + + @@ -14,21 +14,21 @@ -

Search Input

- +

Search Input

+
- + diff --git a/testing/web-platform/tests/html/semantics/forms/the-input-element/telephone.html b/testing/web-platform/tests/html/semantics/forms/the-input-element/telephone.html index 4d9aaf09970..974cbaf88b3 100644 --- a/testing/web-platform/tests/html/semantics/forms/the-input-element/telephone.html +++ b/testing/web-platform/tests/html/semantics/forms/the-input-element/telephone.html @@ -1,84 +1,84 @@ - Input tel - - - - + Input tel + + + + -

Input tel

- - - - -
-
+

Input tel

+ + + + +
+
- + element = document.getElementById('novalue'); + test(function(){ + element.value = '+811234'; + assert_equals(element.value, '+811234'); + }, 'Element can accept the phone number with plus sign(country code)'); + test(function(){ + element.value = '1234#5678'; + assert_equals(element.value, '1234#5678'); + }, 'Element can accept the phone number with hash mark(extension number)'); + test(function(){ + element.value = '123-456-789'; + assert_equals(element.value, '123-456-789'); + }, 'Element can accept the phone number with hyphen'); + test(function(){ + element.value = '123.456.789'; + assert_equals(element.value, '123.456.789'); + }, 'Element can accept the phone number with dots'); + test(function(){ + element.value = '1 23 4'; + assert_equals(element.value, '1 23 4'); + }, 'Element can accept the phone number with whitespace'); + test(function(){ + element.value = ' 1234 '; + assert_equals(element.value, ' 1234 '); + }, 'Element can accept the phone number with leading & following whitespaces'); + test(function(){ + element.value = '(03)12345678'; + assert_equals(element.value, '(03)12345678'); + }, 'Element can accept the phone number with parentheses(area code)'); + diff --git a/testing/web-platform/tests/html/semantics/forms/the-input-element/time.html b/testing/web-platform/tests/html/semantics/forms/the-input-element/time.html index b202d28c79c..5178d91de18 100644 --- a/testing/web-platform/tests/html/semantics/forms/the-input-element/time.html +++ b/testing/web-platform/tests/html/semantics/forms/the-input-element/time.html @@ -4,43 +4,43 @@ Input Time - + -

Input Time

-
- - - - -
-
+

Input Time

+
+ + + + +
+
- + diff --git a/testing/web-platform/tests/html/semantics/forms/the-input-element/url.html b/testing/web-platform/tests/html/semantics/forms/the-input-element/url.html index c368e746612..aafa0ced9da 100644 --- a/testing/web-platform/tests/html/semantics/forms/the-input-element/url.html +++ b/testing/web-platform/tests/html/semantics/forms/the-input-element/url.html @@ -1,59 +1,59 @@ - Input url - - - - + Input url + + + + -

Input url

-
- - - - - - - -
-
-
+

Input url

+
+ + + + + + + +
+
+
- + element = document.getElementById('value_with_leading_trailing_inner_white_space'); + assert_equals(element.value, 'a a'); + }, 'The value sanitization algorithm is as follows: Strip leading and trailing whitespace from the value.'); + diff --git a/testing/web-platform/tests/html/semantics/scripting-1/the-template-element/resources/template-child-nodes-div.xhtml b/testing/web-platform/tests/html/semantics/scripting-1/the-template-element/resources/template-child-nodes-div.xhtml index 327119f142a..14db5004dc4 100644 --- a/testing/web-platform/tests/html/semantics/scripting-1/the-template-element/resources/template-child-nodes-div.xhtml +++ b/testing/web-platform/tests/html/semantics/scripting-1/the-template-element/resources/template-child-nodes-div.xhtml @@ -1,14 +1,14 @@ - Template tag with children div tags inside + Template tag with children div tags inside -

Template tag with div tags inside

- +

Template tag with div tags inside

+ diff --git a/testing/web-platform/tests/html/semantics/scripting-1/the-template-element/resources/template-child-nodes-nested.xhtml b/testing/web-platform/tests/html/semantics/scripting-1/the-template-element/resources/template-child-nodes-nested.xhtml index acf220faf5a..406fa6c3d46 100644 --- a/testing/web-platform/tests/html/semantics/scripting-1/the-template-element/resources/template-child-nodes-nested.xhtml +++ b/testing/web-platform/tests/html/semantics/scripting-1/the-template-element/resources/template-child-nodes-nested.xhtml @@ -1,16 +1,16 @@ - Template tag with children div tags inside another template tag + Template tag with children div tags inside another template tag -

Template tag with children div tags inside another template tag

- +

Template tag with children div tags inside another template tag

+ diff --git a/testing/web-platform/tests/html/semantics/tabular-data/the-table-element/caption-methods.html b/testing/web-platform/tests/html/semantics/tabular-data/the-table-element/caption-methods.html index 5e609097e7c..5091c6b8c04 100644 --- a/testing/web-platform/tests/html/semantics/tabular-data/the-table-element/caption-methods.html +++ b/testing/web-platform/tests/html/semantics/tabular-data/the-table-element/caption-methods.html @@ -1,56 +1,56 @@ - Creating and deleting captions - - - - - - + Creating and deleting captions + + + + + + -
- - - - - - - - - - - - - - - - - - - - - +
+ + + + + + + + + + + + + + + + + + + + + - \ No newline at end of file + diff --git a/testing/web-platform/tests/html/semantics/text-level-semantics/the-time-element/001.html b/testing/web-platform/tests/html/semantics/text-level-semantics/the-time-element/001.html index 49b8dbc9db9..e1cd0480ac4 100644 --- a/testing/web-platform/tests/html/semantics/text-level-semantics/the-time-element/001.html +++ b/testing/web-platform/tests/html/semantics/text-level-semantics/the-time-element/001.html @@ -1,32 +1,32 @@ - - - HTML time element API - - - - - - -
- -

- + + + +
+ +

+ + - + diff --git a/testing/web-platform/tests/html/webappapis/system-state-and-capabilities/the-navigator-object/content.html b/testing/web-platform/tests/html/webappapis/system-state-and-capabilities/the-navigator-object/content.html index 3d0dc9083e6..b6b41c21f14 100644 --- a/testing/web-platform/tests/html/webappapis/system-state-and-capabilities/the-navigator-object/content.html +++ b/testing/web-platform/tests/html/webappapis/system-state-and-capabilities/the-navigator-object/content.html @@ -21,77 +21,77 @@ test(function () { /* Happy path */ test(function () { - navigator.registerContentHandler('text/x-unknown-type', location.href + '/%s', 'foo'); + navigator.registerContentHandler('text/x-unknown-type', location.href + '/%s', 'foo'); }, 'a handler with valid arguments should work'); /* URL argument */ test(function () { - navigator.registerContentHandler('text/x-unknown-type', '%s', 'foo'); + navigator.registerContentHandler('text/x-unknown-type', '%s', 'foo'); }, 'a relative URL should work'); test(function () { - navigator.registerContentHandler('text/x-unknown-type', location.href + '#%s', 'foo'); + navigator.registerContentHandler('text/x-unknown-type', location.href + '#%s', 'foo'); }, 'a URL with a fragment identifier should work'); test(function () { - navigator.registerContentHandler('text/x-unknown-type', location.href + '?foo=%s', 'foo'); + navigator.registerContentHandler('text/x-unknown-type', location.href + '?foo=%s', 'foo'); }, 'a URL with a query string should work'); test(function () { - navigator.registerContentHandler('text/x-unknown-type', location.href + '?foo=%s&bar', 'foo'); + navigator.registerContentHandler('text/x-unknown-type', location.href + '?foo=%s&bar', 'foo'); }, 'a URL with a multi-argument query string should work'); test(function () { - navigator.registerContentHandler('text/x-unknown-type', location.href + '/%s/bar/baz/', 'foo'); + navigator.registerContentHandler('text/x-unknown-type', location.href + '/%s/bar/baz/', 'foo'); }, 'a URL with the passed string as a directory name should work'); test(function () { - navigator.registerContentHandler('text/x-unknown-type', location.href + '/%s/bar/baz/?foo=1337&bar#baz', 'foo'); + navigator.registerContentHandler('text/x-unknown-type', location.href + '/%s/bar/baz/?foo=1337&bar#baz', 'foo'); }, 'a URL with the passed string as a directory name followed by a query string and fragment identifier should work'); test(function () { - navigator.registerContentHandler('text/x-unknown-type', location.href + '/%s/foo/%s/', 'foo'); + navigator.registerContentHandler('text/x-unknown-type', location.href + '/%s/foo/%s/', 'foo'); }, 'a URL with the passed string included twice should work'); test(function () { - assert_throws('SYNTAX_ERR', function () { navigator.registerContentHandler('text/x-unknown-type', '', 'foo') } ); + assert_throws('SYNTAX_ERR', function () { navigator.registerContentHandler('text/x-unknown-type', '', 'foo') } ); }, 'an empty url argument should throw SYNTAX_ERR'); test(function () { - assert_throws('SYNTAX_ERR', function () { navigator.registerContentHandler('text/x-unknown-type', 'http://%s.com', 'foo') } ); + assert_throws('SYNTAX_ERR', function () { navigator.registerContentHandler('text/x-unknown-type', 'http://%s.com', 'foo') } ); }, '%s instead of domain name should throw SYNTAX_ERR'); test(function () { - assert_throws('SYNTAX_ERR', function () { navigator.registerContentHandler('text/x-unknown-type', 'http://%s.example.com', 'foo') } ); + assert_throws('SYNTAX_ERR', function () { navigator.registerContentHandler('text/x-unknown-type', 'http://%s.example.com', 'foo') } ); }, '%s instead of subdomain name should throw syntax_err'); test(function () { - assert_throws('SYNTAX_ERR', function () { navigator.registerContentHandler('text/x-unknown-type', location.href + '', 'foo') } ); + assert_throws('SYNTAX_ERR', function () { navigator.registerContentHandler('text/x-unknown-type', location.href + '', 'foo') } ); }, 'a url argument without %s should throw SYNTAX_ERR'); test(function () { - assert_throws('SYNTAX_ERR', function () { navigator.registerContentHandler('text/x-unknown-type', 'http://example.com', 'foo') } ); + assert_throws('SYNTAX_ERR', function () { navigator.registerContentHandler('text/x-unknown-type', 'http://example.com', 'foo') } ); }, 'a url argument pointing to a different domain name, without %s should throw SYNTAX_ERR'); test(function () { - assert_throws('SYNTAX_ERR', function () { navigator.registerContentHandler('text/x-unknown-type', location.href + '/%', 'foo') } ); + assert_throws('SYNTAX_ERR', function () { navigator.registerContentHandler('text/x-unknown-type', location.href + '/%', 'foo') } ); }, 'a url argument without %s (but with %) should throw SYNTAX_ERR'); test(function () { - assert_throws('SYNTAX_ERR', function () { navigator.registerContentHandler('text/x-unknown-type', location.href + '/%a', 'foo') } ); + assert_throws('SYNTAX_ERR', function () { navigator.registerContentHandler('text/x-unknown-type', location.href + '/%a', 'foo') } ); }, 'a url argument without %s (but with %a) should throw SYNTAX_ERR'); test(function () { - assert_throws('SECURITY_ERR', function () { navigator.registerContentHandler('text/x-unknown-type', 'http://example.com/%s', 'foo') } ); + assert_throws('SECURITY_ERR', function () { navigator.registerContentHandler('text/x-unknown-type', 'http://example.com/%s', 'foo') } ); }, 'a url argument pointing to a different domain name should throw SECURITY_ERR'); test(function () { - assert_throws('SECURITY_ERR', function () { navigator.registerContentHandler('text/x-unknown-type', 'https://example.com/%s', 'foo') } ); + assert_throws('SECURITY_ERR', function () { navigator.registerContentHandler('text/x-unknown-type', 'https://example.com/%s', 'foo') } ); }, 'a url argument pointing to a different domain name should throw SECURITY_ERR (2)'); test(function () { - assert_throws('SECURITY_ERR', function () { navigator.registerContentHandler('text/x-unknown-type', 'http://foobar.example.com/%s', 'foo') } ); + assert_throws('SECURITY_ERR', function () { navigator.registerContentHandler('text/x-unknown-type', 'http://foobar.example.com/%s', 'foo') } ); }, 'a url argument pointing to a different domain name should throw SECURITY_ERR (3)'); /* Content type argument */ @@ -109,9 +109,9 @@ var blacklist = new Array( for (var bi=0, bl=blacklist.length; bi diff --git a/testing/web-platform/tests/lint.whitelist b/testing/web-platform/tests/lint.whitelist index c683aa04235..86a621ad390 100644 --- a/testing/web-platform/tests/lint.whitelist +++ b/testing/web-platform/tests/lint.whitelist @@ -15,9 +15,7 @@ INDENT TABS: custom-elements/* INDENT TABS: DOMEvents/* INDENT TABS: eventsource/* INDENT TABS: html/editing/dnd/* -INDENT TABS: html/semantics/* INDENT TABS: html/syntax/* -INDENT TABS: html/webappapis/* INDENT TABS: media-source/* INDENT TABS: old-tests/* INDENT TABS: pointerlock/* @@ -89,6 +87,7 @@ PRINT STATEMENT:*/tools/* CR AT EOL:WebIDL/valid/idl/documentation-dos.widl CR AT EOL:cors/resources/cors-headers.asis CR AT EOL:html/semantics/embedded-content/the-canvas-element/size.attributes.parse.whitespace.html +INDENT TABS:html/semantics/embedded-content/the-canvas-element/size.attributes.parse.whitespace.html CR AT EOL:webvtt/webvtt-file-format-parsing/webvtt-file-parsing/support/newlines.vtt PARSE-FAILED:dom/nodes/Document-createElement-namespace-tests/empty.svg PARSE-FAILED:dom/nodes/Document-createElement-namespace-tests/empty.xhtml diff --git a/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/111.html b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/111.html index 7cc092cf82e..f4df9f4b98d 100644 --- a/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/111.html +++ b/testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/111.html @@ -1,18 +1,18 @@ - scheduler: removing async attribute at runtime - - - + scheduler: removing async attribute at runtime + + +
-
FAILED (This TC requires JavaScript enabled)
+
FAILED (This TC requires JavaScript enabled)
- + - diff --git a/testing/web-platform/tests/referrer-policy/README.html b/testing/web-platform/tests/referrer-policy/README.html new file mode 100644 index 00000000000..e7566d8cc19 --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/README.html @@ -0,0 +1,9 @@ + + +Referrer-Policy Web Platform Tests - README + + +

+ TODO(burnik): Instructions on how to write tests for Referrer-Policy. +

+ diff --git a/testing/web-platform/tests/referrer-policy/generic/common.js b/testing/web-platform/tests/referrer-policy/generic/common.js new file mode 100644 index 00000000000..0e77d5fb42a --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/generic/common.js @@ -0,0 +1,28 @@ +// NOTE: This method only strips the fragment and is not in accordance to the +// recommended draft specification: +// https://w3c.github.io/webappsec/specs/referrer-policy/#null +// TODO(burnik): Implement this helper as defined by spec once added scenarios +// for URLs containing username/password/etc. +function stripUrlForUseAsReferrer(url) { + return url.replace(/#.*$/, ""); +} + +function parseUrlQueryString(queryString) { + var queries = queryString.replace(/^\?/, "").split("&"); + var params = {}; + + for (var i in queries) { + var kvp = queries[i].split("="); + params[kvp[0]] = kvp[1]; + } + + return params; +}; + +function appendIframeToBody(url) { + var iframe = document.createElement("iframe"); + iframe.src = url; + document.body.appendChild(iframe); + + return iframe; +} diff --git a/testing/web-platform/tests/referrer-policy/no-referrer-policy/no-referrer-policy.html b/testing/web-platform/tests/referrer-policy/no-referrer-policy/no-referrer-policy.html new file mode 100644 index 00000000000..693242279b2 --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/no-referrer-policy/no-referrer-policy.html @@ -0,0 +1,159 @@ + + + + Check that sub-resource gets the referrer URL when no explicit + Referrer Policy is set. + + + + + + +

Check that sub-resource gets the referrer URL when no explicit Referrer + Policy is set.

+ +

This page loads sub-resources (iframes) and waits for messages containing + referrer URLs from children.

+ + + +
+ + diff --git a/testing/web-platform/tests/referrer-policy/no-referrer-policy/no-referrer-policy.subresource.py b/testing/web-platform/tests/referrer-policy/no-referrer-policy/no-referrer-policy.subresource.py new file mode 100644 index 00000000000..9aa6f0745b3 --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/no-referrer-policy/no-referrer-policy.subresource.py @@ -0,0 +1,15 @@ +import os, json + +def main(request, response): + script_directory = os.path.dirname(os.path.abspath(__file__)) + template_basename = "no-referrer-policy.subresource.template.html" + template_filename = os.path.join(script_directory, template_basename); + + with open(template_filename) as f: + template = f.read() + + headers_as_json = json.dumps(request.headers) + exported_headers = "var SERVER_REQUEST_HEADERS = " + headers_as_json + ";" + rendered_html = template % {"headers": headers_as_json} + + return response.headers, rendered_html diff --git a/testing/web-platform/tests/referrer-policy/no-referrer-policy/no-referrer-policy.subresource.template.html b/testing/web-platform/tests/referrer-policy/no-referrer-policy/no-referrer-policy.subresource.template.html new file mode 100644 index 00000000000..01df4329a13 --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/no-referrer-policy/no-referrer-policy.subresource.template.html @@ -0,0 +1,31 @@ + + + + This page reports back it's request details the parent frame + + + + +

This page reports back it's request details to the parent frame.

+ + + + + diff --git a/testing/web-platform/tests/webmessaging/with-ports/020.html b/testing/web-platform/tests/webmessaging/with-ports/020.html index e1e0c7320e1..4fc2c4e2dd9 100644 --- a/testing/web-platform/tests/webmessaging/with-ports/020.html +++ b/testing/web-platform/tests/webmessaging/with-ports/020.html @@ -13,20 +13,18 @@ document.body.appendChild(iframe);
diff --git a/testing/web-platform/tests/webmessaging/with-ports/021.html b/testing/web-platform/tests/webmessaging/with-ports/021.html index 94cc4796768..37a0767fee0 100644 --- a/testing/web-platform/tests/webmessaging/with-ports/021.html +++ b/testing/web-platform/tests/webmessaging/with-ports/021.html @@ -13,20 +13,18 @@ document.body.appendChild(iframe);
diff --git a/testing/web-platform/tests/webmessaging/without-ports/020.html b/testing/web-platform/tests/webmessaging/without-ports/020.html index b8c7ff9df90..e35a1128a0d 100644 --- a/testing/web-platform/tests/webmessaging/without-ports/020.html +++ b/testing/web-platform/tests/webmessaging/without-ports/020.html @@ -13,20 +13,18 @@ document.body.appendChild(iframe);
diff --git a/testing/web-platform/tests/webmessaging/without-ports/021.html b/testing/web-platform/tests/webmessaging/without-ports/021.html index 992a898e794..b240fa0cad5 100644 --- a/testing/web-platform/tests/webmessaging/without-ports/021.html +++ b/testing/web-platform/tests/webmessaging/without-ports/021.html @@ -13,20 +13,18 @@ document.body.appendChild(iframe);