Bug 1424271 - convert mochitest test_analyserNodePassThrough.html and test_analyserNodePassThrough.html to a web-platform-test r?padenot draft
authorp1509425
Fri, 05 Jan 2018 11:28:00 +0100
changeset 717074 2b384edb6192a2c722e6d5f327f324f0c46c0ac1
parent 715663 f78a83244fbebe8a469ae3512fce7f638cab7e1f
child 717075 56c11e4864583383d58be0ac25aed06a141ac7f8
push id94557
push userbmo:alan.guyoch@gmail.com
push dateMon, 08 Jan 2018 07:50:18 +0000
reviewerspadenot
bugs1424271
milestone59.0a1
Bug 1424271 - convert mochitest test_analyserNodePassThrough.html and test_analyserNodePassThrough.html to a web-platform-test r?padenot MozReview-Commit-ID: DtzDSmIN0s6
testing/web-platform/meta/MANIFEST.json
testing/web-platform/tests/webaudio/the-audio-api/the-analysernode-interface/test_analyserNodePassThrough.html
--- a/testing/web-platform/meta/MANIFEST.json
+++ b/testing/web-platform/meta/MANIFEST.json
@@ -348522,16 +348522,22 @@
     ]
    ],
    "webaudio/the-audio-api/the-analysernode-interface/test-analysernode.html": [
     [
      "/webaudio/the-audio-api/the-analysernode-interface/test-analysernode.html",
      {}
     ]
    ],
+   "webaudio/the-audio-api/the-analysernode-interface/test_analyserNodePassThrough.html": [
+    [
+     "/webaudio/the-audio-api/the-analysernode-interface/test_analyserNodePassThrough.html",
+     {}
+    ]
+   ],
    "webaudio/the-audio-api/the-audiobuffer-interface/idl-test.html": [
     [
      "/webaudio/the-audio-api/the-audiobuffer-interface/idl-test.html",
      {}
     ]
    ],
    "webaudio/the-audio-api/the-audiodestinationnode-interface/idl-test.html": [
     [
@@ -524334,17 +524340,17 @@
    "a53b3bd5909771c800c5d3e874fd83ae77f0efeb",
    "support"
   ],
   "dom/events/EventListener-incumbent-global-subsubframe.sub.html": [
    "35ffc948502021b3367ae759b5f5ac362fd7acaa",
    "support"
   ],
   "dom/events/EventListener-invoke-legacy.html": [
-   "e56b332acb454ab76964b78588536777946ddff8",
+   "13cb3802cb2722417b876ded17fddd222c69564a",
    "testharness"
   ],
   "dom/events/EventListenerOptions-capture.html": [
    "cebd60a18add5403d4f0bd68e88e05daacfd241a",
    "testharness"
   ],
   "dom/events/EventTarget-addEventListener.html": [
    "85dea0178b16b5c3e8ddbfa9a8b4bd8424bc0a3d",
@@ -545998,17 +546004,17 @@
    "a04ecfd484ada80c436c880c6fb39abba47eac1c",
    "testharness"
   ],
   "html/semantics/scripting-1/the-script-element/module/late-star-export-request.html": [
    "2fd8c4ee6fcc66a8ddc2100a0840ebcc324a7d58",
    "testharness"
   ],
   "html/semantics/scripting-1/the-script-element/module/load-error-events-inline.html": [
-   "9b35d8d7ba6bb4826274c9570056cc962660d715",
+   "bbdfd11cfc7e52748f07d09ebe7cf6782ad5e782",
    "testharness"
   ],
   "html/semantics/scripting-1/the-script-element/module/load-error-events.html": [
    "304dc3a7e9cd48699742b0a1431adda1d0f253c0",
    "testharness"
   ],
   "html/semantics/scripting-1/the-script-element/module/missing-export-nested.js": [
    "5c6c1dae178b88b42ce87964e372f7d7db99ba70",
@@ -576401,16 +576407,20 @@
   "webaudio/the-audio-api/the-analysernode-interface/test-analyser-scale.html": [
    "cb51b46db5e572c52502dc0dce465927fb3a2b87",
    "testharness"
   ],
   "webaudio/the-audio-api/the-analysernode-interface/test-analysernode.html": [
    "8478aa405a4641a9c47554529762e85a37d7593a",
    "testharness"
   ],
+  "webaudio/the-audio-api/the-analysernode-interface/test_analyserNodePassThrough.html": [
+   "6c903bbd97462a6608c80a4d7f7ba2d6a9bbcb9a",
+   "testharness"
+  ],
   "webaudio/the-audio-api/the-audiobuffer-interface/.gitkeep": [
    "da39a3ee5e6b4b0d3255bfef95601890afd80709",
    "support"
   ],
   "webaudio/the-audio-api/the-audiobuffer-interface/idl-test.html": [
    "0ef05c242d8f987d521c0e9ce474d0f9a46bee28",
    "testharness"
   ],
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/webaudio/the-audio-api/the-analysernode-interface/test_analyserNodePassThrough.html
@@ -0,0 +1,40 @@
+<!DOCTYPE html>
+<html>
+<head>
+  <meta charset="utf-8">
+  <script src="/resources/testharness.js"></script>
+  <script src="/resources/testharnessreport.js"></script>
+  <script src="/webaudio/js/helpers.js"></script>
+  <script>
+var gTest = {
+  length: 2048,
+  numberOfChannels: 1,
+  createGraph: function(context) {
+    var source = context.createBufferSource();
+
+    var analyser = context.createAnalyser();
+
+    source.buffer = this.buffer;
+
+    source.connect(analyser);
+
+    source.start(0);
+    return analyser;
+  },
+  createExpectedBuffers: function(context) {
+    this.buffer = context.createBuffer(1, 2048, context.sampleRate);
+    for (var i = 0; i < 2048; ++i) {
+      this.buffer.getChannelData(0)[i] = Math.sin(
+        440 * 2 * Math.PI * i / context.sampleRate
+      );
+    }
+
+    return [this.buffer];
+  }
+};
+
+runTest("AnalyserNode PassThrough");
+  </script>
+</head>
+</body>
+</html>