Update web-platform-tests to revision 155daf0c385420faf208b8bd5e319e244ec7f9cc

This commit is contained in:
WPT Sync Bot 2018-05-27 21:17:21 -04:00 committed by Josh Matthews
parent 4e6b100c7e
commit e9bdf87a27
768 changed files with 5782 additions and 26218 deletions

View file

@ -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`,
});

View file

@ -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

View file

@ -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];
}
}

View file

@ -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,