Bug 1408456 - convert mochitest test_audioBufferSourceNodeLoopStartEndSame.html to a web-platform-test r?padenot
MozReview-Commit-ID: LtT1u5ra2zd
--- a/testing/web-platform/meta/MANIFEST.json
+++ b/testing/web-platform/meta/MANIFEST.json
@@ -348564,16 +348564,22 @@
]
],
"webaudio/the-audio-api/the-audiobuffersourcenode-interface/test_audioBufferSourceNodeLoopStartEnd.html": [
[
"/webaudio/the-audio-api/the-audiobuffersourcenode-interface/test_audioBufferSourceNodeLoopStartEnd.html",
{}
]
],
+ "webaudio/the-audio-api/the-audiobuffersourcenode-interface/test_audioBufferSourceNodeLoopStartEndSame.html": [
+ [
+ "/webaudio/the-audio-api/the-audiobuffersourcenode-interface/test_audioBufferSourceNodeLoopStartEndSame.html",
+ {}
+ ]
+ ],
"webaudio/the-audio-api/the-audiodestinationnode-interface/idl-test.html": [
[
"/webaudio/the-audio-api/the-audiodestinationnode-interface/idl-test.html",
{}
]
],
"webaudio/the-audio-api/the-audionode-interface/audionode-connect-return-value.html": [
[
@@ -576473,16 +576479,20 @@
"webaudio/the-audio-api/the-audiobuffersourcenode-interface/test_audioBufferSourceNodeLoop.html": [
"a6047ca7c70167e32eac544dd1e5d31708db2c29",
"testharness"
],
"webaudio/the-audio-api/the-audiobuffersourcenode-interface/test_audioBufferSourceNodeLoopStartEnd.html": [
"88d9b5d9930a0a59b3a509cc724d0f539a10cd89",
"testharness"
],
+ "webaudio/the-audio-api/the-audiobuffersourcenode-interface/test_audioBufferSourceNodeLoopStartEndSame.html": [
+ "d16bc09e518ecd012bb673fe351052b25834e55b",
+ "testharness"
+ ],
"webaudio/the-audio-api/the-audiocontext-interface/.gitkeep": [
"da39a3ee5e6b4b0d3255bfef95601890afd80709",
"support"
],
"webaudio/the-audio-api/the-audiodestinationnode-interface/.gitkeep": [
"da39a3ee5e6b4b0d3255bfef95601890afd80709",
"support"
],
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/webaudio/the-audio-api/the-audiobuffersourcenode-interface/test_audioBufferSourceNodeLoopStartEndSame.html
@@ -0,0 +1,43 @@
+<!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 buffer = context.createBuffer(1, 2048, context.sampleRate);
+ for (var i = 0; i < 2048; ++i) {
+ buffer.getChannelData(0)[i] = Math.sin(
+ 440 * 2 * Math.PI * i / context.sampleRate
+ );
+ }
+
+ var source = context.createBufferSource();
+ source.buffer = buffer;
+
+ source.loop = true;
+ source.loopStart = source.loopEnd = 1 / context.sampleRate;
+ source.start(0);
+ return source;
+ },
+ createExpectedBuffers: function(context) {
+ var buffer = context.createBuffer(1, 2048, context.sampleRate);
+ for (var i = 0; i < 2048; ++i) {
+ buffer.getChannelData(0)[i] = Math.sin(
+ 440 * 2 * Math.PI * i / context.sampleRate
+ );
+ }
+ return buffer;
+ }
+};
+
+runTest();
+ </script>
+</head>
+</body>
+</html>