Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(82)

Side by Side Diff: third_party/WebKit/LayoutTests/webaudio/Gain/gain-basic.html

Issue 2671883002: Convert GainNode tests to testharness (Closed)
Patch Set: Address review comments. Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 2
3 <!-- 3 <!--
4 Verifies GainNode attributes and their type. 4 Verifies GainNode attributes and their type.
5 --> 5 -->
6 6
7 <html> 7 <html>
8 <head> 8 <head>
9 <script src="../../resources/js-test.js"></script> 9 <script src="../../resources/testharness.js"></script>
10 <script src="../../resources/testharnessreport.js"></script>
10 <script src="../resources/audit-util.js"></script> 11 <script src="../resources/audit-util.js"></script>
11 <script src="../resources/audio-testing.js"></script> 12 <script src="../resources/audit.js"></script>
12 13
13 </head> 14 </head>
14 <body> 15 <body>
15 16
16 <script> 17 <script>
17 description("Tests GainNode attributes in IDL."); 18 let audit = Audit.createTaskRunner();
18 19
19 function runTest() { 20 audit.define('test', function(task, should) {
20 if (window.testRunner) { 21 // Create audio context.
21 testRunner.dumpAsText(); 22 let context = new AudioContext();
22 }
23 23
24 // Create audio context. 24 // Create gain node.
25 var context = new AudioContext(); 25 let gainNode = context.createGain();
26 26
27 // Create gain node. 27 should(
28 var gainNode = context.createGain(); 28 gainNode.gain instanceof AudioParam,
29 'gainNode.gain instanceof AudioParam')
30 .beTrue();
29 31
30 if (gainNode.gain.toString().indexOf("AudioParam") > -1) 32 task.done();
31 testPassed("gain is of AudioParam type."); 33 });
32 else
33 testFailed("gain is not of AudioParam type.");
34 }
35 34
36 runTest(); 35 audit.run();
37 </script> 36 </script>
38 37
39 </body> 38 </body>
40 </html> 39 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698