Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / webaudio / dynamicscompressor-basic.html
blob69d00748a9e5ba97a6abbdd88f223170359adb8a
1 <!DOCTYPE html>
3 <html>
4 <head>
5 <script src="../resources/js-test.js"></script>
6 <script src="resources/compatibility.js"></script>
7 <script type="text/javascript" src="resources/audio-testing.js"></script>
8 </head>
10 <body>
11 <div id="description"></div>
12 <div id="console"></div>
14 <script>
15 description("Basic tests for DynamicsCompressorNode API.");
17 var context;
18 var compressor;
20 function runTest() {
21 if (window.testRunner) {
22 testRunner.dumpAsText();
23 testRunner.waitUntilDone();
26 window.jsTestIsAsync = true;
28 context = new AudioContext();
29 compressor = context.createDynamicsCompressor();
31 try {
32 if (compressor.threshold.value == -24)
33 testPassed("threshold attribute has correct default value.");
34 else
35 testFailed("threshold attribute has incorrect default value.");
37 if (compressor.knee.value == 30)
38 testPassed("knee attribute has correct default value.");
39 else
40 testFailed("knee attribute has incorrect default value.");
42 if (compressor.ratio.value == 12)
43 testPassed("ratio attribute has correct default value.");
44 else
45 testFailed("ratio attribute has incorrect default value.");
47 if (compressor.attack.value - 0.003 < 3e-8)
48 testPassed("attack attribute has correct default value.");
49 else
50 testFailed("attack attribute has incorrect default value.");
52 if (compressor.release.value - 0.25 < 3e-8)
53 testPassed("release attribute has correct default value.");
54 else
55 testFailed("release attribute has incorrect default value.");
57 } catch(e) {
58 testFailed("Exception thrown when accessing DynamicsCompressorNode attributes.");
61 finishJSTest();
64 runTest();
66 </script>
68 </body>
69 </html>