зеркало из https://github.com/mozilla/gecko-dev.git
Backed out changeset dd86cd22879c (bug 1475329) for wpt failures on remote-playback/idlharness.window.html. CLOSED TREE
This commit is contained in:
Родитель
85c29fa15d
Коммит
a5451dde4a
|
@ -374872,9 +374872,9 @@
|
|||
{}
|
||||
]
|
||||
],
|
||||
"remote-playback/idlharness.window.js": [
|
||||
"remote-playback/idlharness.html": [
|
||||
[
|
||||
"/remote-playback/idlharness.window.html",
|
||||
"/remote-playback/idlharness.html",
|
||||
{}
|
||||
]
|
||||
],
|
||||
|
@ -591664,7 +591664,7 @@
|
|||
"support"
|
||||
],
|
||||
"interfaces/remote-playback.idl": [
|
||||
"0bb6f1c86022bc066ecfcafab9376e9255c3a265",
|
||||
"84f289a6f282eff4f541c03ab0ee91e3b3d9bea1",
|
||||
"support"
|
||||
],
|
||||
"interfaces/resource-timing.idl": [
|
||||
|
@ -611395,8 +611395,8 @@
|
|||
"2779fd2a3bd27a011e8ba20dd6fb214978d8a54c",
|
||||
"testharness"
|
||||
],
|
||||
"remote-playback/idlharness.window.js": [
|
||||
"8405e3838a635565b39a479444ad0e7cc0c82b06",
|
||||
"remote-playback/idlharness.html": [
|
||||
"715a6950952ed08b9f1ce09b698ab85395553790",
|
||||
"testharness"
|
||||
],
|
||||
"remote-playback/watch-availability-initial-callback.html": [
|
||||
|
|
|
@ -5,28 +5,29 @@
|
|||
|
||||
[Exposed=Window]
|
||||
interface RemotePlayback : EventTarget {
|
||||
Promise<long> watchAvailability(RemotePlaybackAvailabilityCallback callback);
|
||||
Promise<void> cancelWatchAvailability(optional long id);
|
||||
Promise<long> watchAvailability(RemotePlaybackAvailabilityCallback callback);
|
||||
Promise<void> cancelWatchAvailability(optional long id);
|
||||
|
||||
readonly attribute RemotePlaybackState state;
|
||||
readonly attribute RemotePlaybackState state;
|
||||
|
||||
attribute EventHandler onconnecting;
|
||||
attribute EventHandler onconnect;
|
||||
attribute EventHandler ondisconnect;
|
||||
attribute EventHandler onconnecting;
|
||||
attribute EventHandler onconnect;
|
||||
attribute EventHandler ondisconnect;
|
||||
|
||||
Promise<void> prompt();
|
||||
Promise<void> prompt();
|
||||
};
|
||||
|
||||
enum RemotePlaybackState {
|
||||
"connecting",
|
||||
"connected",
|
||||
"disconnected"
|
||||
"connecting",
|
||||
"connected",
|
||||
"disconnected"
|
||||
};
|
||||
|
||||
callback RemotePlaybackAvailabilityCallback = void (boolean available);
|
||||
|
||||
partial interface HTMLMediaElement {
|
||||
[SameObject] readonly attribute RemotePlayback remote;
|
||||
[SameObject]
|
||||
readonly attribute RemotePlayback remote;
|
||||
|
||||
[CEReactions] attribute boolean disableRemotePlayback;
|
||||
[CEReactions]
|
||||
attribute boolean disableRemotePlayback;
|
||||
};
|
||||
|
|
|
@ -0,0 +1,53 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Remote Playback API IDL tests</title>
|
||||
<link rel="help" href="https://w3c.github.io/remoteplayback/"/>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="/resources/WebIDLParser.js"></script>
|
||||
<script src="/resources/idlharness.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Remote Playback API IDL tests</h1>
|
||||
<video id='media' width=10 height=10></video>
|
||||
<pre id='untested_idl' style='display:none'>
|
||||
interface EventHandler {};
|
||||
interface HTMLMediaElement : HTMLElement {};
|
||||
interface EventTarget {};
|
||||
</pre>
|
||||
<script>
|
||||
"use strict"
|
||||
|
||||
promise_test(async function() {
|
||||
var idl_array = new IdlArray();
|
||||
function doTest([html, idl]) {
|
||||
idl_array.add_untested_idls('interface Element {};');
|
||||
idl_array.add_untested_idls(html, { only: [
|
||||
'HTMLElement',
|
||||
'HTMLOrSVGElement',
|
||||
'GlobalEventHandlers',
|
||||
'DocumentAndElementEventHandlers',
|
||||
'ElementContentEditable',
|
||||
] });
|
||||
idl_array.add_untested_idls(document.getElementById("untested_idl").textContent);
|
||||
idl_array.add_idls(idl);
|
||||
idl_array.add_objects({
|
||||
HTMLVideoElement: [document.getElementById("media")],
|
||||
RemotePlayback: [document.getElementById("media").remote]
|
||||
});
|
||||
idl_array.test();
|
||||
}
|
||||
|
||||
return Promise.all(
|
||||
[
|
||||
"/interfaces/html.idl",
|
||||
"/interfaces/remote-playback.idl",
|
||||
].map(url => fetch(url).then(r => r.text())))
|
||||
.then(doTest);
|
||||
}, "Test driver");
|
||||
</script>
|
||||
<div id="log"></div>
|
||||
</body>
|
||||
</html>
|
|
@ -1,29 +0,0 @@
|
|||
// META: script=/resources/WebIDLParser.js
|
||||
// META: script=/resources/idlharness.js
|
||||
// META: script=/common/media.js
|
||||
|
||||
'use strict';
|
||||
|
||||
// https://w3c.github.io/remoteplayback/
|
||||
|
||||
idl_test(
|
||||
['remote-playback'],
|
||||
['html', 'dom'],
|
||||
idl_array => {
|
||||
try {
|
||||
const media = document.createElement('video');
|
||||
media.src = getVideoURI('movie_5');
|
||||
media.width = media.height = 10;
|
||||
document.body.appendChild(media);
|
||||
self.media = media;
|
||||
} catch (e) {
|
||||
// Will be surfaced when media is undefined below.
|
||||
}
|
||||
|
||||
idl_array.add_objects({
|
||||
HTMLVideoElement: ['media'],
|
||||
RemotePlayback: ['media.remote']
|
||||
});
|
||||
},
|
||||
'remote-playback interfaces'
|
||||
);
|
Загрузка…
Ссылка в новой задаче