WebKit Bugzilla
Attachment 347301 Details for
Bug 188470
: REGRESSION (234743) Timeouts in TestWebKitAPI.PreferredAudioBufferSize.AudioWithWebAudio and TestWebKitAPI.PreferredAudioBufferSize.WebAudio
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-188470-20180816135335.patch (text/plain), 4.17 KB, created by
Jer Noble
on 2018-08-16 13:53:36 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Jer Noble
Created:
2018-08-16 13:53:36 PDT
Size:
4.17 KB
patch
obsolete
>Subversion Revision: 234941 >diff --git a/Tools/ChangeLog b/Tools/ChangeLog >index 820bb1937f6a36474f4acde4c8bedf87e029e6f2..2adec439b55dca43688803fd7a001359e2be3885 100644 >--- a/Tools/ChangeLog >+++ b/Tools/ChangeLog >@@ -1,3 +1,19 @@ >+2018-08-16 Jer Noble <jer.noble@apple.com> >+ >+ REGRESSION (234743) Timeouts in TestWebKitAPI.PreferredAudioBufferSize.AudioWithWebAudio and TestWebKitAPI.PreferredAudioBufferSize.WebAudio >+ https://bugs.webkit.org/show_bug.cgi?id=188470 >+ <rdar://problem/43144969> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ On a loaded server, the WebContent process may send the "playing" message before the >+ UIProcess has a chance to register a listener for that message. Restructure the tests >+ so that the listener is registered before the page is loaded. >+ >+ * TestWebKitAPI/Tests/WebKitCocoa/PreferredAudioBufferSize.mm: >+ (PreferredAudioBufferSize::runPlayingTestWithPageNamed): >+ (TEST_F): >+ > 2018-08-16 Jer Noble <jer.noble@apple.com> > > Add option to run-api-tests to force running of DISABLED tests. >diff --git a/Tools/TestWebKitAPI/Tests/WebKitCocoa/PreferredAudioBufferSize.mm b/Tools/TestWebKitAPI/Tests/WebKitCocoa/PreferredAudioBufferSize.mm >index fcda36ac25f3b4e27756e51bd0f83fc1eb18e9e1..f2b07d3834250f8c0093d04651577eb8983469ec 100644 >--- a/Tools/TestWebKitAPI/Tests/WebKitCocoa/PreferredAudioBufferSize.mm >+++ b/Tools/TestWebKitAPI/Tests/WebKitCocoa/PreferredAudioBufferSize.mm >@@ -57,8 +57,19 @@ public: > return [webView stringByEvaluatingJavaScript:@"window.internals.preferredAudioBufferSize()"].doubleValue; > } > >+ void runPlayingTestWithPageNamed(NSString* name, double expectedAudioBufferSize) >+ { >+ createView(); >+ __block bool isPlaying = false; >+ [webView performAfterReceivingMessage:@"playing" action:^() { isPlaying = true; }]; >+ [webView synchronouslyLoadTestPageNamed:name]; >+ TestWebKitAPI::Util::run(&isPlaying); >+ EXPECT_EQ(expectedAudioBufferSize, preferredAudioBufferSize()); >+ } >+ > RetainPtr<WKWebViewConfiguration> configuration; > RetainPtr<TestWKWebView> webView; >+ bool isPlaying { false }; > }; > > TEST_F(PreferredAudioBufferSize, Empty) >@@ -70,50 +81,32 @@ TEST_F(PreferredAudioBufferSize, Empty) > > TEST_F(PreferredAudioBufferSize, AudioElement) > { >- createView(); >- [webView synchronouslyLoadTestPageNamed:@"audio-only"]; >- [webView waitForMessage:@"playing"]; >- EXPECT_EQ(4096, preferredAudioBufferSize()); >+ runPlayingTestWithPageNamed(@"audio-only", 4096); > } > >-TEST_F(PreferredAudioBufferSize, DISABLED_WebAudio) >+TEST_F(PreferredAudioBufferSize, WebAudio) > { >- createView(); >- [webView synchronouslyLoadTestPageNamed:@"web-audio-only"]; >- [webView waitForMessage:@"playing"]; >- EXPECT_EQ(128, preferredAudioBufferSize()); >+ runPlayingTestWithPageNamed(@"web-audio-only", 128); > } > > TEST_F(PreferredAudioBufferSize, VideoOnly) > { >- createView(); >- [webView synchronouslyLoadTestPageNamed:@"video-without-audio"]; >- [webView waitForMessage:@"playing"]; >- EXPECT_EQ(512, preferredAudioBufferSize()); >+ runPlayingTestWithPageNamed(@"video-without-audio", 512); > } > > TEST_F(PreferredAudioBufferSize, VideoWithAudio) > { >- createView(); >- [webView synchronouslyLoadTestPageNamed:@"video-with-audio"]; >- [webView waitForMessage:@"playing"]; >- EXPECT_EQ(4096, preferredAudioBufferSize()); >+ runPlayingTestWithPageNamed(@"video-with-audio", 4096); > } > >-TEST_F(PreferredAudioBufferSize, DISABLED_AudioWithWebAudio) >+TEST_F(PreferredAudioBufferSize, AudioWithWebAudio) > { >- createView(); >- [webView synchronouslyLoadTestPageNamed:@"audio-with-web-audio"]; >- [webView waitForMessage:@"playing"]; >- EXPECT_EQ(128, preferredAudioBufferSize()); >+ runPlayingTestWithPageNamed(@"audio-with-web-audio", 128); > } > > TEST_F(PreferredAudioBufferSize, VideoWithAudioAndWebAudio) > { >- createView(); >- [webView synchronouslyLoadTestPageNamed:@"video-with-audio-and-web-audio"]; >- [webView waitForMessage:@"playing"]; >- EXPECT_EQ(128, preferredAudioBufferSize()); >+ runPlayingTestWithPageNamed(@"video-with-audio-and-web-audio", 128); > } > > #endif // WK_HAVE_C_SPI && WK_API_ENABLED
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 188470
: 347301