WebCore:
[WebKit-https.git] / LayoutTests / media / constructors.html
1 <body>
2 <p>Test that media constructors behave consistently.</p>
3 <video></video>
4 <audio></audio>
5 <script src=video-test.js></script>
6 <script>
7 var audioJS = new Audio();
8 var videoElem = document.getElementsByTagName('video')[0];
9 var audioElem = document.getElementsByTagName('audio')[0];
10 test("audioJS instanceof HTMLAudioElement");
11 test("audioJS instanceof HTMLMediaElement");
12 test("!(audioJS instanceof HTMLVideoElement)");
13 test("audioElem instanceof HTMLAudioElement");
14 test("audioElem instanceof HTMLMediaElement");
15 test("!(audioElem instanceof HTMLVideoElement)");
16 test("videoElem instanceof HTMLVideoElement");
17 test("videoElem instanceof HTMLMediaElement");
18 test("!(videoElem instanceof HTMLAudioElement)");
19 endTest();
20 </script>