Changeset 246453 in webkit
- Timestamp:
- Jun 14, 2019 7:23:16 PM (5 years ago)
- Location:
- trunk/LayoutTests
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r246450 r246453 1 2019-06-14 John Wilander <wilander@apple.com> 2 3 Repeatedly check for IDB removal to address flakiness in http/tests/resourceLoadStatistics/website-data-removal-for-site-navigated-to-with-link-decoration.html 4 https://bugs.webkit.org/show_bug.cgi?id=198185 5 <rdar://problem/51074251> 6 7 Unreviewed test gardening. 8 9 There's an asynchronosity in the removal of IDB entries so this test case 10 needs to check repeatedly until the removal has happened. 11 12 * http/tests/resourceLoadStatistics/website-data-removal-for-site-navigated-to-with-link-decoration.html: 13 * platform/ios-simulator-wk2/TestExpectations: 14 Removed skip. 15 1 16 2019-06-14 Daniel Bates <dabates@apple.com> 2 17 -
trunk/LayoutTests/http/tests/resourceLoadStatistics/website-data-removal-for-site-navigated-to-with-link-decoration.html
r243632 r246453 76 76 } 77 77 78 const maxIntervals = 20; 79 80 let intervalCounterIDB; 81 let checkIDBCallback; 82 let checkIDBIntervalID; 83 let semaphoreIDBCheck = false; 78 84 function checkIDBDataStoreExists(isAfterDeletion, callback) { 79 let request = indexedDB.open(dbName); 80 request.onerror = function() { 81 addOutput("Couldn't open indexedDB."); 82 finishTest(); 83 }; 84 request.onupgradeneeded = function () { 85 addOutput((isAfterDeletion ? "After" : "Before") + " deletion: IDB entry does not exist."); 86 callback(); 87 }; 88 request.onsuccess = function() { 89 addOutput((isAfterDeletion ? "After" : "Before") + " deletion: IDB entry does exist."); 90 callback(); 91 }; 92 } 93 94 const maxIntervals = 20; 95 let intervalCounter; 85 let request; 86 intervalCounterIDB = 0; 87 checkIDBCallback = callback; 88 if (!isAfterDeletion) { 89 // Check until there is a IDB. 90 checkIDBIntervalID = setInterval(function() { 91 if (semaphoreIDBCheck) 92 return; 93 semaphoreIDBCheck = true; 94 95 if (++intervalCounterIDB >= maxIntervals) { 96 clearInterval(checkIDBIntervalID); 97 addOutput("Before deletion: IDB entry does not exist."); 98 semaphoreIDBCheck = false; 99 checkIDBCallback(); 100 } else { 101 request = indexedDB.open(dbName); 102 request.onerror = function () { 103 clearInterval(checkIDBIntervalID); 104 addOutput("Couldn't open indexedDB."); 105 semaphoreIDBCheck = false; 106 finishTest(); 107 }; 108 request.onupgradeneeded = function () { 109 // Let the next interval check again. 110 semaphoreIDBCheck = false; 111 }; 112 request.onsuccess = function () { 113 clearInterval(checkIDBIntervalID); 114 addOutput("Before deletion: IDB entry does exist."); 115 semaphoreIDBCheck = false; 116 checkIDBCallback(); 117 }; 118 } 119 }, 200); 120 } else { 121 // Check until there is no IDB. 122 checkIDBIntervalID = setInterval(function () { 123 if (semaphoreIDBCheck) 124 return; 125 semaphoreIDBCheck = true; 126 127 if (++intervalCounterIDB >= maxIntervals) { 128 clearInterval(checkIDBIntervalID); 129 addOutput("Before deletion: IDB entry does not exist."); 130 semaphoreIDBCheck = false; 131 checkIDBCallback(); 132 } else { 133 request = indexedDB.open(dbName); 134 request.onerror = function () { 135 clearInterval(checkIDBIntervalID); 136 addOutput("Couldn't open indexedDB."); 137 semaphoreIDBCheck = false; 138 finishTest(); 139 }; 140 request.onupgradeneeded = function () { 141 clearInterval(checkIDBIntervalID); 142 addOutput("After deletion: IDB entry does not exist."); 143 semaphoreIDBCheck = false; 144 checkIDBCallback(); 145 }; 146 request.onsuccess = function () { 147 // Let the next interval check again. 148 semaphoreIDBCheck = false; 149 }; 150 } 151 }, 200); 152 } 153 } 154 155 let intervalCounterLocalStorage; 96 156 let checkLocalStorageCallback; 97 157 let checkLocalStorageIntervalID; … … 99 159 const localStorageValue = "value"; 100 160 function checkLocalStorageExists(isAfterDeletion, callback) { 101 intervalCounter = 0;161 intervalCounterLocalStorage = 0; 102 162 checkLocalStorageCallback = callback; 103 163 if (!isAfterDeletion) { 104 164 // Check until there is LocalStorage. 105 165 checkLocalStorageIntervalID = setInterval(function() { 106 if (++intervalCounter === maxIntervals) {166 if (++intervalCounterLocalStorage >= maxIntervals) { 107 167 clearInterval(checkLocalStorageIntervalID); 108 168 checkLocalStorageCallback(); … … 117 177 // Check until there is no LocalStorage. 118 178 checkLocalStorageIntervalID = setInterval(function() { 119 if (++intervalCounter === maxIntervals) {179 if (++intervalCounterLocalStorage >= maxIntervals) { 120 180 clearInterval(checkLocalStorageIntervalID); 121 181 checkLocalStorageCallback(); -
trunk/LayoutTests/platform/ios-simulator-wk2/TestExpectations
r246318 r246453 90 90 91 91 imported/w3c/web-platform-tests/IndexedDB/keypath-special-identifiers.htm [ Slow ] 92 93 webkit.org/b/198185 http/tests/resourceLoadStatistics/website-data-removal-for-site-navigated-to-with-link-decoration.html [ Skip ]
Note: See TracChangeset
for help on using the changeset viewer.