зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1464320 [wpt PR 11011] - Parameterize domain and port references, a=testonly
Automatic update from web-platform-testsParameterize domain references The web-platform-tests server may be configured to run from any host name. It offers a text substitution feature so that tests can be written to account for this variability. Update tests which previously referenced the default host name (`web-platform.test`) to instead reference a parameterized value. -- [csp] Parameterize port references The web-platform-tests server may be configured to run from any TCP/IP port. It offers a text substitution feature so that tests can be written to account for this variability. Update tests which previously referenced a static port number to instead reference a parameterized value. -- wpt-commits: ad2e6b7a5a3049bfcdfdd186fb5bf922c3506bf9, ca8f405403de184b168b6bbdbba1d24504f4afd9 wpt-pr: 11011
This commit is contained in:
Родитель
c0f72a9ef7
Коммит
8e51ac5551
|
@ -301521,7 +301521,7 @@
|
|||
{}
|
||||
]
|
||||
],
|
||||
"webrtc/identity-helper.js": [
|
||||
"webrtc/identity-helper.sub.js": [
|
||||
[
|
||||
{}
|
||||
]
|
||||
|
@ -316155,9 +316155,9 @@
|
|||
{}
|
||||
]
|
||||
],
|
||||
"content-security-policy/nonce-hiding/script-nonces-hidden-meta.tentative.html": [
|
||||
"content-security-policy/nonce-hiding/script-nonces-hidden-meta.tentative.sub.html": [
|
||||
[
|
||||
"/content-security-policy/nonce-hiding/script-nonces-hidden-meta.tentative.html",
|
||||
"/content-security-policy/nonce-hiding/script-nonces-hidden-meta.tentative.sub.html",
|
||||
{}
|
||||
]
|
||||
],
|
||||
|
@ -316167,9 +316167,9 @@
|
|||
{}
|
||||
]
|
||||
],
|
||||
"content-security-policy/nonce-hiding/svgscript-nonces-hidden-meta.tentative.html": [
|
||||
"content-security-policy/nonce-hiding/svgscript-nonces-hidden-meta.tentative.sub.html": [
|
||||
[
|
||||
"/content-security-policy/nonce-hiding/svgscript-nonces-hidden-meta.tentative.html",
|
||||
"/content-security-policy/nonce-hiding/svgscript-nonces-hidden-meta.tentative.sub.html",
|
||||
{}
|
||||
]
|
||||
],
|
||||
|
@ -341167,9 +341167,9 @@
|
|||
{}
|
||||
]
|
||||
],
|
||||
"html/semantics/embedded-content/the-iframe-element/cross_origin_parentage.html": [
|
||||
"html/semantics/embedded-content/the-iframe-element/cross_origin_parentage.sub.html": [
|
||||
[
|
||||
"/html/semantics/embedded-content/the-iframe-element/cross_origin_parentage.html",
|
||||
"/html/semantics/embedded-content/the-iframe-element/cross_origin_parentage.sub.html",
|
||||
{}
|
||||
]
|
||||
],
|
||||
|
@ -342617,9 +342617,9 @@
|
|||
{}
|
||||
]
|
||||
],
|
||||
"html/semantics/forms/the-label-element/label-attributes.html": [
|
||||
"html/semantics/forms/the-label-element/label-attributes.sub.html": [
|
||||
[
|
||||
"/html/semantics/forms/the-label-element/label-attributes.html",
|
||||
"/html/semantics/forms/the-label-element/label-attributes.sub.html",
|
||||
{}
|
||||
]
|
||||
],
|
||||
|
@ -376431,9 +376431,9 @@
|
|||
{}
|
||||
]
|
||||
],
|
||||
"webrtc/RTCPeerConnection-getIdentityAssertion.html": [
|
||||
"webrtc/RTCPeerConnection-getIdentityAssertion.sub.html": [
|
||||
[
|
||||
"/webrtc/RTCPeerConnection-getIdentityAssertion.html",
|
||||
"/webrtc/RTCPeerConnection-getIdentityAssertion.sub.html",
|
||||
{}
|
||||
]
|
||||
],
|
||||
|
@ -402269,7 +402269,7 @@
|
|||
"support"
|
||||
],
|
||||
"./lint.whitelist": [
|
||||
"f18a6bb277d2392446c790aa85eb008d5f3fe05d",
|
||||
"0992e710e33823c6fb6be2725ec1e7f3c7eaa330",
|
||||
"support"
|
||||
],
|
||||
"./serve.py": [
|
||||
|
@ -412965,7 +412965,7 @@
|
|||
"support"
|
||||
],
|
||||
"clear-site-data/support/test_utils.sub.js": [
|
||||
"10f5f9d409ef513edb129e0e8522aa5f74d51ce8",
|
||||
"8b95088e042059506f15b013e2a22c62d46cb227",
|
||||
"support"
|
||||
],
|
||||
"client-hints/OWNERS": [
|
||||
|
@ -430941,7 +430941,7 @@
|
|||
"testharness"
|
||||
],
|
||||
"content-security-policy/base-uri/report-uri-does-not-respect-base-uri.sub.html": [
|
||||
"a8c074a65a874df3f2a0f7f994c2094f4c8647b9",
|
||||
"1f649852eaa9ce8471559411021f89e1bc7030f7",
|
||||
"testharness"
|
||||
],
|
||||
"content-security-policy/base-uri/report-uri-does-not-respect-base-uri.sub.html.sub.headers": [
|
||||
|
@ -431497,11 +431497,11 @@
|
|||
"testharness"
|
||||
],
|
||||
"content-security-policy/generic/generic-0_8.sub.html": [
|
||||
"6e9aeddf1a5e308036ca1a659d138cc45fd7ea00",
|
||||
"0ca657574473e38790559a120eec745a6567e698",
|
||||
"testharness"
|
||||
],
|
||||
"content-security-policy/generic/generic-0_8_1.sub.html": [
|
||||
"e5913fc5feb3e2352172c96e366389e4216c55f3",
|
||||
"1ff936bf7b9520f374971bf25d9e778a2bf304b8",
|
||||
"testharness"
|
||||
],
|
||||
"content-security-policy/generic/generic-0_9.sub.html": [
|
||||
|
@ -431948,8 +431948,8 @@
|
|||
"26e0c14927bab1b2fd6ce44b59472f336a700aa4",
|
||||
"testharness"
|
||||
],
|
||||
"content-security-policy/nonce-hiding/script-nonces-hidden-meta.tentative.html": [
|
||||
"a1de5c33148f7e202d13bc5c25d115a29ac81b3b",
|
||||
"content-security-policy/nonce-hiding/script-nonces-hidden-meta.tentative.sub.html": [
|
||||
"20e284dc7fb3c7dbdca501d144b03604ffbf8a19",
|
||||
"testharness"
|
||||
],
|
||||
"content-security-policy/nonce-hiding/script-nonces-hidden.tentative.html": [
|
||||
|
@ -431960,8 +431960,8 @@
|
|||
"28c376fd32a880f58de3f67fd3b19288c38d63f3",
|
||||
"support"
|
||||
],
|
||||
"content-security-policy/nonce-hiding/svgscript-nonces-hidden-meta.tentative.html": [
|
||||
"9ea075f30ba75a712f1fd7c05d413caaca0af67a",
|
||||
"content-security-policy/nonce-hiding/svgscript-nonces-hidden-meta.tentative.sub.html": [
|
||||
"eac2a1a48fcb8363c857ae91ec96df6fa9cac56d",
|
||||
"testharness"
|
||||
],
|
||||
"content-security-policy/nonce-hiding/svgscript-nonces-hidden.tentative.html": [
|
||||
|
@ -564665,7 +564665,7 @@
|
|||
"testharness"
|
||||
],
|
||||
"fetch/api/request/request-structure.html": [
|
||||
"2af02f3ecf8449c91f2f1d28effc3478a4bfc235",
|
||||
"450f8c91149638fe77bab2b65f345e6e24646c95",
|
||||
"testharness"
|
||||
],
|
||||
"fetch/api/request/request-type-attribute-historical.html": [
|
||||
|
@ -568517,7 +568517,7 @@
|
|||
"testharness"
|
||||
],
|
||||
"html/browsers/origin/relaxing-the-same-origin-restriction/document_domain_setter.html": [
|
||||
"74417f69455c12f894207e23496c0f92edff7eae",
|
||||
"13210ebcc5093d24f7072e1dc43769ad6cb71048",
|
||||
"testharness"
|
||||
],
|
||||
"html/browsers/origin/relaxing-the-same-origin-restriction/document_domain_setter_null.tentative.html": [
|
||||
|
@ -579576,8 +579576,8 @@
|
|||
"5654d0f8b2a68e96f4d13d480f768f8fadea39e2",
|
||||
"support"
|
||||
],
|
||||
"html/semantics/embedded-content/the-iframe-element/cross_origin_parentage.html": [
|
||||
"30f590a975529a8975bea659be46192c755f2bac",
|
||||
"html/semantics/embedded-content/the-iframe-element/cross_origin_parentage.sub.html": [
|
||||
"74ab28fb69338b2b17eed45d95c8fd06e1ef3290",
|
||||
"testharness"
|
||||
],
|
||||
"html/semantics/embedded-content/the-iframe-element/document-getters-return-null-for-cross-origin.html": [
|
||||
|
@ -581124,8 +581124,8 @@
|
|||
"3629d93c34f27a575114b15256803941c9893f6e",
|
||||
"support"
|
||||
],
|
||||
"html/semantics/forms/the-label-element/label-attributes.html": [
|
||||
"2482d37cd516b5f79e7bbf39c157e7c20e2f2100",
|
||||
"html/semantics/forms/the-label-element/label-attributes.sub.html": [
|
||||
"084ab750c7706f2d01b934cddcfb8f296f06bf9c",
|
||||
"testharness"
|
||||
],
|
||||
"html/semantics/forms/the-label-element/labelable-elements.html": [
|
||||
|
@ -589645,7 +589645,7 @@
|
|||
"testharness"
|
||||
],
|
||||
"navigation-timing/nav2_test_attributes_values.html": [
|
||||
"e5f14ce9a725cbb3a88a73b5f137625334f1e3de",
|
||||
"8feb632d11913f36a9f9c0df9c2e871b84134a30",
|
||||
"testharness"
|
||||
],
|
||||
"navigation-timing/nav2_test_document_open.html": [
|
||||
|
@ -589665,7 +589665,7 @@
|
|||
"testharness"
|
||||
],
|
||||
"navigation-timing/nav2_test_instance_accessors.html": [
|
||||
"c4960ce93c9379763845fb2cae9249d4e4c18376",
|
||||
"174ed39ea3b79363142e49b781b70d506829f9ca",
|
||||
"testharness"
|
||||
],
|
||||
"navigation-timing/nav2_test_navigate_within_document.html": [
|
||||
|
@ -618668,8 +618668,8 @@
|
|||
"208bb45887440df3bf1e45dd63f09d2d5b70857d",
|
||||
"testharness"
|
||||
],
|
||||
"webrtc/RTCPeerConnection-getIdentityAssertion.html": [
|
||||
"e87f8367bcd63ed4407e256b6fea42f9f66ecd40",
|
||||
"webrtc/RTCPeerConnection-getIdentityAssertion.sub.html": [
|
||||
"1008ce2bf98829460c2de29d59558ca10e0e81e9",
|
||||
"testharness"
|
||||
],
|
||||
"webrtc/RTCPeerConnection-getStats.https.html": [
|
||||
|
@ -618705,7 +618705,7 @@
|
|||
"testharness"
|
||||
],
|
||||
"webrtc/RTCPeerConnection-peerIdentity.html": [
|
||||
"5aa9f3d712dd320cc85645abd39f960b5072349b",
|
||||
"d821c1516578820206ecc4a9f36dc4f28f2e52dd",
|
||||
"testharness"
|
||||
],
|
||||
"webrtc/RTCPeerConnection-removeTrack.https.html": [
|
||||
|
@ -618892,8 +618892,8 @@
|
|||
"d0579ad82d492ba5cd957561ca70b5b8a344452c",
|
||||
"testharness"
|
||||
],
|
||||
"webrtc/identity-helper.js": [
|
||||
"7e12bca67dadbdcec5cbba31817dbec3f01da57c",
|
||||
"webrtc/identity-helper.sub.js": [
|
||||
"8286dcf59e5eae0320a569c2097423d9589b0be2",
|
||||
"support"
|
||||
],
|
||||
"webrtc/interfaces.https.html": [
|
||||
|
@ -618921,7 +618921,7 @@
|
|||
"testharness"
|
||||
],
|
||||
"webrtc/tools/.eslintrc.js": [
|
||||
"ceb052e89c7e9bef32fd37942515b2d38d59d269",
|
||||
"3ae35a91ae46bfba2c2ef959338ba1b61d1b3761",
|
||||
"support"
|
||||
],
|
||||
"webrtc/tools/README.md": [
|
||||
|
|
|
@ -267,7 +267,7 @@ var TestUtils = (function() {
|
|||
throw "Unsupported scheme: " + page_scheme;
|
||||
if (resource_scheme != "https" && resource_scheme != "http")
|
||||
throw "Unsupported scheme: " + resource_scheme;
|
||||
return page_scheme + "://web-platform.test:" +
|
||||
return page_scheme + "://{{domains[]}}:" +
|
||||
(page_scheme == "https" ? {{ports[https][0]}} : {{ports[http][0]}}) +
|
||||
"/clear-site-data/support/page_with_resource.sub.html?scheme=" +
|
||||
resource_scheme;
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<script src='/resources/testharness.js'></script>
|
||||
<script src='/resources/testharnessreport.js'></script>
|
||||
<!-- if base is used for resolving the URL to report to then we will not get a report -->
|
||||
<base href="http://nonexistent.web-platform.test">
|
||||
<base href="http://nonexistent.{{domains[]}}">
|
||||
</head>
|
||||
<body>
|
||||
<script>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
<head>
|
||||
<title>test wildcard host name matching (*.web-platform.test is good)</title>
|
||||
<title>test wildcard host name matching (asterisk as a subdomain of the current domain)</title>
|
||||
<meta http-equiv="Content-Security-Policy" content="script-src 'self' *.{{host}}:{{ports[http][0]}} 'unsafe-inline';">
|
||||
<script src='/resources/testharness.js'></script>
|
||||
<script src='/resources/testharnessreport.js'></script>
|
||||
|
@ -22,7 +22,7 @@
|
|||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<h1>test wildcard host name matching (*.web-platform.test is good)</h1>
|
||||
<h1>test wildcard host name matching (asterisk as a subdomain of the current domain)</h1>
|
||||
<div id='log'></div>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
<head>
|
||||
<title>test wildcard host name matching (www*.web-platform.test is bad, *www.web-platform.test is bad)</title>
|
||||
<title>test wildcard host name matching (asterisk as part of a subdomain is not accepted)</title>
|
||||
<meta http-equiv="Content-Security-Policy" content="script-src 'self' *w.{{host}}:{{ports[http][0]}} w*.{{host}}:{{ports[http][0]}} 'unsafe-inline';">
|
||||
<script src='/resources/testharness.js'></script>
|
||||
<script src='/resources/testharnessreport.js'></script>
|
||||
|
@ -20,7 +20,7 @@
|
|||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<h1>test wildcard host name matching (www*.web-platform.test is bad, *www.web-platform.test is bad)</h1>
|
||||
<h1>test wildcard host name matching (asterisk as part of a subdomain is not accepted)</h1>
|
||||
<div id='log'></div>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -124,7 +124,7 @@
|
|||
var script = document.querySelector('#cssTest');
|
||||
var style = getComputedStyle(script);
|
||||
assert_equals(style['display'], 'block');
|
||||
assert_equals(style['background-image'], "url(\"http://web-platform.test:8001/security/resources/abe.png\")");
|
||||
assert_equals(style['background-image'], "url(\"http://{{domains[]}}:{{ports[http][0]}}/security/resources/abe.png\")");
|
||||
}));
|
||||
}, "Nonces leak via CSS side-channels.");
|
||||
</script>
|
|
@ -109,7 +109,7 @@
|
|||
var script = document.querySelector('#cssTest');
|
||||
var style = getComputedStyle(script);
|
||||
assert_equals(style['display'], 'block');
|
||||
assert_equals(style['background-image'], "url(\"http://web-platform.test:8001/security/resources/abe.png\")");
|
||||
assert_equals(style['background-image'], "url(\"http://{{domains[]}}:{{ports[http][0]}}/security/resources/abe.png\")");
|
||||
}));
|
||||
}, "Nonces don't leak via CSS side-channels.");
|
||||
</script>
|
|
@ -45,7 +45,7 @@
|
|||
|
||||
case "url":
|
||||
//default value is base url
|
||||
//i.e http://web-platform.test:8000/fetch/api/request-structure.html
|
||||
//i.e http://example.com/fetch/api/request-structure.html
|
||||
newValue = "http://url.test";
|
||||
break;
|
||||
|
||||
|
|
|
@ -11,17 +11,17 @@
|
|||
<script>
|
||||
var host_info = get_host_info();
|
||||
var HTTP_PORT = host_info.HTTP_PORT;
|
||||
var ORIGINAL_HOST = host_info.ORIGINAL_HOST; // e.g. "web-platform.test"
|
||||
var ORIGINAL_HOST = host_info.ORIGINAL_HOST;
|
||||
var SUFFIX_HOST = ORIGINAL_HOST.substring(ORIGINAL_HOST.lastIndexOf('.') + 1); // e.g. "test"
|
||||
var PREFIX_HOST = "www1." + ORIGINAL_HOST; // e.g. "www1.web-platform.test"
|
||||
var REMOTE_HOST = host_info.REMOTE_HOST;
|
||||
var iframe = document.getElementById("iframe");
|
||||
var iframe_url = new URL("support/document_domain_setter_iframe.html", document.location);
|
||||
iframe_url.hostname = PREFIX_HOST;
|
||||
iframe_url.hostname = REMOTE_HOST;
|
||||
iframe.src = iframe_url;
|
||||
test(function() {
|
||||
assert_throws("SecurityError", function() { document.domain = SUFFIX_HOST; });
|
||||
assert_throws("SecurityError", function() { document.domain = "." + SUFFIX_HOST; });
|
||||
assert_throws("SecurityError", function() { document.domain = PREFIX_HOST; });
|
||||
assert_throws("SecurityError", function() { document.domain = REMOTE_HOST; });
|
||||
assert_throws("SecurityError", function() { document.domain = "example.com"; });
|
||||
}, "failed setting of document.domain");
|
||||
async_test(function(t) {
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="iframe_harness.js"></script>
|
||||
<body>
|
||||
<iframe src="http://www1.web-platform.test:8000/html/semantics/embedded-content/the-iframe-element/cross_origin_child.html"></iframe>
|
||||
<iframe src="http://{{domains[www1]}}:{{ports[http][0]}}/html/semantics/embedded-content/the-iframe-element/cross_origin_child.html"></iframe>
|
||||
</body>
|
||||
<script>
|
||||
get_test_results('bffa23ee-b45a-4e9a-9405-87ab437d5cfa');
|
|
@ -222,7 +222,7 @@
|
|||
"The number of labels should be 2 after the labelable element is moved to iframe.");
|
||||
});
|
||||
|
||||
iframe.setAttribute('src', 'http://web-platform.test:8000/html/semantics/forms/the-label-element/iframe-label-attributes.html');
|
||||
iframe.setAttribute('src', 'http://{{domains[]}}:{{ports[http][0]}}/html/semantics/forms/the-label-element/iframe-label-attributes.html');
|
||||
document.body.appendChild(iframe);
|
||||
}, "A labelable element is moved to iframe.");
|
||||
|
|
@ -772,19 +772,3 @@ MISSING-LINK: css/filter-effects/*.any.js
|
|||
# Tests that use WebKit/Blink testing APIs
|
||||
LAYOUTTESTS APIS: css/css-regions/interactivity/*
|
||||
LAYOUTTESTS APIS: resources/chromium/generic_sensor_mocks.js
|
||||
|
||||
# Existing use of WEB-PLATFORM.TEST
|
||||
WEB-PLATFORM.TEST: clear-site-data/support/test_utils.sub.js
|
||||
WEB-PLATFORM.TEST: content-security-policy/base-uri/report-uri-does-not-respect-base-uri.sub.html
|
||||
WEB-PLATFORM.TEST: content-security-policy/generic/generic-0_8.sub.html
|
||||
WEB-PLATFORM.TEST: content-security-policy/generic/generic-0_8_1.sub.html
|
||||
WEB-PLATFORM.TEST: content-security-policy/nonce-hiding/script-nonces-hidden-meta.tentative.html
|
||||
WEB-PLATFORM.TEST: content-security-policy/nonce-hiding/svgscript-nonces-hidden-meta.tentative.html
|
||||
WEB-PLATFORM.TEST: fetch/api/request/request-structure.html
|
||||
WEB-PLATFORM.TEST: html/browsers/origin/relaxing-the-same-origin-restriction/document_domain_setter.html
|
||||
WEB-PLATFORM.TEST: html/semantics/embedded-content/the-iframe-element/cross_origin_parentage.html
|
||||
WEB-PLATFORM.TEST: html/semantics/forms/the-label-element/label-attributes.html
|
||||
WEB-PLATFORM.TEST: navigation-timing/nav2_test_attributes_values.html
|
||||
WEB-PLATFORM.TEST: navigation-timing/nav2_test_instance_accessors.html
|
||||
WEB-PLATFORM.TEST: webrtc/RTCPeerConnection-getIdentityAssertion.html
|
||||
WEB-PLATFORM.TEST: webrtc/identity-helper.js
|
||||
|
|
|
@ -7,12 +7,23 @@
|
|||
<link rel="help" href="http://www.w3.org/TR/navigation-timing-2/#sec-PerformanceNavigationTiming"/>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="/common/get-host-info.sub.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Description</h1>
|
||||
<p>This test validates that the values of nav timing 2 instance's timing-related attributes are in certain order and the others are of expected values.</p>
|
||||
|
||||
<script>
|
||||
// Host names and ports may be configured at test execution time. The
|
||||
// web-platform-tests server offers two mechanisms for retrieving these
|
||||
// values dynamically: direct text substitution and the `get-host-info`
|
||||
// script. The former is inapproprate for this test because it
|
||||
// influences the size of the document, and this test includes static
|
||||
// assertions for that value.
|
||||
var host_info = get_host_info();
|
||||
var expectedUrl = "http://" + host_info.ORIGINAL_HOST + ":" +
|
||||
host_info.HTTP_PORT +
|
||||
"/navigation-timing/nav2_test_attributes_values.html";
|
||||
var navTiming2EventOrder1 = [
|
||||
'startTime',
|
||||
'redirectStart',
|
||||
|
@ -81,7 +92,7 @@
|
|||
var entries = entryList.getEntries();
|
||||
assert_equals(entries[0].entryType, "navigation",
|
||||
"Expected entryType to be: navigation.");
|
||||
assert_equals(entries[0].name, "http://web-platform.test:8001/navigation-timing/nav2_test_attributes_values.html");
|
||||
assert_equals(entries[0].name, expectedUrl);
|
||||
assert_equals(entries[0].startTime, 0,
|
||||
"Expected startTime to be: 0.");
|
||||
assert_equals(entries[0].duration, entries[0].loadEventEnd,
|
||||
|
@ -93,8 +104,8 @@
|
|||
// running this test.
|
||||
assert_true(entries[0].transferSize > entries[0].encodedBodySize,
|
||||
"Expected transferSize to be greater than encodedBodySize in uncached navigation.");
|
||||
assert_equals(entries[0].encodedBodySize, 5328);
|
||||
assert_equals(entries[0].decodedBodySize, 5328);
|
||||
assert_equals(entries[0].encodedBodySize, 5955);
|
||||
assert_equals(entries[0].decodedBodySize, 5955);
|
||||
verifyTimingEventOrder(entries[0], navTiming2EventOrder1);
|
||||
// Verify if the reported timing is not that different
|
||||
// from what is reported by Navigation Timing 1.
|
||||
|
|
|
@ -7,12 +7,16 @@
|
|||
<link rel="help" href="http://www.w3.org/TR/navigation-timing-2/#sec-PerformanceNavigationTiming"/>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="/common/get-host-info.sub.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Description</h1>
|
||||
<p>This test validates that nav timing 2 instance can be accessed by three different accessors once available: window.performance.getEntries()/getEntriesByType("navigation")/getEntriesByName("document")</p>
|
||||
|
||||
<script>
|
||||
var host_info = get_host_info();
|
||||
var expectedUrl = "http://" + host_info.ORIGINAL_HOST + ":" +
|
||||
host_info.HTTP_PORT + "/navigation-timing/nav2_test_instance_accessors.html";
|
||||
var navTiming2Attributes = [
|
||||
'connectEnd',
|
||||
'connectStart',
|
||||
|
@ -50,10 +54,10 @@
|
|||
t.step_func(function (entryList) {
|
||||
var instance1 = performance.getEntries()[0];
|
||||
var instance2 = performance.getEntriesByType("navigation")[0];
|
||||
var instance3 = performance.getEntriesByName("http://web-platform.test:8001/navigation-timing/nav2_test_instance_accessors.html")[0];
|
||||
var instance3 = performance.getEntriesByName(expectedUrl)[0];
|
||||
|
||||
assert_equals(performance.getEntriesByType("navigation").length, 1, "Expected there is only one navigation timing instance.");
|
||||
assert_equals(performance.getEntriesByName("http://web-platform.test:8001/navigation-timing/nav2_test_instance_accessors.html").length, 1, "Expected there is only one navigation timing instance.");
|
||||
assert_equals(performance.getEntriesByName(expectedUrl).length, 1, "Expected there is only one navigation timing instance.");
|
||||
|
||||
for (var i = 0; i < navTiming2Attributes.length; i++) {
|
||||
assert_equals(instance1[navTiming2Attributes[i]], instance2[navTiming2Attributes[i]]);
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<title>RTCPeerConnection.prototype.getIdentityAssertion</title>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="identity-helper.js"></script>
|
||||
<script src="identity-helper.sub.js"></script>
|
||||
<script>
|
||||
'use strict';
|
||||
|
||||
|
@ -13,7 +13,7 @@
|
|||
// The tests here interacts with the mock identity provider located at
|
||||
// /.well-known/idp-proxy/mock-idp.js
|
||||
|
||||
// The following helper functions are called from identity-helper.js
|
||||
// The following helper functions are called from identity-helper.sub.js
|
||||
// parseAssertionResult
|
||||
// getIdpDomains
|
||||
// assert_rtcerror_rejection
|
||||
|
@ -217,7 +217,7 @@
|
|||
promise_test(t => {
|
||||
const pc = new RTCPeerConnection();
|
||||
|
||||
pc.setIdentityProvider('nonexistent.web-platform.test', {
|
||||
pc.setIdentityProvider('nonexistent.{{domains[]}}', {
|
||||
protocol: `non-existent`,
|
||||
usernameHint: `alice@example.org`,
|
||||
});
|
|
@ -3,7 +3,7 @@
|
|||
<title>RTCPeerConnection.prototype.peerIdentity</title>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="identity-helper.js"></script>
|
||||
<script src="identity-helper.sub.js"></script>
|
||||
<script>
|
||||
'use strict';
|
||||
|
||||
|
@ -13,7 +13,7 @@
|
|||
// The tests here interacts with the mock identity provider located at
|
||||
// /.well-known/idp-proxy/mock-idp.js
|
||||
|
||||
// The following helper functions are called from identity-helper.js
|
||||
// The following helper functions are called from identity-helper.sub.js
|
||||
// parseAssertionResult
|
||||
// getIdpDomains
|
||||
// assert_rtcerror_rejection
|
||||
|
|
|
@ -1,14 +1,10 @@
|
|||
'use strict';
|
||||
|
||||
/*
|
||||
In web-platform-test, the following domains are required to be set up locally:
|
||||
127.0.0.1 web-platform.test
|
||||
127.0.0.1 www.web-platform.test
|
||||
127.0.0.1 www1.web-platform.test
|
||||
127.0.0.1 www2.web-platform.test
|
||||
127.0.0.1 xn--n8j6ds53lwwkrqhv28a.web-platform.test
|
||||
127.0.0.1 xn--lve-6lad.web-platform.test
|
||||
0.0.0.0 nonexistent.web-platform.test
|
||||
In web-platform-test, a number of domains are required to be set up locally.
|
||||
The list is available at docs/_writing-tests/server-features.md. The
|
||||
appropriate hosts file entries can be generated with the WPT CLI via the
|
||||
following command: `wpt make-hosts-file`.
|
||||
*/
|
||||
|
||||
/*
|
||||
|
@ -34,12 +30,16 @@ function parseAssertionResult(assertionResultStr) {
|
|||
|
||||
// Return two distinct IdP domains that are different from current domain
|
||||
function getIdpDomains() {
|
||||
if(window.location.hostname === 'www1.web-platform.test') {
|
||||
return ['www.web-platform.test', 'www2.web-platform.test'];
|
||||
} else if(window.location.hostname === 'www2.web-platform.test') {
|
||||
return ['www.web-platform.test', 'www1.web-platform.test'];
|
||||
const domainA = '{{domains[www]}}';
|
||||
const domainB = '{{domains[www1]}}';
|
||||
const domainC = '{{domains[www2]}}';
|
||||
|
||||
if(window.location.hostname === domainA) {
|
||||
return [domainB, domainC];
|
||||
} else if(window.location.hostname === domainB) {
|
||||
return [domainA, domainC];
|
||||
} else {
|
||||
return ['www1.web-platform.test', 'www2.web-platform.test'];
|
||||
return [domainA, domainB];
|
||||
}
|
||||
}
|
||||
|
|
@ -72,7 +72,7 @@ module.exports = {
|
|||
assert_optional_dict_field: true,
|
||||
assert_optional_enum_field: true,
|
||||
|
||||
// identity-helper.js
|
||||
// identity-helper.sub.js
|
||||
parseAssertionResult: true,
|
||||
getIdpDomains: true,
|
||||
assert_rtcerror_rejection: true,
|
||||
|
|
Загрузка…
Ссылка в новой задаче