mirror of
https://github.com/servo/servo.git
synced 2025-08-17 11:25:35 +01:00
Update web-platform-tests to revision be5419e845d39089ba6dc338c1bd0fa279108317
This commit is contained in:
parent
aa199307c8
commit
2b6f573eb5
3440 changed files with 109438 additions and 41750 deletions
|
@ -74,12 +74,14 @@ function runTest(config,qualifier) {
|
|||
|
||||
// Lisen for an event from the new window containing its test assertions
|
||||
window.addEventListener('message', test.step_func(function(messageEvent) {
|
||||
messageEvent.data.forEach(test.step_func(function(assertion) {
|
||||
assert_equals(assertion.actual, assertion.expected, assertion.message);
|
||||
}));
|
||||
if (messageEvent.data.testResult) {
|
||||
messageEvent.data.testResult.forEach(test.step_func(function(assertion) {
|
||||
assert_equals(assertion.actual, assertion.expected, assertion.message);
|
||||
}));
|
||||
|
||||
win.close();
|
||||
test.done();
|
||||
win.close();
|
||||
test.done();
|
||||
}
|
||||
}));
|
||||
|
||||
// Delete things which can't be cloned and posted over to the new window
|
||||
|
@ -96,7 +98,8 @@ function runTest(config,qualifier) {
|
|||
return access.createMediaKeys();
|
||||
}).then(function(mediaKeys) {
|
||||
_mediaKeys = mediaKeys;
|
||||
_video.setMediaKeys( mediaKeys );
|
||||
return _video.setMediaKeys( mediaKeys );
|
||||
}).then(function() {
|
||||
_mediaKeySession = _mediaKeys.createSession('persistent-license');
|
||||
waitForEventAndRunStep('encrypted', _video, onEncrypted, test);
|
||||
waitForEventAndRunStep('playing', _video, onPlaying, test);
|
||||
|
|
|
@ -45,7 +45,7 @@ function runTest(config,qualifier) {
|
|||
config.messagehandler( event.messageType, event.message ).then(function(response) {
|
||||
return _mediaKeySession.update(response);
|
||||
}).then(function() {
|
||||
_video.setMediaKeys(_mediaKeys);
|
||||
return _video.setMediaKeys(_mediaKeys);
|
||||
}).catch(onFailure);
|
||||
}
|
||||
|
||||
|
@ -70,13 +70,17 @@ function runTest(config,qualifier) {
|
|||
_video.setMediaKeys( null );
|
||||
|
||||
var win = window.open(config.windowscript);
|
||||
window.addEventListener('message', test.step_func(function(event) {
|
||||
event.data.forEach(test.step_func(function(assertion) {
|
||||
assert_equals(assertion.actual, assertion.expected, assertion.message);
|
||||
}));
|
||||
assert_not_equals(win, null, "Popup windows not allowed?");
|
||||
|
||||
win.close();
|
||||
test.done();
|
||||
window.addEventListener('message', test.step_func(function(event) {
|
||||
if (event.data.testResult) {
|
||||
event.data.testResult.forEach(test.step_func(function(assertion) {
|
||||
assert_equals(assertion.actual, assertion.expected, assertion.message);
|
||||
}));
|
||||
|
||||
win.close();
|
||||
test.done();
|
||||
}
|
||||
}));
|
||||
|
||||
delete config.video;
|
||||
|
|
|
@ -10,7 +10,7 @@ function runTest(config) {
|
|||
resolve(iframe);
|
||||
};
|
||||
iframe.sandbox = sandbox;
|
||||
iframe.src = src;
|
||||
iframe.srcdoc = src;
|
||||
document.documentElement.appendChild(iframe);
|
||||
});
|
||||
}
|
||||
|
@ -25,7 +25,7 @@ function runTest(config) {
|
|||
}
|
||||
|
||||
promise_test(function (test) {
|
||||
var script = 'data:text/html,' +
|
||||
var script =
|
||||
'<script>' +
|
||||
' window.onmessage = function(e) {' +
|
||||
' navigator.requestMediaKeySystemAccess("' + config.keysystem + '", [{' +
|
||||
|
@ -53,7 +53,7 @@ function runTest(config) {
|
|||
return access.createMediaKeys();
|
||||
}).then(function (mediaKeys) {
|
||||
// Success, so now create the iframe and try there.
|
||||
return load_iframe(script, 'allow-scripts');
|
||||
return load_iframe(script, 'allow-scripts allow-secure-context');
|
||||
}).then(function (iframe) {
|
||||
iframe.contentWindow.postMessage({}, '*');
|
||||
return wait_for_message();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue