Changeset 247207 in webkit
- Timestamp:
- Jul 8, 2019 4:47:13 AM (5 years ago)
- Location:
- trunk/LayoutTests
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r247205 r247207 1 2019-07-08 Charlie Turner <cturner@igalia.com> 2 3 [GStreamer] media/video-volume.html broken after switching from cubic to linear scaling 4 https://bugs.webkit.org/show_bug.cgi?id=199505 5 6 Reviewed by Xabier Rodriguez-Calvar. 7 8 PulseAudio has a conversion process from volume's in 9 double-precision to uint32_t volumes. Depending on the environment 10 can introduce rounding errors. Be more lenient in our comparison 11 code. 12 13 * media/video-volume-expected.txt: Update baseline 14 * media/video-volume.html: Compare volume values within a 15 reasonable tolerance. 16 1 17 2019-07-08 Antoine Quint <graouts@apple.com> 2 18 -
trunk/LayoutTests/media/video-volume-expected.txt
r158743 r247207 2 2 Test 'volume' attribute 3 3 4 EXPECTED ( video.volume == '1') OK4 EXPECTED (compareWithTolerance(video.volume, 1.0) == 'true') OK 5 5 RUN(video.volume = 0.5) 6 EXPECTED ( video.volume == '0.5') OK6 EXPECTED (compareWithTolerance(video.volume, 0.5) == 'true') OK 7 7 RUN(video.volume = 0) 8 EXPECTED ( video.volume == '0') OK8 EXPECTED (compareWithTolerance(video.volume, 0) == 'true') OK 9 9 TEST(video.volume = 1.5) THROWS(DOMException.INDEX_SIZE_ERR) OK 10 10 TEST(video.volume = -0.5) THROWS(DOMException.INDEX_SIZE_ERR) OK 11 11 RUN(video.load()) 12 12 EVENT(canplaythrough) 13 EXPECTED ( video.volume == '0') OK13 EXPECTED (compareWithTolerance(video.volume, 0) == 'true') OK 14 14 RUN(video.volume = 0.5) 15 EXPECTED ( video.volume == '0.5') OK15 EXPECTED (compareWithTolerance(video.volume, 0.5) == 'true') OK 16 16 TEST(video.volume = 1.5) THROWS(DOMException.INDEX_SIZE_ERR) OK 17 17 TEST(video.volume = -0.5) THROWS(DOMException.INDEX_SIZE_ERR) OK -
trunk/LayoutTests/media/video-volume.html
r147969 r247207 4 4 <script src=video-test.js></script> 5 5 <script> 6 testExpected("video.volume", 1.0); 6 function compareWithTolerance(a, b) { 7 tolerance = 0.00001; 8 return (Math.abs(a - b) < tolerance); 9 } 10 testExpected("compareWithTolerance(video.volume, 1.0)", true); 7 11 run("video.volume = 0.5"); 8 testExpected(" video.volume", 0.5);12 testExpected("compareWithTolerance(video.volume, 0.5)", true); 9 13 run("video.volume = 0"); 10 testExpected(" video.volume", 0);14 testExpected("compareWithTolerance(video.volume, 0)", true); 11 15 testDOMException("video.volume = 1.5", "DOMException.INDEX_SIZE_ERR"); 12 16 testDOMException("video.volume = -0.5", "DOMException.INDEX_SIZE_ERR"); … … 14 18 run("video.load()"); 15 19 waitForEvent("canplaythrough", function () { 16 testExpected(" video.volume", 0);20 testExpected("compareWithTolerance(video.volume, 0)", true); 17 21 run("video.volume = 0.5"); 18 testExpected(" video.volume", 0.5);22 testExpected("compareWithTolerance(video.volume, 0.5)", true); 19 23 testDOMException("video.volume = 1.5", "DOMException.INDEX_SIZE_ERR"); 20 24 testDOMException("video.volume = -0.5", "DOMException.INDEX_SIZE_ERR");
Note: See TracChangeset
for help on using the changeset viewer.