Bug 1477363 [wpt PR 12105] - Simplify the mediasession IDL test, a=testonly

Automatic update from web-platform-testsSimplify the mediasession IDL test (#12105)

--

wpt-commits: 60cfb547827cd6953dd7e5641b79ceb27895c5fd
wpt-pr: 12105
This commit is contained in:
Luke Bjerring 2018-07-25 17:57:21 +00:00 коммит произвёл James Graham
Родитель c10d097b31
Коммит b7f74efe02
3 изменённых файлов: 23 добавлений и 36 удалений

Просмотреть файл

@ -354115,9 +354115,9 @@
{}
]
],
"mediasession/idlharness.html": [
"mediasession/idlharness.window.js": [
[
"/mediasession/idlharness.html",
"/mediasession/idlharness.window.html",
{}
]
],
@ -594154,8 +594154,8 @@
"5ceecb2611837e6c52a303cec32d8cb9fabe93a6",
"support"
],
"mediasession/idlharness.html": [
"e5b4267255f62b4505b3c656d2b377380f8dfab5",
"mediasession/idlharness.window.js": [
"5ab75d11ae3fcb7dc19971865df170cdf4e706ee",
"testharness"
],
"mediasession/mediametadata.html": [

Просмотреть файл

@ -1,32 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Media Session IDL tests</title>
<link rel="help" href="https://wicg.github.io/mediasession/"/>
<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>Media Session IDL tests</h1>
<script>
'use strict';
promise_test(async () => {
var idl_array = new IdlArray();
const idl = await fetch('/interfaces/mediasession.idl').then(r => r.text());
const html = await fetch('/interfaces/html.idl').then(r => r.text());
idl_array.add_idls(idl);
idl_array.add_dependency_idls(html);
idl_array.add_objects({
MediaMetadata: ['new MediaMetadata()'],
Navigator: ['navigator']
});
idl_array.test();
}, 'Test IDL implementation of Media Session');
</script>
<div id="log"></div>
</body>
</html>

Просмотреть файл

@ -0,0 +1,19 @@
// META: script=/resources/WebIDLParser.js
// META: script=/resources/idlharness.js
// https://wicg.github.io/mediasession/
'use strict';
idl_test(
['mediasession'],
['html'],
idl_array => {
idl_array.add_objects({
MediaMetadata: ['new MediaMetadata()'],
MediaSession: ['navigator.mediaSession'],
Navigator: ['navigator']
});
},
'Test IDL implementation of Media Session'
);