mirror of
https://github.com/servo/servo.git
synced 2025-08-17 19:35:33 +01:00
Update web-platform-tests to revision 0a518aaff73532a26e175789f7e75fa99593ac64
This commit is contained in:
parent
9c172f49d0
commit
abcd4b654f
92 changed files with 2869 additions and 642 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue