Changeset 267018 in webkit
- Timestamp:
- Sep 14, 2020 10:00:56 AM (4 years ago)
- Location:
- trunk
- Files:
-
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r267015 r267018 1 2020-09-14 Chris Dumez <cdumez@apple.com> 2 3 Some WebAudio tests give different output on different machines 4 https://bugs.webkit.org/show_bug.cgi?id=216371 5 <rdar://problem/68653909> 6 7 Reviewed by Alex Christensen. 8 9 * TestExpectations: 10 Unskip test that should now have consistent results across machines. 11 12 * resources/testharnessreport.js: 13 Hardcode default sample rate for AudioContext to 44100 for WPT tests instead 14 of using the hardware sample rate. 15 1 16 2020-09-14 Hector Lopez <hector_i_lopez@apple.com> 2 17 -
trunk/LayoutTests/TestExpectations
r266984 r267018 322 322 323 323 # Test prints out sample rate, which appears to be hardware-specific. 324 imported/w3c/web-platform-tests/webaudio/the-audio-api/the-audiocontext-interface/audiocontextoptions.html [ Pass Failure ]325 324 imported/w3c/web-platform-tests/webaudio/the-audio-api/the-mediaelementaudiosourcenode-interface/mediaElementAudioSourceToScriptProcessorTest.html [ Pass Failure ] 326 325 imported/w3c/web-platform-tests/webaudio/the-audio-api/the-biquadfilternode-interface/biquad-getFrequencyResponse.html [ Pass Failure ] -
trunk/LayoutTests/imported/w3c/ChangeLog
r266984 r267018 1 2020-09-14 Chris Dumez <cdumez@apple.com> 2 3 Some WebAudio tests give different output on different machines 4 https://bugs.webkit.org/show_bug.cgi?id=216371 5 <rdar://problem/68653909> 6 7 Reviewed by Alex Christensen. 8 9 Rebaseline existing tests. 10 11 * web-platform-tests/webaudio/the-audio-api/the-audiocontext-interface/audiocontextoptions-expected.txt: 12 * web-platform-tests/webaudio/the-audio-api/the-biquadfilternode-interface/biquad-getFrequencyResponse-expected.txt: 13 * web-platform-tests/webaudio/the-audio-api/the-convolvernode-interface/realtime-conv-expected.txt: 14 1 15 2020-09-12 Darin Adler <darin@apple.com> 2 16 -
trunk/LayoutTests/imported/w3c/web-platform-tests/webaudio/the-audio-api/the-audiocontext-interface/audiocontextoptions-expected.txt
r266895 r267018 7 7 PASS > [test-audiocontextoptions-latencyHint-basic] Test creating contexts with basic latencyHint types. 8 8 PASS context = new AudioContext() did not throw an exception. 9 PASS context.sampleRate (4 8000 Hz) is greater than 0.9 PASS context.sampleRate (44100 Hz) is greater than 0. 10 10 PASS default baseLatency is greater than or equal to 0. 11 11 PASS context = new AudioContext({'latencyHint': 'interactive'}) did not throw an exception. 12 PASS interactive baseLatency is equal to 0.002 6666666666666666.12 PASS interactive baseLatency is equal to 0.0029024943310657597. 13 13 PASS context = new AudioContext({'latencyHint': 'balanced'}) did not throw an exception. 14 PASS balanced baseLatency is greater than or equal to 0.002 6666666666666666.14 PASS balanced baseLatency is greater than or equal to 0.0029024943310657597. 15 15 PASS context = new AudioContext({'latencyHint': 'playback'}) did not throw an exception. 16 PASS playback baseLatency is greater than or equal to 0.002 6666666666666666.16 PASS playback baseLatency is greater than or equal to 0.0029024943310657597. 17 17 PASS < [test-audiocontextoptions-latencyHint-basic] All assertions passed. (total 9 assertions) 18 18 PASS > [test-audiocontextoptions-latencyHint-double] Test creating contexts with explicit latencyHint values. 19 19 PASS context = new AudioContext({'latencyHint': interactiveLatency/2}) did not throw an exception. 20 PASS double-constructor baseLatency small is less than or equal to 0.002 6666666666666666.20 PASS double-constructor baseLatency small is less than or equal to 0.0029024943310657597. 21 21 PASS context = new AudioContext({'latencyHint': validLatency}) did not throw an exception. 22 PASS double-constructor baseLatency inrange 1 is greater than or equal to 0.002 6666666666666666.23 PASS double-constructor baseLatency inrange 2 is less than or equal to 0.002 6666666666666666.22 PASS double-constructor baseLatency inrange 1 is greater than or equal to 0.0029024943310657597. 23 PASS double-constructor baseLatency inrange 2 is less than or equal to 0.0029024943310657597. 24 24 PASS creating two high latency contexts did not throw an exception. 25 PASS high latency context baseLatency is equal to 0.002 6666666666666666.26 PASS high latency context baseLatency is greater than or equal to 0.002 6666666666666666.25 PASS high latency context baseLatency is equal to 0.0029024943310657597. 26 PASS high latency context baseLatency is greater than or equal to 0.0029024943310657597. 27 27 PASS context = new AudioContext({'latencyHint': 'foo'}) threw TypeError: "Type error". 28 28 PASS context = new AudioContext('latencyHint') threw TypeError: "Type error". -
trunk/LayoutTests/imported/w3c/web-platform-tests/webaudio/the-audio-api/the-biquadfilternode-interface/biquad-getFrequencyResponse-expected.txt
r266895 r267018 17 17 PASS lowpass: Number of non-finite values in expected phase response is equal to 0. 18 18 PASS lowpass: Actual and expected results contained only finite values is true. 19 PASS lowpass: Max error (-7 3.01781972755178 dB) of magnitude response at frequency 23952Hz is less than or equal to -73.01779999999998.20 PASS lowpass: Max error (0.00000 8043596428984033 deg) in phase response at frequency 1992Hz is less than or equal to 0.000460864332091429.19 PASS lowpass: Max error (-74.12964393692768 dB) of magnitude response at frequency 22027.94921875 Hz is less than or equal to -73.01779999999998. 20 PASS lowpass: Max error (0.00000925724159344549 deg) in phase response at frequency 1477.3499755859375 Hz is less than or equal to 0.000460864332091429. 21 21 PASS < [lowpass] All assertions passed. (total 7 assertions) 22 22 PASS > [highpass] Frequency response … … 26 26 PASS highpass: Number of non-finite values in expected phase response is equal to 0. 27 27 PASS highpass: Actual and expected results contained only finite values is true. 28 PASS highpass: Max error (-1 17.54613270502502 dB) of magnitude response at frequency 408Hz is less than or equal to -117.5461.29 PASS highpass: Max error (0.000006 969012786694054 deg) in phase response at frequency 912Hz is less than or equal to 0.00039930001700462205.28 PASS highpass: Max error (-121.35728191866156 dB) of magnitude response at frequency 418.95001220703125 Hz is less than or equal to -117.5461. 29 PASS highpass: Max error (0.000006632961778326638 deg) in phase response at frequency 132.3000030517578 Hz is less than or equal to 0.00039930001700462205. 30 30 PASS < [highpass] All assertions passed. (total 7 assertions) 31 31 PASS > [bandpass] Frequency response … … 35 35 PASS bandpass: Number of non-finite values in expected phase response is equal to 0. 36 36 PASS bandpass: Actual and expected results contained only finite values is true. 37 PASS bandpass: Max error (- 79.01394922508145 dB) of magnitude response at frequency 23952Hz is less than or equal to -79.01389999999999.38 PASS bandpass: Max error (0.000004 937042988127661 deg) in phase response at frequency 816Hz is less than or equal to 0.0002828749930340387.37 PASS bandpass: Max error (-80.14384658243245 dB) of magnitude response at frequency 22027.94921875 Hz is less than or equal to -79.01389999999999. 38 PASS bandpass: Max error (0.000004663540170181627 deg) in phase response at frequency 1455.300048828125 Hz is less than or equal to 0.0002828749930340387. 39 39 PASS < [bandpass] All assertions passed. (total 7 assertions) 40 40 PASS > [lowshelf] Frequency response … … 44 44 PASS lowshelf: Number of non-finite values in expected phase response is equal to 0. 45 45 PASS lowshelf: Actual and expected results contained only finite values is true. 46 PASS lowshelf: Max error (-125. 72006443816068 dB) of magnitude response at frequency 9048Hz is less than or equal to -120.4038.47 PASS lowshelf: Max error (0.000001 0998019550260546 deg) in phase response at frequency 1176Hz is less than or equal to 0.00023333133248907645.46 PASS lowshelf: Max error (-125.26371834201264 dB) of magnitude response at frequency 1653.75 Hz is less than or equal to -120.4038. 47 PASS lowshelf: Max error (0.0000013776021539855112 deg) in phase response at frequency 749.7000122070312 Hz is less than or equal to 0.00023333133248907645. 48 48 PASS < [lowshelf] All assertions passed. (total 7 assertions) 49 49 PASS > [highshelf] Frequency response … … 53 53 PASS highshelf: Number of non-finite values in expected phase response is equal to 0. 54 54 PASS highshelf: Actual and expected results contained only finite values is true. 55 PASS highshelf: Max error (-125. 38513197921183 dB) of magnitude response at frequency 864Hz is less than or equal to -119.99999999999999.56 PASS highshelf: Max error (0.000001 099801293470681 deg) in phase response at frequency 1176Hz is less than or equal to 0.00023333133248907645.55 PASS highshelf: Max error (-125.22346912810059 dB) of magnitude response at frequency 992.25 Hz is less than or equal to -119.99999999999999. 56 PASS highshelf: Max error (0.0000013776027010409165 deg) in phase response at frequency 749.7000122070312 Hz is less than or equal to 0.00023333133248907645. 57 57 PASS < [highshelf] All assertions passed. (total 7 assertions) 58 58 PASS > [peaking] Frequency response … … 62 62 PASS peaking: Number of non-finite values in expected phase response is equal to 0. 63 63 PASS peaking: Actual and expected results contained only finite values is true. 64 PASS peaking: Max error (-12 4.9664097542858 dB) of magnitude response at frequency 1992Hz is less than or equal to -119.11759999999998.65 PASS peaking: Max error (0.000002 2600132665057376 deg) in phase response at frequency 1080Hz is less than or equal to 0.0000037084120332047404.64 PASS peaking: Max error (-125.41901251646009 dB) of magnitude response at frequency 1411.199951171875 Hz is less than or equal to -119.11759999999998. 65 PASS peaking: Max error (0.000002668179955442939 deg) in phase response at frequency 992.25 Hz is less than or equal to 0.0000037084120332047404. 66 66 PASS < [peaking] All assertions passed. (total 7 assertions) 67 67 PASS > [notch] Frequency response … … 71 71 PASS notch: Number of non-finite values in expected phase response is equal to 0. 72 72 PASS notch: Actual and expected results contained only finite values is true. 73 PASS notch: Max error (- 96.65213672776751 dB) of magnitude response at frequency 1008Hz is less than or equal to -87.08079999999998.74 PASS notch: Max error (0.00000 66299355314361 deg) in phase response at frequency 1080Hz is less than or equal to 0.0003798710181717358.73 PASS notch: Max error (-87.0808201946387 dB) of magnitude response at frequency 992.25 Hz is less than or equal to -87.08079999999998. 74 PASS notch: Max error (0.000007963823283129813 deg) in phase response at frequency 992.25 Hz is less than or equal to 0.0003798710181717358. 75 75 PASS < [notch] All assertions passed. (total 7 assertions) 76 76 PASS > [allpass] Frequency response … … 80 80 PASS allpass: Number of non-finite values in expected phase response is equal to 0. 81 81 PASS allpass: Actual and expected results contained only finite values is true. 82 PASS allpass: Max error (-26 6.8735521058153 dB) of magnitude response at frequency 1056Hz is less than or equal to -265.35169999999994.83 PASS allpass: Max error (0.00001 3259871597205388 deg) in phase response at frequency 1080Hz is less than or equal to 0.0007597420363434716.82 PASS allpass: Max error (-265.35174872440564 dB) of magnitude response at frequency 1146.5999755859375 Hz is less than or equal to -265.35169999999994. 83 PASS allpass: Max error (0.000015927642291594136 deg) in phase response at frequency 992.25 Hz is less than or equal to 0.0007597420363434716. 84 84 PASS < [allpass] All assertions passed. (total 7 assertions) 85 85 PASS > [getFrequencyResponse] Test out-of-bounds frequency values -
trunk/LayoutTests/imported/w3c/web-platform-tests/webaudio/the-audio-api/the-convolvernode-interface/realtime-conv-expected.txt
r266892 r267018 4 4 PASS Audit report 5 5 PASS > [test] Test convolver with real-time context 6 FAIL X SNR is not greater than or equal to 88.457. Got 76. 82504506274849. assert_true: expected true got false6 FAIL X SNR is not greater than or equal to 88.457. Got 76.95278846153181. assert_true: expected true got false 7 7 FAIL < [test] 1 out of 1 assertions were failed. assert_true: expected true got false 8 8 FAIL # AUDIT TASK RUNNER FINISHED: 1 out of 1 tasks were failed. assert_true: expected true got false -
trunk/LayoutTests/resources/testharnessreport.js
r266446 r267018 23 23 setTimeout(timeout, testRunner.timeout * 0.9); 24 24 25 // Make WebAudio map to webkitWebAudio for WPT tests26 25 if (location.port == 8800 || location.port == 9443) { 26 // Make WebAudio map to webkitWebAudio for WPT tests 27 27 if (window.webkitAudioContext && !window.AudioContext) 28 28 Object.defineProperty(self, "AudioContext", Object.getOwnPropertyDescriptor(self, "webkitAudioContext")); … … 31 31 if (window.webkitAudioPannerNode && !window.PannerNode) 32 32 Object.defineProperty(self, "PannerNode", Object.getOwnPropertyDescriptor(self, "webkitAudioPannerNode")); 33 if (self.internals) 33 if (self.internals) { 34 // Use 44100 sample rate by default instead of the hardware sample rate so that we get consistent results across machines. 35 internals.settings.setDefaultAudioContextSampleRate(44100); 36 34 37 internals.settings.setLazyIframeLoadingEnabled(location.pathname.indexOf('iframe-loading-lazy') !== -1); 38 } 35 39 } 36 40 -
trunk/Source/WebCore/ChangeLog
r267016 r267018 1 2020-09-14 Chris Dumez <cdumez@apple.com> 2 3 Some WebAudio tests give different output on different machines 4 https://bugs.webkit.org/show_bug.cgi?id=216371 5 <rdar://problem/68653909> 6 7 Reviewed by Alex Christensen. 8 9 Hardcode default sample rate for AudioContext to 44100 for WPT tests instead 10 of using the hardware sample rate. This allows some tests to output consistent 11 results on different machines. 12 13 No new tests, unskipped existing test. 14 15 * Modules/webaudio/AudioContext.cpp: 16 (WebCore::defaultSampleRateForTesting): 17 (WebCore::AudioContext::setDefaultSampleRateForTesting): 18 (WebCore::AudioContext::create): 19 * Modules/webaudio/AudioContext.h: 20 (WebCore::AudioContext::create): 21 * testing/InternalSettings.cpp: 22 (WebCore::InternalSettings::Backup::restoreTo): 23 (WebCore::InternalSettings::setDefaultAudioContextSampleRate): 24 * testing/InternalSettings.h: 25 * testing/InternalSettings.idl: 26 1 27 2020-09-14 Said Abou-Hallawa <sabouhallawa@apple.com> 2 28 -
trunk/Source/WebCore/Modules/webaudio/AudioContext.cpp
r265797 r267018 59 59 WTF_MAKE_ISO_ALLOCATED_IMPL(AudioContext); 60 60 61 ExceptionOr<Ref<AudioContext>> AudioContext::create(Document& document, const AudioContextOptions& contextOptions) 61 static Optional<float>& defaultSampleRateForTesting() 62 { 63 static Optional<float> sampleRate; 64 return sampleRate; 65 } 66 67 void AudioContext::setDefaultSampleRateForTesting(Optional<float> sampleRate) 68 { 69 defaultSampleRateForTesting() = sampleRate; 70 } 71 72 ExceptionOr<Ref<AudioContext>> AudioContext::create(Document& document, AudioContextOptions&& contextOptions) 62 73 { 63 74 ASSERT(isMainThread()); … … 71 82 72 83 // FIXME: Figure out where latencyHint should go. 84 85 if (!contextOptions.sampleRate && defaultSampleRateForTesting()) 86 contextOptions.sampleRate = *defaultSampleRateForTesting(); 73 87 74 88 if (contextOptions.sampleRate.hasValue() && !isSupportedSampleRate(contextOptions.sampleRate.value())) -
trunk/Source/WebCore/Modules/webaudio/AudioContext.h
r265797 r267018 40 40 public: 41 41 // Create an AudioContext for rendering to the audio hardware. 42 static ExceptionOr<Ref<AudioContext>> create(Document&, const AudioContextOptions& = { }); 42 static ExceptionOr<Ref<AudioContext>> create(Document&, AudioContextOptions&& = { }); 43 WEBCORE_EXPORT static void setDefaultSampleRateForTesting(Optional<float>); 43 44 44 45 void close(DOMPromiseDeferred<void>&&); -
trunk/Source/WebCore/testing/InternalSettings.cpp
r266360 r267018 52 52 #endif 53 53 54 #if ENABLE(WEB_AUDIO) 55 #include "AudioContext.h" 56 #endif 57 54 58 namespace WebCore { 55 59 … … 172 176 settings.setShouldDisplayCaptions(m_shouldDisplayCaptions); 173 177 settings.setShouldDisplayTextDescriptions(m_shouldDisplayTextDescriptions); 178 #endif 179 #if ENABLE(WEB_AUDIO) 180 AudioContext::setDefaultSampleRateForTesting(WTF::nullopt); 174 181 #endif 175 182 settings.setDefaultVideoPosterURL(m_defaultVideoPosterURL); … … 488 495 } 489 496 497 void InternalSettings::setDefaultAudioContextSampleRate(float sampleRate) 498 { 499 #if ENABLE(WEB_AUDIO) 500 AudioContext::setDefaultSampleRateForTesting(sampleRate); 501 #else 502 UNUSED_PARAM(sampleRate); 503 #endif 504 } 505 490 506 ExceptionOr<void> InternalSettings::setEditingBehavior(const String& editingBehavior) 491 507 { -
trunk/Source/WebCore/testing/InternalSettings.h
r266360 r267018 68 68 ExceptionOr<void> setAllowsAirPlayForMediaPlayback(bool); 69 69 ExceptionOr<void> setMediaCaptureRequiresSecureConnection(bool); 70 void setDefaultAudioContextSampleRate(float); 70 71 71 72 ExceptionOr<void> setEditingBehavior(const String&); -
trunk/Source/WebCore/testing/InternalSettings.idl
r266662 r267018 61 61 undefined setAllowsAirPlayForMediaPlayback(boolean available); 62 62 [Conditional=MEDIA_STREAM, MayThrowException] undefined setMediaCaptureRequiresSecureConnection(boolean enable); 63 undefined setDefaultAudioContextSampleRate(float sampleRate); 63 64 64 65 [MayThrowException] undefined setForcePendingWebGLPolicy(boolean forced);
Note: See TracChangeset
for help on using the changeset viewer.