Update web-platform-tests to revision 5084587f6b05bf99ad09e7844be66dcc61070cdf

This commit is contained in:
WPT Sync Bot 2018-04-25 21:10:30 -04:00 committed by Anthony Ramine
parent 6d42d2f1e8
commit 7d1071a6a4
408 changed files with 8968 additions and 2608 deletions

View file

@ -4,4 +4,6 @@ infrastructure is operating correctly:
* The tests in assumptions/ are designed to test UA assumptions
documented in [assumptions.md](/docs/_writing-tests/assumptions.md).
* The tests in server/ are designed to test the WPT server configuration
* The tests in expected-fail/ should all fail.

View file

@ -0,0 +1,172 @@
<!doctype html>
<html>
<head>
<title>WPT Server checker</title>
<meta charset="utf-8" />
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
</head>
</body>
<body>
<script>
function check(protocol, domain, port, done) {
var url = protocol + '://' + domain + ':' + port + '/media/1x1-green.png';
var img = document.createElement('img');
img.setAttribute('src', url);
img.style.display = 'none';
img.onerror = function() {
done(false);
};
img.onload = function() {
done(true);
};
document.body.appendChild(img);
}
async_test(function(t) {
check('http', '{{browser_host}}', {{ports[http][0]}}, t.step_func(function(result) {
assert_true(result);
t.done();
}));
}, 'HTTP protocol, no subdomain, port #1');
async_test(function(t) {
check('http', '{{browser_host}}', {{ports[http][1]}}, t.step_func(function(result) {
assert_true(result);
t.done();
}));
}, 'HTTP protocol, no subdomain, port #2');
async_test(function(t) {
check('http', '{{domains[www]}}', {{ports[http][0]}}, t.step_func(function(result) {
assert_true(result);
t.done();
}));
}, 'HTTP protocol, www subdomain #1, port #1');
async_test(function(t) {
check('http', '{{domains[www]}}', {{ports[http][1]}}, t.step_func(function(result) {
assert_true(result);
t.done();
}));
}, 'HTTP protocol, www subdomain #1, port #2');
async_test(function(t) {
check('http', '{{domains[www1]}}', {{ports[http][0]}}, t.step_func(function(result) {
assert_true(result);
t.done();
}));
}, 'HTTP protocol, www subdomain #2, port #1');
async_test(function(t) {
check('http', '{{domains[www1]}}', {{ports[http][1]}}, t.step_func(function(result) {
assert_true(result);
t.done();
}));
}, 'HTTP protocol, www subdomain #2, port #2');
async_test(function(t) {
check('http', '{{domains[www2]}}', {{ports[http][0]}}, t.step_func(function(result) {
assert_true(result);
t.done();
}));
}, 'HTTP protocol, www subdomain #3, port #1');
async_test(function(t) {
check('http', '{{domains[www2]}}', {{ports[http][1]}}, t.step_func(function(result) {
assert_true(result);
t.done();
}));
}, 'HTTP protocol, www subdomain #3, port #2');
async_test(function(t) {
check('http', '{{domains[élève]}}', {{ports[http][0]}}, t.step_func(function(result) {
assert_true(result);
t.done();
}));
}, 'HTTP protocol, punycode subdomain #1, port #1');
async_test(function(t) {
check('http', '{{domains[élève]}}', {{ports[http][1]}}, t.step_func(function(result) {
assert_true(result);
t.done();
}));
}, 'HTTP protocol, punycode subdomain #1, port #2');
async_test(function(t) {
check('http', '{{domains[天気の良い日]}}', {{ports[http][0]}}, t.step_func(function(result) {
assert_true(result);
t.done();
}));
}, 'HTTP protocol, punycode subdomain #2, port #1');
async_test(function(t) {
check('http', '{{domains[天気の良い日]}}', {{ports[http][1]}}, t.step_func(function(result) {
assert_true(result);
t.done();
}));
}, 'HTTP protocol, punycode subdomain #2, port #2');
async_test(function(t) {
check('https', '{{browser_host}}', {{ports[https][0]}}, t.step_func(function(result) {
assert_true(result);
t.done();
}));
}, 'HTTPS protocol, no subdomain');
async_test(function(t) {
check('https', '{{domains[www]}}', {{ports[https][0]}}, t.step_func(function(result) {
assert_true(result);
t.done();
}));
}, 'HTTPS protocol, www subdomain #1');
async_test(function(t) {
check('https', '{{domains[www1]}}', {{ports[https][0]}}, t.step_func(function(result) {
assert_true(result);
t.done();
}));
}, 'HTTPS protocol, www subdomain #2');
async_test(function(t) {
check('https', '{{domains[www2]}}', {{ports[https][0]}}, t.step_func(function(result) {
assert_true(result);
t.done();
}));
}, 'HTTPS protocol, www subdomain #3');
async_test(function(t) {
check('https', '{{domains[élève]}}', {{ports[https][0]}}, t.step_func(function(result) {
assert_true(result);
t.done();
}));
}, 'HTTPS protocol, punycode subdomain #1');
async_test(function(t) {
check('https', '{{domains[天気の良い日]}}', {{ports[https][0]}}, t.step_func(function(result) {
assert_true(result);
t.done();
}));
}, 'HTTPS protocol, punycode subdomain #2');
</script>
</body>
</html>

View file

@ -0,0 +1,122 @@
<!doctype html>
<html>
<head>
<title>WPT Server checker</title>
<meta charset="utf-8" />
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
</head>
</body>
<body>
<script>
function check(protocol, domain, port, done) {
var url = protocol + '://' + domain + ':' + port + '/echo';
var ws = new WebSocket(url);
ws.addEventListener('error', function() {
done(false);
});
ws.addEventListener('open', function() {
done(true);
});
}
async_test(function(t) {
check('ws', '{{browser_host}}', {{ports[ws][0]}}, t.step_func(function(result) {
assert_true(result);
t.done();
}));
}, 'WS protocol, no subdomain');
async_test(function(t) {
check('ws', '{{domains[www1]}}', {{ports[ws][0]}}, t.step_func(function(result) {
assert_true(result);
t.done();
}));
}, 'WS protocol, www subdomain #1');
async_test(function(t) {
check('ws', '{{domains[www1]}}', {{ports[ws][0]}}, t.step_func(function(result) {
assert_true(result);
t.done();
}));
}, 'WS protocol, www subdomain #2');
async_test(function(t) {
check('ws', '{{domains[www2]}}', {{ports[ws][0]}}, t.step_func(function(result) {
assert_true(result);
t.done();
}));
}, 'WS protocol, www subdomain #3');
async_test(function(t) {
check('ws', '{{domains[élève]}}', {{ports[ws][0]}}, t.step_func(function(result) {
assert_true(result);
t.done();
}));
}, 'WS protocol, punycode subdomain #1');
async_test(function(t) {
check('ws', '{{domains[天気の良い日]}}', {{ports[ws][0]}}, t.step_func(function(result) {
assert_true(result);
t.done();
}));
}, 'WS protocol, punycode subdomain #2');
async_test(function(t) {
check('wss', '{{browser_host}}', {{ports[wss][0]}}, t.step_func(function(result) {
assert_true(result);
t.done();
}));
}, 'WSS protocol, no subdomain');
async_test(function(t) {
check('wss', '{{domains[www1]}}', {{ports[wss][0]}}, t.step_func(function(result) {
assert_true(result);
t.done();
}));
}, 'WSS protocol, www subdomain #1');
async_test(function(t) {
check('wss', '{{domains[www1]}}', {{ports[wss][0]}}, t.step_func(function(result) {
assert_true(result);
t.done();
}));
}, 'WSS protocol, www subdomain #2');
async_test(function(t) {
check('wss', '{{domains[www2]}}', {{ports[wss][0]}}, t.step_func(function(result) {
assert_true(result);
t.done();
}));
}, 'WSS protocol, www subdomain #3');
async_test(function(t) {
check('wss', '{{domains[élève]}}', {{ports[wss][0]}}, t.step_func(function(result) {
assert_true(result);
t.done();
}));
}, 'WSS protocol, punycode subdomain #1');
async_test(function(t) {
check('wss', '{{domains[天気の良い日]}}', {{ports[wss][0]}}, t.step_func(function(result) {
assert_true(result);
t.done();
}));
}, 'WSS protocol, punycode subdomain #2');
</script>
</body>
</html>