Title: [231918] trunk/LayoutTests
- Revision
- 231918
- Author
- [email protected]
- Date
- 2018-05-17 13:40:47 -0700 (Thu, 17 May 2018)
Log Message
REGRESSION (r229831?): Layout Test http/tests/appcache/interrupted-update.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=184061
<rdar://problem/38975570>
Reviewed by Alexey Proskuryakov.
Test is flaky as it sometimes reload twice.
Make sure it reloads only once by not relying on localStorage.
Make sure the appcache has not enough time to finish before reloading is done.
This is done by adding more entries to the appcache.
Add a test that sets an item in local storage, reloads and verifies the item is there.
* TestExpectations:
* http/tests/appcache/interrupted-update.html:
* http/tests/appcache/resources/interrupted-update.manifest:
* http/tests/storage/setItem-and-reload-expected.txt: Added.
* http/tests/storage/setItem-and-reload.html: Added.
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (231917 => 231918)
--- trunk/LayoutTests/ChangeLog 2018-05-17 19:30:46 UTC (rev 231917)
+++ trunk/LayoutTests/ChangeLog 2018-05-17 20:40:47 UTC (rev 231918)
@@ -1,3 +1,23 @@
+2018-05-17 Youenn Fablet <[email protected]>
+
+ REGRESSION (r229831?): Layout Test http/tests/appcache/interrupted-update.html is a flaky failure
+ https://bugs.webkit.org/show_bug.cgi?id=184061
+ <rdar://problem/38975570>
+
+ Reviewed by Alexey Proskuryakov.
+
+ Test is flaky as it sometimes reload twice.
+ Make sure it reloads only once by not relying on localStorage.
+ Make sure the appcache has not enough time to finish before reloading is done.
+ This is done by adding more entries to the appcache.
+ Add a test that sets an item in local storage, reloads and verifies the item is there.
+
+ * TestExpectations:
+ * http/tests/appcache/interrupted-update.html:
+ * http/tests/appcache/resources/interrupted-update.manifest:
+ * http/tests/storage/setItem-and-reload-expected.txt: Added.
+ * http/tests/storage/setItem-and-reload.html: Added.
+
2018-05-17 Carlos Alberto Lopez Perez <[email protected]>
[WPE] Implement and enable FULLSCREEN_API
Modified: trunk/LayoutTests/TestExpectations (231917 => 231918)
--- trunk/LayoutTests/TestExpectations 2018-05-17 19:30:46 UTC (rev 231917)
+++ trunk/LayoutTests/TestExpectations 2018-05-17 20:40:47 UTC (rev 231918)
@@ -1896,8 +1896,6 @@
webkit.org/b/184198 imported/w3c/web-platform-tests/html/browsers/offline/appcache/workers/appcache-worker.html [ Pass Failure ]
-webkit.org/b/184061 http/tests/appcache/interrupted-update.html [ Pass Failure ]
-
webkit.org/b/184453 imported/w3c/web-platform-tests/workers/name-property.html [ Pass Failure ]
webkit.org/b/48451 animations/combo-transform-translate+scale.html [ Pass Failure ]
Modified: trunk/LayoutTests/http/tests/appcache/interrupted-update-expected.txt (231917 => 231918)
--- trunk/LayoutTests/http/tests/appcache/interrupted-update-expected.txt 2018-05-17 19:30:46 UTC (rev 231917)
+++ trunk/LayoutTests/http/tests/appcache/interrupted-update-expected.txt 2018-05-17 20:40:47 UTC (rev 231918)
@@ -6,16 +6,26 @@
Reloaded
CHECKING
DOWNLOADING
-PROGRESS 0/9
-PROGRESS 1/9
-PROGRESS 2/9
-PROGRESS 3/9
-PROGRESS 4/9
-PROGRESS 5/9
-PROGRESS 6/9
-PROGRESS 7/9
-PROGRESS 8/9
-PROGRESS 9/9
+PROGRESS 0/19
+PROGRESS 1/19
+PROGRESS 2/19
+PROGRESS 3/19
+PROGRESS 4/19
+PROGRESS 5/19
+PROGRESS 6/19
+PROGRESS 7/19
+PROGRESS 8/19
+PROGRESS 9/19
+PROGRESS 10/19
+PROGRESS 11/19
+PROGRESS 12/19
+PROGRESS 13/19
+PROGRESS 14/19
+PROGRESS 15/19
+PROGRESS 16/19
+PROGRESS 17/19
+PROGRESS 18/19
+PROGRESS 19/19
CACHED
PASS
Modified: trunk/LayoutTests/http/tests/appcache/interrupted-update.html (231917 => 231918)
--- trunk/LayoutTests/http/tests/appcache/interrupted-update.html 2018-05-17 19:30:46 UTC (rev 231917)
+++ trunk/LayoutTests/http/tests/appcache/interrupted-update.html 2018-05-17 20:40:47 UTC (rev 231918)
@@ -12,8 +12,7 @@
document.getElementById("log").innerHTML += msg + "\n";
}
-var haveReloaded = localStorage.getItem("appcache-interrupted-update-reloaded") == "YES";
-localStorage.removeItem("appcache-interrupted-update-reloaded");
+var haveReloaded = window.location.hash === "#reloaded";
if (haveReloaded)
log("Reloaded");
@@ -33,9 +32,9 @@
log("PROGRESS " + event.loaded + "/" + event.total);
if (!haveReloaded && event.loaded == 2) {
- localStorage.setItem("appcache-interrupted-update-reloaded", "YES");
+ reloadedLocation = window.location + "#reloaded";
+ window.location = "/resources/redirect.php?url="" + encodeURIComponent(reloadedLocation);
console.log("Reloading...");
- window.location.reload();
}
}
Modified: trunk/LayoutTests/http/tests/appcache/resources/interrupted-update.manifest (231917 => 231918)
--- trunk/LayoutTests/http/tests/appcache/resources/interrupted-update.manifest 2018-05-17 19:30:46 UTC (rev 231917)
+++ trunk/LayoutTests/http/tests/appcache/resources/interrupted-update.manifest 2018-05-17 20:40:47 UTC (rev 231918)
@@ -8,3 +8,13 @@
abe.png?interrupted-update-7
abe.png?interrupted-update-8
abe.png?interrupted-update-9
+abe.png?interrupted-update-10
+abe.png?interrupted-update-11
+abe.png?interrupted-update-12
+abe.png?interrupted-update-13
+abe.png?interrupted-update-14
+abe.png?interrupted-update-15
+abe.png?interrupted-update-16
+abe.png?interrupted-update-17
+abe.png?interrupted-update-18
+abe.png?interrupted-update-19
Added: trunk/LayoutTests/http/tests/storage/setItem-and-reload-expected.txt (0 => 231918)
--- trunk/LayoutTests/http/tests/storage/setItem-and-reload-expected.txt (rev 0)
+++ trunk/LayoutTests/http/tests/storage/setItem-and-reload-expected.txt 2018-05-17 20:40:47 UTC (rev 231918)
@@ -0,0 +1,5 @@
+CONSOLE MESSAGE: line 25: Reloading...
+Test that setting local storage, reloading and getting local storage works.
+
+Reloaded
+
Added: trunk/LayoutTests/http/tests/storage/setItem-and-reload.html (0 => 231918)
--- trunk/LayoutTests/http/tests/storage/setItem-and-reload.html (rev 0)
+++ trunk/LayoutTests/http/tests/storage/setItem-and-reload.html 2018-05-17 20:40:47 UTC (rev 231918)
@@ -0,0 +1,31 @@
+<html>
+<p>Test that setting local storage, reloading and getting local storage works.</p>
+<pre id=log></pre>
+<script>
+if (window.testRunner) {
+ testRunner.dumpAsText();
+ testRunner.waitUntilDone();
+}
+
+function log(msg)
+{
+ document.getElementById("log").innerHTML += msg + "\n";
+}
+
+var haveReloaded = localStorage.getItem("reloaded") == "YES";
+localStorage.removeItem("reloaded");
+
+if (haveReloaded) {
+ log("Reloaded");
+ if (window.testRunner)
+ testRunner.notifyDone();
+} else {
+ setTimeout(() => {
+ localStorage.setItem("reloaded", "YES");
+ console.log("Reloading...");
+ window.location.reload();
+ }, 0);
+}
+</script>
+
+</html>
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes