Update web-platform-tests to revision 0a518aaff73532a26e175789f7e75fa99593ac64

This commit is contained in:
Ms2ger 2016-04-21 11:33:07 +02:00
parent 9c172f49d0
commit abcd4b654f
92 changed files with 2869 additions and 642 deletions

View file

@ -1,5 +1,9 @@
// note, this template substitution is XSS, but no way to avoid it in this framework
var expected_alerts = {{GET[alerts]}};
var timeout= "{{GET[timeout]}}";
if (timeout == "") {
timeout = 2;
}
if(expected_alerts.length == 0) {
function alert_assert(msg) {
@ -7,7 +11,13 @@ if(expected_alerts.length == 0) {
}
} else {
var t_alert = async_test('Expecting alerts: {{GET[alerts]}}');
function alert_assert(msg) {
setTimeout(function() {
if(t_alert.phase != t_alert.phases.COMPLETE) {
t_alert.step(function() { assert_unreached('Alert timeout, expected alerts ' + expected_alerts + ' not fired.') });
t_alert.done();
}
}, timeout * 100);
var alert_assert = function (msg) {
t_alert.step(function () {
if(msg && msg instanceof Error) {
msg = msg.message;
@ -29,5 +39,5 @@ if(expected_alerts.length == 0) {
assert_unreached('unexpected alert: ' + msg);
t_log.done();
});
}
}.bind(this);
}

View file

@ -1,5 +1,9 @@
// note, this template substitution is XSS, but no way to avoid it in this framework
var expected_logs = {{GET[logs]}};
var timeout = "{{GET[timeout]}}";
if (timeout == "") {
timeout = 2;
}
if (expected_logs.length == 0) {
function log_assert(msg) {
@ -7,6 +11,12 @@ if (expected_logs.length == 0) {
}
} else {
var t_log = async_test('Expecting logs: {{GET[logs]}}');
setTimeout(function() {
if(t_log.phase != t_log.phases.COMPLETE){
t_log.step(function () { assert_unreached('Logging timeout, expected logs ' + expected_logs + ' not sent.') });
t_log.done();
}
}, timeout * 1000);
function log(msg) {
//cons/**/ole.log(msg);
t_log.step(function () {