Title: [246453] trunk/LayoutTests
- Revision
- 246453
- Author
- [email protected]
- Date
- 2019-06-14 19:23:16 -0700 (Fri, 14 Jun 2019)
Log Message
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.
Modified Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (246452 => 246453)
--- trunk/LayoutTests/ChangeLog 2019-06-15 01:07:16 UTC (rev 246452)
+++ trunk/LayoutTests/ChangeLog 2019-06-15 02:23:16 UTC (rev 246453)
@@ -1,3 +1,18 @@
+2019-06-14 John Wilander <[email protected]>
+
+ 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 <[email protected]>
[iOS] Split up fast/events/ios/key-events-meta-alt-combinations.html and add more tests
Modified: trunk/LayoutTests/http/tests/resourceLoadStatistics/website-data-removal-for-site-navigated-to-with-link-decoration.html (246452 => 246453)
--- trunk/LayoutTests/http/tests/resourceLoadStatistics/website-data-removal-for-site-navigated-to-with-link-decoration.html 2019-06-15 01:07:16 UTC (rev 246452)
+++ trunk/LayoutTests/http/tests/resourceLoadStatistics/website-data-removal-for-site-navigated-to-with-link-decoration.html 2019-06-15 02:23:16 UTC (rev 246453)
@@ -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)) {
Modified: trunk/LayoutTests/platform/ios-simulator-wk2/TestExpectations (246452 => 246453)
--- trunk/LayoutTests/platform/ios-simulator-wk2/TestExpectations 2019-06-15 01:07:16 UTC (rev 246452)
+++ trunk/LayoutTests/platform/ios-simulator-wk2/TestExpectations 2019-06-15 02:23:16 UTC (rev 246453)
@@ -89,5 +89,3 @@
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
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes