bug 1257718 use is() for comparison with more info on failure than ok() r?padenot draft
authorKarl Tomlinson <karlt+@karlt.net>
Fri, 17 Jun 2016 14:28:39 +1200
changeset 380505 8f14833543c1343c75739bc421c35cf581a64310
parent 380504 8f1e9208dd2b7d3c50c0b2ddd0f4a3bfa1651f10
child 380506 24d9806c540e7b58e72dafb14a31f99561d56e8a
push id21234
push userktomlinson@mozilla.com
push dateWed, 22 Jun 2016 05:11:59 +0000
reviewerspadenot
bugs1257718
milestone50.0a1
bug 1257718 use is() for comparison with more info on failure than ok() r?padenot MozReview-Commit-ID: 3XgQCq4Gg0S
dom/media/webaudio/test/test_audioParamChaining.html
--- a/dom/media/webaudio/test/test_audioParamChaining.html
+++ b/dom/media/webaudio/test/test_audioParamChaining.html
@@ -57,21 +57,21 @@ var rv = gain.gain.setValueAtTime(0, fra
                   .setValueAtTime(0.5, frameToTime(22000, RATE))
                   .setValueAtTime(1, frameToTime(44000, RATE));
 
 ok(rv instanceof AudioParam, "setValueAtTime returns an AudioParam.");
 ok(rv == gain.gain, "setValueAtTime returns the right AudioParam.");
 
 oc.startRendering().then(function(rendered) {
     console.log(rendered.getChannelData(0));
-    ok(rendered.getChannelData(0)[0] == 0,
+    is(rendered.getChannelData(0)[0], 0,
       "The value of the first step is correct.");
-    ok(rendered.getChannelData(0)[22050] == 0.5,
+    is(rendered.getChannelData(0)[22050], 0.5,
       "The value of the second step is correct");
-    ok(rendered.getChannelData(0)[44099] == 1,
+    is(rendered.getChannelData(0)[44099], 1,
       "The value of the third step is correct.");
     SimpleTest.finish();
 });
 
 </script>
 </pre>
 </body>
 </html>