Title: [248248] releases/WebKitGTK/webkit-2.24/LayoutTests
- Revision
- 248248
- Author
- [email protected]
- Date
- 2019-08-03 20:23:52 -0700 (Sat, 03 Aug 2019)
Log Message
Merge r247207 - [GStreamer] media/video-volume.html broken after switching from cubic to linear scaling
https://bugs.webkit.org/show_bug.cgi?id=199505
Reviewed by Xabier Rodriguez-Calvar.
PulseAudio has a conversion process from volume's in
double-precision to uint32_t volumes. Depending on the environment
can introduce rounding errors. Be more lenient in our comparison
code.
* media/video-volume-expected.txt: Update baseline
* media/video-volume.html: Compare volume values within a
reasonable tolerance.
Modified Paths
Diff
Modified: releases/WebKitGTK/webkit-2.24/LayoutTests/ChangeLog (248247 => 248248)
--- releases/WebKitGTK/webkit-2.24/LayoutTests/ChangeLog 2019-08-04 03:23:51 UTC (rev 248247)
+++ releases/WebKitGTK/webkit-2.24/LayoutTests/ChangeLog 2019-08-04 03:23:52 UTC (rev 248248)
@@ -1,3 +1,19 @@
+2019-07-08 Charlie Turner <[email protected]>
+
+ [GStreamer] media/video-volume.html broken after switching from cubic to linear scaling
+ https://bugs.webkit.org/show_bug.cgi?id=199505
+
+ Reviewed by Xabier Rodriguez-Calvar.
+
+ PulseAudio has a conversion process from volume's in
+ double-precision to uint32_t volumes. Depending on the environment
+ can introduce rounding errors. Be more lenient in our comparison
+ code.
+
+ * media/video-volume-expected.txt: Update baseline
+ * media/video-volume.html: Compare volume values within a
+ reasonable tolerance.
+
2019-07-01 Chris Dumez <[email protected]>
It should not be possible to trigger a load while in the middle of restoring a page in PageCache
Modified: releases/WebKitGTK/webkit-2.24/LayoutTests/media/video-volume-expected.txt (248247 => 248248)
--- releases/WebKitGTK/webkit-2.24/LayoutTests/media/video-volume-expected.txt 2019-08-04 03:23:51 UTC (rev 248247)
+++ releases/WebKitGTK/webkit-2.24/LayoutTests/media/video-volume-expected.txt 2019-08-04 03:23:52 UTC (rev 248248)
@@ -1,18 +1,18 @@
Test 'volume' attribute
-EXPECTED (video.volume == '1') OK
+EXPECTED (compareWithTolerance(video.volume, 1.0) == 'true') OK
RUN(video.volume = 0.5)
-EXPECTED (video.volume == '0.5') OK
+EXPECTED (compareWithTolerance(video.volume, 0.5) == 'true') OK
RUN(video.volume = 0)
-EXPECTED (video.volume == '0') OK
+EXPECTED (compareWithTolerance(video.volume, 0) == 'true') OK
TEST(video.volume = 1.5) THROWS(DOMException.INDEX_SIZE_ERR) OK
TEST(video.volume = -0.5) THROWS(DOMException.INDEX_SIZE_ERR) OK
RUN(video.load())
EVENT(canplaythrough)
-EXPECTED (video.volume == '0') OK
+EXPECTED (compareWithTolerance(video.volume, 0) == 'true') OK
RUN(video.volume = 0.5)
-EXPECTED (video.volume == '0.5') OK
+EXPECTED (compareWithTolerance(video.volume, 0.5) == 'true') OK
TEST(video.volume = 1.5) THROWS(DOMException.INDEX_SIZE_ERR) OK
TEST(video.volume = -0.5) THROWS(DOMException.INDEX_SIZE_ERR) OK
END OF TEST
Modified: releases/WebKitGTK/webkit-2.24/LayoutTests/media/video-volume.html (248247 => 248248)
--- releases/WebKitGTK/webkit-2.24/LayoutTests/media/video-volume.html 2019-08-04 03:23:51 UTC (rev 248247)
+++ releases/WebKitGTK/webkit-2.24/LayoutTests/media/video-volume.html 2019-08-04 03:23:52 UTC (rev 248248)
@@ -3,19 +3,23 @@
<script src=""
<script src=""
<script>
- testExpected("video.volume", 1.0);
+ function compareWithTolerance(a, b) {
+ tolerance = 0.00001;
+ return (Math.abs(a - b) < tolerance);
+ }
+ testExpected("compareWithTolerance(video.volume, 1.0)", true);
run("video.volume = 0.5");
- testExpected("video.volume", 0.5);
+ testExpected("compareWithTolerance(video.volume, 0.5)", true);
run("video.volume = 0");
- testExpected("video.volume", 0);
+ testExpected("compareWithTolerance(video.volume, 0)", true);
testDOMException("video.volume = 1.5", "DOMException.INDEX_SIZE_ERR");
testDOMException("video.volume = -0.5", "DOMException.INDEX_SIZE_ERR");
video.src = "" "content/test");
run("video.load()");
waitForEvent("canplaythrough", function () {
- testExpected("video.volume", 0);
+ testExpected("compareWithTolerance(video.volume, 0)", true);
run("video.volume = 0.5");
- testExpected("video.volume", 0.5);
+ testExpected("compareWithTolerance(video.volume, 0.5)", true);
testDOMException("video.volume = 1.5", "DOMException.INDEX_SIZE_ERR");
testDOMException("video.volume = -0.5", "DOMException.INDEX_SIZE_ERR");
endTest();
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes