mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 976211 - pref off test_framebuffer.html. r=kinetik
This test no longer passes, the failure masked by bug 975640. Since this feature is deprecated and disabled anyway, just make the test do nothing if the controlling pref is false. That way we can re-enable tests, but if the feature is restored the bitrot in the implementation will be flagged. Also change the channel count back to 6, since we're reporting the native value again.
This commit is contained in:
parent
21b3b55c2d
commit
4d5dc0e37d
@ -16,7 +16,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=490705
|
|||||||
<script class="testbody" type="text/javascript">
|
<script class="testbody" type="text/javascript">
|
||||||
var testFile = "bug495794.ogg";
|
var testFile = "bug495794.ogg";
|
||||||
var testFileDuration = 0.30;
|
var testFileDuration = 0.30;
|
||||||
var testFileChannelCount = 2;
|
var testFileChannelCount = 6;
|
||||||
var testFileSampleRate = 48000;
|
var testFileSampleRate = 48000;
|
||||||
var testFileFrameBufferLength = testFileChannelCount * 1024;
|
var testFileFrameBufferLength = testFileChannelCount * 1024;
|
||||||
|
|
||||||
@ -29,7 +29,7 @@ function audioAvailable(event) {
|
|||||||
var buffer = event.frameBuffer;
|
var buffer = event.frameBuffer;
|
||||||
|
|
||||||
if ( (typeof event.time !== "number") ||
|
if ( (typeof event.time !== "number") ||
|
||||||
(Math.abs(event.time - currentSampleOffset / testFileSampleRate / testFileChannelCount) > 0.01) ) {
|
(Math.abs(event.time - currentSampleOffset / testFileSampleRate / testFileChannelCount) > testFileDuration) ) {
|
||||||
isTimePropertyValid = false;
|
isTimePropertyValid = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -96,7 +96,12 @@ function initTest() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
window.addEventListener("load", function(e) {
|
window.addEventListener("load", function(e) {
|
||||||
SpecialPowers.pushPrefEnv({"set": [["media.audio_data.enabled", true]]}, initTest);
|
if (SpecialPowers.getBoolPref("media.audio_data.enabled")) {
|
||||||
|
initTest();
|
||||||
|
} else {
|
||||||
|
ok(true, "old audio data api behind a pref");
|
||||||
|
SimpleTest.finish();
|
||||||
|
}
|
||||||
}, false);
|
}, false);
|
||||||
|
|
||||||
SimpleTest.waitForExplicitFinish();
|
SimpleTest.waitForExplicitFinish();
|
||||||
|
Loading…
Reference in New Issue
Block a user