WebKit Bugzilla
Attachment 371087 Details for
Bug 198423
: [ Mac WK2 ] TestWebKitAPI.WKWebView.LocalStorageProcessCrashes is a flaky timeout when run locally.
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-198423-20190531144816.patch (text/plain), 3.63 KB, created by
Sihui Liu
on 2019-05-31 14:48:17 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Sihui Liu
Created:
2019-05-31 14:48:17 PDT
Size:
3.63 KB
patch
obsolete
>Subversion Revision: 245980 >diff --git a/Tools/ChangeLog b/Tools/ChangeLog >index b05602f561658f87696d45a812989aa2e09e5490..b77c61d31ee71f063aa698d0d1343e81916424c5 100644 >--- a/Tools/ChangeLog >+++ b/Tools/ChangeLog >@@ -1,3 +1,18 @@ >+2019-05-31 Sihui Liu <sihui_liu@apple.com> >+ >+ [ Mac WK2 ] TestWebKitAPI.WKWebView.LocalStorageProcessCrashes is a flaky timeout when run locally. >+ https://bugs.webkit.org/show_bug.cgi?id=198423 >+ <rdar://problem/51305247> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ The test expected the last message sent after network process was resumed, but check for local storage item in >+ local-storage-process-suspends-2.html may finish earlier and send the message earlier. >+ >+ * TestWebKitAPI/Tests/WebKitCocoa/LocalStoragePersistence.mm: >+ (TEST): >+ * TestWebKitAPI/Tests/WebKitCocoa/local-storage-process-suspends-2.html: >+ > 2019-05-31 Tim Horton <timothy_horton@apple.com> > > Optionally respect device management restrictions when loading from the network >diff --git a/Tools/TestWebKitAPI/Tests/WebKitCocoa/LocalStoragePersistence.mm b/Tools/TestWebKitAPI/Tests/WebKitCocoa/LocalStoragePersistence.mm >index 1bc78d71949ba9724116bcfd726eca35b66a3ae2..3db173f882b2a9cd3294b316909176c31bb04cc5 100644 >--- a/Tools/TestWebKitAPI/Tests/WebKitCocoa/LocalStoragePersistence.mm >+++ b/Tools/TestWebKitAPI/Tests/WebKitCocoa/LocalStoragePersistence.mm >@@ -111,6 +111,7 @@ TEST(WKWebView, LocalStorageProcessSuspends) > [[configuration userContentController] addScriptMessageHandler:handler.get() name:@"testHandler"]; > RetainPtr<WKProcessPool> processPool = adoptNS([[WKProcessPool alloc] init]); > [configuration setProcessPool:processPool.get()]; >+ [configuration _setAllowUniversalAccessFromFileURLs:YES]; > > RetainPtr<WKWebView> webView1 = adoptNS([[WKWebView alloc] initWithFrame:NSMakeRect(0, 0, 800, 600) configuration:configuration.get()]); > NSURLRequest *request = [NSURLRequest requestWithURL:[[NSBundle mainBundle] URLForResource:@"local-storage-process-suspends-1" withExtension:@"html" subdirectory:@"TestWebKitAPI.resources"]]; >@@ -138,7 +139,7 @@ TEST(WKWebView, LocalStorageProcessSuspends) > > readyToContinue = false; > [webView2 evaluateJavaScript:@"window.localStorage.getItem('key')" completionHandler:^(id result, NSError *) { >- EXPECT_TRUE([@"value" isEqualToString:result]); >+ EXPECT_WK_STREQ(@"value", result); > readyToContinue = true; > }]; > TestWebKitAPI::Util::run(&readyToContinue); >diff --git a/Tools/TestWebKitAPI/Tests/WebKitCocoa/local-storage-process-suspends-2.html b/Tools/TestWebKitAPI/Tests/WebKitCocoa/local-storage-process-suspends-2.html >index d3a2764d6e34f9fa45e2dd169e69a40cf55189cb..6ba25d103dbe71180a59c624598fb931bad11d56 100644 >--- a/Tools/TestWebKitAPI/Tests/WebKitCocoa/local-storage-process-suspends-2.html >+++ b/Tools/TestWebKitAPI/Tests/WebKitCocoa/local-storage-process-suspends-2.html >@@ -1,17 +1,11 @@ > <!DOCTYPE html> > <script> > >-var startValue = window.localStorage.getItem('key'); >-window.webkit.messageHandlers.testHandler.postMessage(startValue); >+function checkLocalStorage(event) { >+ window.webkit.messageHandlers.testHandler.postMessage(window.localStorage.getItem('key')); >+} > >-var tries = 10; >-var intervalID = setInterval(()=> { >- var newValue = window.localStorage.getItem('key'); >- if (newValue != startValue || tries == 0) { >- window.webkit.messageHandlers.testHandler.postMessage(newValue); >- clearInterval(intervalID); >- } >- --tries; >-}, 100); >+checkLocalStorage(); >+window.addEventListener("storage", checkLocalStorage); > >-</script> >\ No newline at end of file >+</script>
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
Flags:
rniwa
:
review+
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 198423
:
371087
|
371108