WebKit Bugzilla
Attachment 372161 Details for
Bug 198185
: [iOS] Layout Test http/tests/resourceLoadStatistics/website-data-removal-for-site-navigated-to-with-link-decoration.html is frequently failing or timing out
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch for landing
bug-198185-20190614182924.patch (text/plain), 7.56 KB, created by
John Wilander
on 2019-06-14 18:29:25 PDT
(
hide
)
Description:
Patch for landing
Filename:
MIME Type:
Creator:
John Wilander
Created:
2019-06-14 18:29:25 PDT
Size:
7.56 KB
patch
obsolete
>Subversion Revision: 246451 >diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog >index a50c79d47504e98fc5dfe8fbd6767d6239c77cae..a30dbb6b43d1e5b881da7b5f3f107deaaa4ec7ca 100644 >--- a/LayoutTests/ChangeLog >+++ b/LayoutTests/ChangeLog >@@ -1,3 +1,18 @@ >+2019-06-14 John Wilander <wilander@apple.com> >+ >+ Repeatedly check for IDB removal to address flakiness in http/tests/resourceLoadStatistics/website-data-removal-for-site-navigated-to-with-link-decoration.html >+ https://bugs.webkit.org/show_bug.cgi?id=198185 >+ <rdar://problem/51074251> >+ >+ Unreviewed test gardening. >+ >+ There's an asynchronosity in the removal of IDB entries so this test case >+ needs to check repeatedly until the removal has happened. >+ >+ * http/tests/resourceLoadStatistics/website-data-removal-for-site-navigated-to-with-link-decoration.html: >+ * platform/ios-simulator-wk2/TestExpectations: >+ Removed skip. >+ > 2019-06-14 Daniel Bates <dabates@apple.com> > > [iOS] Split up fast/events/ios/key-events-meta-alt-combinations.html and add more tests >diff --git a/LayoutTests/http/tests/resourceLoadStatistics/website-data-removal-for-site-navigated-to-with-link-decoration.html b/LayoutTests/http/tests/resourceLoadStatistics/website-data-removal-for-site-navigated-to-with-link-decoration.html >index 1d08a996962784a61818b120871b8a75dfd179f6..bd3f663ab73d9dd0f186116405aa9ba37f3e05d9 100644 >--- a/LayoutTests/http/tests/resourceLoadStatistics/website-data-removal-for-site-navigated-to-with-link-decoration.html >+++ b/LayoutTests/http/tests/resourceLoadStatistics/website-data-removal-for-site-navigated-to-with-link-decoration.html >@@ -75,35 +75,95 @@ > } > } > >+ const maxIntervals = 20; >+ >+ let intervalCounterIDB; >+ let checkIDBCallback; >+ let checkIDBIntervalID; >+ let semaphoreIDBCheck = false; > function checkIDBDataStoreExists(isAfterDeletion, callback) { >- let request = indexedDB.open(dbName); >- request.onerror = function() { >- addOutput("Couldn't open indexedDB."); >- finishTest(); >- }; >- request.onupgradeneeded = function () { >- addOutput((isAfterDeletion ? "After" : "Before") + " deletion: IDB entry does not exist."); >- callback(); >- }; >- request.onsuccess = function() { >- addOutput((isAfterDeletion ? "After" : "Before") + " deletion: IDB entry does exist."); >- callback(); >- }; >+ let request; >+ intervalCounterIDB = 0; >+ checkIDBCallback = callback; >+ if (!isAfterDeletion) { >+ // Check until there is a IDB. >+ checkIDBIntervalID = setInterval(function() { >+ if (semaphoreIDBCheck) >+ return; >+ semaphoreIDBCheck = true; >+ >+ if (++intervalCounterIDB >= maxIntervals) { >+ clearInterval(checkIDBIntervalID); >+ addOutput("Before deletion: IDB entry does not exist."); >+ semaphoreIDBCheck = false; >+ checkIDBCallback(); >+ } else { >+ request = indexedDB.open(dbName); >+ request.onerror = function () { >+ clearInterval(checkIDBIntervalID); >+ addOutput("Couldn't open indexedDB."); >+ semaphoreIDBCheck = false; >+ finishTest(); >+ }; >+ request.onupgradeneeded = function () { >+ // Let the next interval check again. >+ semaphoreIDBCheck = false; >+ }; >+ request.onsuccess = function () { >+ clearInterval(checkIDBIntervalID); >+ addOutput("Before deletion: IDB entry does exist."); >+ semaphoreIDBCheck = false; >+ checkIDBCallback(); >+ }; >+ } >+ }, 200); >+ } else { >+ // Check until there is no IDB. >+ checkIDBIntervalID = setInterval(function () { >+ if (semaphoreIDBCheck) >+ return; >+ semaphoreIDBCheck = true; >+ >+ if (++intervalCounterIDB >= maxIntervals) { >+ clearInterval(checkIDBIntervalID); >+ addOutput("Before deletion: IDB entry does not exist."); >+ semaphoreIDBCheck = false; >+ checkIDBCallback(); >+ } else { >+ request = indexedDB.open(dbName); >+ request.onerror = function () { >+ clearInterval(checkIDBIntervalID); >+ addOutput("Couldn't open indexedDB."); >+ semaphoreIDBCheck = false; >+ finishTest(); >+ }; >+ request.onupgradeneeded = function () { >+ clearInterval(checkIDBIntervalID); >+ addOutput("After deletion: IDB entry does not exist."); >+ semaphoreIDBCheck = false; >+ checkIDBCallback(); >+ }; >+ request.onsuccess = function () { >+ // Let the next interval check again. >+ semaphoreIDBCheck = false; >+ }; >+ } >+ }, 200); >+ } > } > >- const maxIntervals = 20; >- let intervalCounter; >+ let intervalCounterLocalStorage; > let checkLocalStorageCallback; > let checkLocalStorageIntervalID; > const localStorageName = "test"; > const localStorageValue = "value"; > function checkLocalStorageExists(isAfterDeletion, callback) { >- intervalCounter = 0; >+ intervalCounterLocalStorage = 0; > checkLocalStorageCallback = callback; > if (!isAfterDeletion) { > // Check until there is LocalStorage. > checkLocalStorageIntervalID = setInterval(function() { >- if (++intervalCounter === maxIntervals) { >+ if (++intervalCounterLocalStorage >= maxIntervals) { > clearInterval(checkLocalStorageIntervalID); > checkLocalStorageCallback(); > } else if (testRunner.isStatisticsHasLocalStorage(destinationOrigin)) { >@@ -116,7 +176,7 @@ > } else { > // Check until there is no LocalStorage. > checkLocalStorageIntervalID = setInterval(function() { >- if (++intervalCounter === maxIntervals) { >+ if (++intervalCounterLocalStorage >= maxIntervals) { > clearInterval(checkLocalStorageIntervalID); > checkLocalStorageCallback(); > } else if (!testRunner.isStatisticsHasLocalStorage(destinationOrigin)) { >diff --git a/LayoutTests/platform/ios-simulator-wk2/TestExpectations b/LayoutTests/platform/ios-simulator-wk2/TestExpectations >index a6141b75ea7170d13b1f1bf5ef033cbeabe0f17f..ac8bbabae65a22ec659b9fe82428b76b4ec4b12d 100644 >--- a/LayoutTests/platform/ios-simulator-wk2/TestExpectations >+++ b/LayoutTests/platform/ios-simulator-wk2/TestExpectations >@@ -89,5 +89,3 @@ webkit.org/b/192501 animations/play-state-in-shorthand.html [ Pass Failure ] > webkit.org/b/182849 imported/w3c/web-platform-tests/xhr/event-upload-progress-crossorigin.htm [ Pass Failure ] > > imported/w3c/web-platform-tests/IndexedDB/keypath-special-identifiers.htm [ Slow ] >- >-webkit.org/b/198185 http/tests/resourceLoadStatistics/website-data-removal-for-site-navigated-to-with-link-decoration.html [ Skip ] >\ No newline at end of file
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 198185
:
372161
|
372368
|
381141
|
381195