forked from WebKit/WebKit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconstructors.html
20 lines (20 loc) · 905 Bytes
/
constructors.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
<body>
<p>Test that media constructors behave consistently.</p>
<video></video>
<audio></audio>
<script src=video-test.js></script>
<script>
var audioJS = new Audio();
var videoElem = document.getElementsByTagName('video')[0];
var audioElem = document.getElementsByTagName('audio')[0];
testExpected("audioJS instanceof HTMLAudioElement", true);
testExpected("audioJS instanceof HTMLMediaElement", true);
testExpected("audioJS instanceof HTMLVideoElement", false);
testExpected("audioElem instanceof HTMLAudioElement", true);
testExpected("audioElem instanceof HTMLMediaElement", true);
testExpected("audioElem instanceof HTMLVideoElement", false);
testExpected("videoElem instanceof HTMLVideoElement", true);
testExpected("videoElem instanceof HTMLMediaElement", true);
testExpected("videoElem instanceof HTMLAudioElement", false);
endTest();
</script>