mirror of
https://github.com/servo/servo.git
synced 2025-08-07 22:45:34 +01:00
Update web-platform-tests to revision 44702f2bc8ea98bc32b5b244f2fe63c6ce66d49d
This commit is contained in:
parent
85fa6409bb
commit
c227604a2c
997 changed files with 45660 additions and 14650 deletions
|
@ -78,10 +78,10 @@ test1.step(function(){
|
|||
var c3 = new VTTCue(0, 2, "text3");
|
||||
t1.addCue(c3);
|
||||
assert_equals(t1.activeCues.length, 1, "t1.activeCues.length after adding a cue in the same script");
|
||||
setTimeout(test3.step_func(function(){
|
||||
test3.step_timeout(function(){
|
||||
assert_equals(t1.activeCues.length, 2, "t1.activeCues.length after the event loop has spun");
|
||||
test3.done();
|
||||
}, 0));
|
||||
}, 0);
|
||||
});
|
||||
test2.done();
|
||||
});
|
||||
|
|
|
@ -14,14 +14,14 @@
|
|||
var e = document.createElement(tagName);
|
||||
e.src = src;
|
||||
assert_equals(e.currentSrc, '');
|
||||
setTimeout(t.step_func(function() {
|
||||
t.step_timeout(function() {
|
||||
if (src == '') {
|
||||
assert_equals(e.currentSrc, '');
|
||||
} else {
|
||||
assert_equals(e.currentSrc, e.src);
|
||||
}
|
||||
t.done();
|
||||
}), 0);
|
||||
}, 0);
|
||||
}, tagName + '.currentSrc after setting src attribute "' + src + '"');
|
||||
|
||||
async_test(function(t) {
|
||||
|
@ -30,14 +30,14 @@
|
|||
s.src = src;
|
||||
e.appendChild(s);
|
||||
assert_equals(e.currentSrc, '');
|
||||
setTimeout(t.step_func(function() {
|
||||
t.step_timeout(function() {
|
||||
if (src == '') {
|
||||
assert_equals(e.currentSrc, '');
|
||||
} else {
|
||||
assert_equals(e.currentSrc, s.src);
|
||||
}
|
||||
t.done();
|
||||
}), 0);
|
||||
}, 0);
|
||||
}, tagName + '.currentSrc after adding source element with src attribute "' + src + '"');
|
||||
});
|
||||
});
|
||||
|
|
|
@ -15,10 +15,10 @@ async_test(function(t) {
|
|||
assert_false(v.paused, 'paused after playing');
|
||||
document.querySelector('iframe').contentDocument.body.appendChild(v);
|
||||
assert_false(v.paused, 'paused after moving');
|
||||
setTimeout(t.step_func(function() {
|
||||
t.step_timeout(function() {
|
||||
assert_false(v.paused, 'paused after stable state')
|
||||
t.done();
|
||||
}), 0);
|
||||
}, 0);
|
||||
});
|
||||
v.onpause = t.step_func(function() { assert_unreached(); });
|
||||
});
|
||||
|
|
|
@ -15,10 +15,10 @@ async_test(function(t) {
|
|||
assert_false(v.paused, 'paused after playing');
|
||||
document.getElementById('elsewhere').appendChild(v);
|
||||
assert_false(v.paused, 'paused after moving');
|
||||
setTimeout(t.step_func(function() {
|
||||
t.step_timeout(function() {
|
||||
assert_false(v.paused, 'paused after stable state')
|
||||
t.done();
|
||||
}), 0);
|
||||
}, 0);
|
||||
});
|
||||
v.onpause = t.step_func(function() { assert_unreached(); });
|
||||
});
|
||||
|
|
|
@ -9,13 +9,13 @@
|
|||
async_test(function(t) {
|
||||
var v = document.querySelector('video');
|
||||
v.play();
|
||||
setTimeout(t.step_func(function() {
|
||||
t.step_timeout(function() {
|
||||
assert_equals(v.networkState, v.NETWORK_EMPTY,
|
||||
'networkState after stable state');
|
||||
assert_false(v.paused, 'paused after stable state');
|
||||
v.parentNode.removeChild(v);
|
||||
assert_false(v.paused, 'paused after removing');
|
||||
v.onpause = t.step_func(function() { t.done(); });
|
||||
}), 0);
|
||||
v.onpause = t.step_func_done();
|
||||
}, 0);
|
||||
});
|
||||
</script>
|
||||
|
|
|
@ -26,10 +26,10 @@ async_test(function(t) {
|
|||
assert_true(v.paused, 'paused in pause event');
|
||||
// re-insert and verify that it stays paused
|
||||
document.body.appendChild(v);
|
||||
setTimeout(t.step_func(function() {
|
||||
t.step_timeout(function() {
|
||||
assert_true(v.paused, 'paused after re-inserting');
|
||||
t.done();
|
||||
}), 0);
|
||||
}, 0);
|
||||
});
|
||||
}));
|
||||
});
|
||||
|
|
|
@ -20,7 +20,7 @@ async_test(function(t) {
|
|||
assert_equals(elm.readyState, elm.NONE, 'elm.readyState after appening to video setting mode');
|
||||
elm.src = 'resources/track.vtt?pipe=trickle(d1)';
|
||||
assert_equals(elm.readyState, elm.NONE, 'elm.readyState after setting src');
|
||||
setTimeout(t.step_func_done(function() {
|
||||
t.step_timeout(function() {
|
||||
assert_equals(elm.readyState, elm.LOADING, 'elm.readyState in setTimeout');
|
||||
var clone = elm.cloneNode(true);
|
||||
assert_equals(clone.readyState, clone.NONE, 'clone.readyState after element creation');
|
||||
|
@ -28,7 +28,8 @@ async_test(function(t) {
|
|||
clone.track.mode = 'showing';
|
||||
assert_equals(clone.readyState, clone.NONE, 'clone.readyState after appending to video and setting mode');
|
||||
assert_not_equals(clone.track, elm.track, 'clone.track and elm.track');
|
||||
}), 0);
|
||||
t.done();
|
||||
}, 0);
|
||||
}, document.title+', loading');
|
||||
|
||||
async_test(function(t) {
|
||||
|
|
|
@ -40,7 +40,7 @@ test(function() {
|
|||
assert_throws("IndexSizeError", function() {
|
||||
new ImageData(new Uint8ClampedArray(16), 4, 3);
|
||||
});
|
||||
}, "ImageData(buffer, w, h), buffer.lenght == 4 * w * h must be true");
|
||||
}, "ImageData(buffer, w, h), buffer.length == 4 * w * h must be true");
|
||||
|
||||
test(function() {
|
||||
assert_throws(new TypeError(), function() {
|
||||
|
|
|
@ -112,7 +112,7 @@
|
|||
//
|
||||
// This is unfortunately racy in that we might _still_ get spurious
|
||||
// passes. I'm not sure how best to handle that.
|
||||
setTimeout(this.step_func(function() {
|
||||
this.step_timeout(function() {
|
||||
var q = false;
|
||||
element.onselect = this.step_func_done(function(e) {
|
||||
assert_true(q, "event should be queued");
|
||||
|
@ -122,7 +122,7 @@
|
|||
});
|
||||
element.setRangeText("foobar2", 0, 6);
|
||||
q = true;
|
||||
}), 10);
|
||||
}, 10);
|
||||
}, element.id + " setRangeText fires a select event");
|
||||
|
||||
})
|
||||
|
|
|
@ -102,7 +102,7 @@
|
|||
*/
|
||||
assert_true(checkbox5.checked);
|
||||
assert_false(checkbox5.indeterminate);
|
||||
window.setTimeout(t5.step_func(function(e) {
|
||||
t5.step_timeout(function() {
|
||||
/*
|
||||
The click event has finished being dispatched, so the checkedness and
|
||||
determinateness have been toggled back by now because the event
|
||||
|
@ -111,7 +111,7 @@
|
|||
assert_false(checkbox5.checked);
|
||||
assert_false(checkbox5.indeterminate);
|
||||
t5.done();
|
||||
}), 0);
|
||||
}, 0);
|
||||
});
|
||||
|
||||
t5.step(function(){
|
||||
|
@ -129,7 +129,7 @@
|
|||
*/
|
||||
assert_true(checkbox6.checked);
|
||||
assert_true(checkbox6.indeterminate);
|
||||
window.setTimeout(t6.step_func(function(e) {
|
||||
t6.step_timeout(function() {
|
||||
/*
|
||||
The click event has finished being dispatched, so the checkedness and
|
||||
determinateness have been toggled back by now because the event
|
||||
|
@ -138,7 +138,7 @@
|
|||
assert_false(checkbox6.checked);
|
||||
assert_false(checkbox6.indeterminate);
|
||||
t6.done();
|
||||
}), 0);
|
||||
}, 0);
|
||||
});
|
||||
|
||||
t6.step(function(){
|
||||
|
|
|
@ -0,0 +1,24 @@
|
|||
<!doctype html>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<form>
|
||||
<select>
|
||||
<option value='foo'>bar</option>
|
||||
</select>
|
||||
</form>
|
||||
<script>
|
||||
test(() => {
|
||||
var option = document.querySelector('option');
|
||||
var textChild = option.firstChild;
|
||||
assert_equals(textChild.nodeValue, "bar", "Verify that text child node's value equals the option value.");
|
||||
assert_true(textChild.isConnected, 'Verify that text child node is in the document.');
|
||||
option.text = "baz";
|
||||
assert_equals(textChild.nodeValue, "bar", 'Verify that the text child node does not have an updated value.');
|
||||
assert_false(textChild.isConnected, 'Verify that the text child node is not in the document.');
|
||||
assert_false(textChild == option.firstChild, 'Verify that text child node was replaced by a different text child node.');
|
||||
assert_equals(option.firstChild.nodeValue, "baz", 'Verify that the new text child node does equal the updated value.');
|
||||
assert_equals(option.text, "baz", 'Verify that option text getter returns the updated value.');
|
||||
option.text = "";
|
||||
assert_true(option.firstChild == null, 'Verify that after setting to empty string there are no child text nodes.');
|
||||
}, 'Verify that using HTMLOptionElement.text setter does not update the existing text child node.');
|
||||
</script>
|
|
@ -111,10 +111,10 @@
|
|||
loop = true;
|
||||
}
|
||||
});
|
||||
setTimeout(t6.step_func(function() {
|
||||
t6.step_timeout(function() {
|
||||
assert_true(loop);
|
||||
t6.done();
|
||||
}), 0);
|
||||
}, 0);
|
||||
|
||||
details7.ontoggle = t7.step_func_done(function(evt) {
|
||||
assert_true(details7.open);
|
||||
|
@ -139,19 +139,19 @@
|
|||
// The toggle event should be fired once when declaring details9 with open
|
||||
// attribute.
|
||||
details9.open = true; // opens details9
|
||||
setTimeout(t9.step_func(function() {
|
||||
t9.step_timeout(function() {
|
||||
assert_true(details9.open);
|
||||
assert_true(toggleFiredOnDetails9);
|
||||
t9.done();
|
||||
}), 0);
|
||||
}, 0);
|
||||
|
||||
details10.ontoggle = t10.step_func_done(function(evt) {
|
||||
assert_unreached("toggle event fired on closed details element");
|
||||
});
|
||||
details10.open = false; // closes details10
|
||||
setTimeout(t10.step_func(function() {
|
||||
t10.step_timeout(function() {
|
||||
assert_false(details10.open);
|
||||
t10.done();
|
||||
}), 0);
|
||||
}, 0);
|
||||
|
||||
</script>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue