HTMLElement factory doesn't need to call MediaPlayer::isAvailable
[WebKit-https.git] / LayoutTests / media / media-disabled.html
1 <!DOCTYPE html>
2 <html>
3 <head>
4     <title>media-disabled</title>
5     <script src=video-test.js></script>
6     <script>
7         
8         window.addEventListener('load', event => {
9             run("internals.settings.setMediaEnabled(false)");
10             run('video = document.createElement("video")');
11             testExpected('video instanceof HTMLVideoElement', false);
12             testExpected('video instanceof HTMLUnknownElement', true);
13
14             run('audio = document.createElement("audio")');
15             testExpected('audio instanceof HTMLAudioElement', false);
16             testExpected('audio instanceof HTMLUnknownElement', true);
17
18             consoleWrite("");
19             run("internals.settings.setMediaEnabled(true)");
20             run('video = document.createElement("video")');
21             testExpected('video instanceof HTMLVideoElement', true);
22
23             run('audio = document.createElement("audio")');
24             testExpected('audio instanceof HTMLAudioElement', true);
25
26             endTest();
27         });
28     </script>
29 </head>
30 <body>
31 </body>
32 </html>
33
34