WebKit Bugzilla
Attachment 357176 Details for
Bug 190323
: [Mojave Release Wk2] Layout Test http/tests/cache/disk-cache/disk-cache-validation-attachment.html is flaky
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-190323-20181212151805.patch (text/plain), 7.04 KB, created by
Chris Dumez
on 2018-12-12 15:18:06 PST
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Chris Dumez
Created:
2018-12-12 15:18:06 PST
Size:
7.04 KB
patch
obsolete
>Subversion Revision: 239128 >diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog >index 1b7bc97bb9273fd094e4f8cff9ab54b8ccc299db..5e64333977512ed678c8c1ac1e7de27b3dc88856 100644 >--- a/LayoutTests/ChangeLog >+++ b/LayoutTests/ChangeLog >@@ -1,3 +1,27 @@ >+2018-12-12 Chris Dumez <cdumez@apple.com> >+ >+ [Mojave Release Wk2] Layout Test http/tests/cache/disk-cache/disk-cache-validation-attachment.html is flaky >+ https://bugs.webkit.org/show_bug.cgi?id=190323 >+ <rdar://problem/45056253> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * http/tests/cache/disk-cache/disk-cache-validation-attachment-expected.txt: >+ * http/tests/cache/disk-cache/disk-cache-validation-attachment.html: >+ Simplify test a bit to only test the header combinations it cares about. >+ >+ * http/tests/cache/disk-cache/resources/cache-test.js: >+ (runTestsNow): >+ (runTests): >+ The flakiness was due to logic in CachedResourceLoader::determineRevalidationPolicy() which more aggressively >+ reuses cached resources (bypassing freshness checks) until the load event has fired. This means that the >+ test would give different results depending on whether or not the load event had a chance to fire before >+ we do the checks. To address the issue, update runTests() to wait for the load event if it has not yet >+ fired. This will likely address flakiness in other disk-cache tests as well. >+ >+ * platform/mac-wk2/TestExpectations: >+ Unskip test that is no longer flaky. >+ > 2018-12-12 Michael Catanzaro <mcatanzaro@igalia.com> > > Unreviewed manual rollout of r239100-r239102 and r239116 >diff --git a/LayoutTests/http/tests/cache/disk-cache/disk-cache-validation-attachment-expected.txt b/LayoutTests/http/tests/cache/disk-cache/disk-cache-validation-attachment-expected.txt >index 0801c772c3f7a6a6fb9cb7a43509624373f89c9c..89fb5f7e2e10ed2badf9ee3980b44013bf8ade25 100644 >--- a/LayoutTests/http/tests/cache/disk-cache/disk-cache-validation-attachment-expected.txt >+++ b/LayoutTests/http/tests/cache/disk-cache/disk-cache-validation-attachment-expected.txt >@@ -3,21 +3,9 @@ Tests that responses with 'content-disposition: attachment' are cacheable > On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". > > >-running 6 tests >+running 2 tests > > --------Testing loads from disk cache-------- >-response headers: undefined >-response source: Network >- >-response headers: {"Cache-control":"max-age=0"} >-response source: Network >- >-response headers: {"Cache-control":"max-age=100"} >-response source: Disk cache >- >-response headers: {"Content-Disposition":"attachment; filename=\"f.txt\""} >-response source: Network >- > response headers: {"Cache-control":"max-age=0","Content-Disposition":"attachment; filename=\"f.txt\""} > response source: Network > >@@ -25,18 +13,6 @@ response headers: {"Cache-control":"max-age=100","Content-Disposition":"attachme > response source: Disk cache > > --------Testing loads through memory cache (XHR behavior)-------- >-response headers: undefined >-response source: Network >- >-response headers: {"Cache-control":"max-age=0"} >-response source: Network >- >-response headers: {"Cache-control":"max-age=100"} >-response source: Memory cache >- >-response headers: {"Content-Disposition":"attachment; filename=\"f.txt\""} >-response source: Network >- > response headers: {"Cache-control":"max-age=0","Content-Disposition":"attachment; filename=\"f.txt\""} > response source: Network > >@@ -44,18 +20,6 @@ response headers: {"Cache-control":"max-age=100","Content-Disposition":"attachme > response source: Memory cache > > --------Testing loads through memory cache (subresource behavior)-------- >-response headers: undefined >-response source: Network >- >-response headers: {"Cache-control":"max-age=0"} >-response source: Network >- >-response headers: {"Cache-control":"max-age=100"} >-response source: Memory cache >- >-response headers: {"Content-Disposition":"attachment; filename=\"f.txt\""} >-response source: Network >- > response headers: {"Cache-control":"max-age=0","Content-Disposition":"attachment; filename=\"f.txt\""} > response source: Network > >diff --git a/LayoutTests/http/tests/cache/disk-cache/disk-cache-validation-attachment.html b/LayoutTests/http/tests/cache/disk-cache/disk-cache-validation-attachment.html >index e62d7af6af4ae4b4922442399182ee14a39ae4fa..11622f052a962a8383a2fcda5355d68c2892610d 100644 >--- a/LayoutTests/http/tests/cache/disk-cache/disk-cache-validation-attachment.html >+++ b/LayoutTests/http/tests/cache/disk-cache/disk-cache-validation-attachment.html >@@ -6,13 +6,8 @@ > var testMatrix = > [ > [ >- {}, >- { responseHeaders: {'Cache-control': 'max-age=0' } }, >- { responseHeaders: {'Cache-control': 'max-age=100' } }, >- ], >- [ >- {}, >- { responseHeaders: {'Content-Disposition': 'attachment; filename="f.txt"' } }, >+ { responseHeaders: {'Cache-control': 'max-age=0', 'Content-Disposition': 'attachment; filename="f.txt"' } }, >+ { responseHeaders: {'Cache-control': 'max-age=100', 'Content-Disposition': 'attachment; filename="f.txt"' } }, > ], > ]; > >diff --git a/LayoutTests/http/tests/cache/disk-cache/resources/cache-test.js b/LayoutTests/http/tests/cache/disk-cache/resources/cache-test.js >index 0794346ce64e27b0d521e6448eea9c755a211cdd..6bbd6a049b7c1d6fb58b56e8d1496029064c492b 100644 >--- a/LayoutTests/http/tests/cache/disk-cache/resources/cache-test.js >+++ b/LayoutTests/http/tests/cache/disk-cache/resources/cache-test.js >@@ -111,7 +111,7 @@ function printResults(tests) > } > } > >-function runTests(tests, completionHandler) >+function runTestsNow(tests, completionHandler) > { > loadResources(tests, function () { > // Wait a bit so things settle down in the disk cache. >@@ -136,6 +136,20 @@ function runTests(tests, completionHandler) > }); > } > >+function runTests(tests, completionHandler) >+{ >+ if (document.readyState == 'complete') { >+ runTestsNow(tests, completionHandler); >+ return; >+ } >+ >+ // We need to wait for the load event to have fired because CachedResourceLoader::determineRevalidationPolicy() >+ // agressively reuses resources until the load event has fired. >+ addEventListener("load", () => { >+ runTestsNow(tests, completionHandler); >+ }); >+} >+ > function mergeFields(field, componentField) > { > for (var name in componentField) { >diff --git a/LayoutTests/platform/mac-wk2/TestExpectations b/LayoutTests/platform/mac-wk2/TestExpectations >index 5811214995c567fd0d4b4365b4260f7b6869505c..caaa4c15daac91f3659a35a6240645cae2a0521d 100644 >--- a/LayoutTests/platform/mac-wk2/TestExpectations >+++ b/LayoutTests/platform/mac-wk2/TestExpectations >@@ -896,8 +896,6 @@ webkit.org/b/189094 [ HighSierra+ ] accessibility/mac/focus-setting-selection-sy > > webkit.org/b/189598 compositing/backing/backing-store-attachment-fill-forwards-animation.html [ Pass Failure ] > >-webkit.org/b/190323 http/tests/cache/disk-cache/disk-cache-validation-attachment.html [ Pass Failure ] >- > # Skip local authenticator tests for mac now. > http/wpt/webauthn/public-key-credential-create-failure-local.https.html [ Skip ] > http/wpt/webauthn/public-key-credential-create-success-local.https.html [ Skip ]
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 190323
: 357176