blob: 5fb6708457fe97a843fcc5ce2a546fcbad5a150d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
<!DOCTYPE html>
<!--
Verifies GainNode attributes and their type.
-->
<html>
<head>
<script src="../resources/js-test.js"></script>
<script type="text/javascript" src="resources/audio-testing.js"></script>
</head>
<body>
<script>
description("Tests GainNode attributes in IDL.");
function runTest() {
if (window.testRunner) {
testRunner.dumpAsText();
}
// Create audio context.
var context = new webkitAudioContext();
// Create gain node.
var gainNode = context.createGainNode();
if (gainNode.gain.toString().indexOf("AudioParam") > -1)
testPassed("gain is of AudioParam type.");
else
testFailed("gain is not of AudioParam type.");
}
runTest();
</script>
</body>
</html>
|