Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(39)

Unified Diff: LayoutTests/http/tests/appcache/modified-manifest.html

Issue 217133002: AppCache error details tests (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Restore missing files Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: LayoutTests/http/tests/appcache/modified-manifest.html
diff --git a/LayoutTests/http/tests/appcache/modified-manifest.html b/LayoutTests/http/tests/appcache/modified-manifest.html
new file mode 100644
index 0000000000000000000000000000000000000000..a3eac23b074f812cf1e92ec97be9a3b349b2101b
--- /dev/null
+++ b/LayoutTests/http/tests/appcache/modified-manifest.html
@@ -0,0 +1,44 @@
+<html manifest="resources/modified-manifest.php">
+<script src="/js-test-resources/js-test.js"></script>
+<script>
+var jsTestIsAsync = true;
+description("Test that a manifest that changes during an update fails.");
+
+function unexpectedEvent(name)
michaeln 2014/03/31 20:18:43 not used?
jsbell 2014/03/31 22:10:45 Removed.
+{
+ testFailed("Unexpected " + name + " event.");
+ finishJSTest();
+}
+
+var gotCheckingEvent = false;
+function onChecking() { gotCheckingEvent = true; }
+
+
+var gotDownloadingEvent = false;
+function onDownloading() { gotDownloadingEvent = true; }
+
+function onError(e)
+{
+ shouldBeTrue("gotCheckingEvent");
+ shouldBeTrue("gotDownloadingEvent");
+ shouldBe("window.applicationCache.status", "applicationCache.UNCACHED");
+
+ event = e;
+ shouldBeTrue("'reason' in event");
+ shouldBeTrue("'url' in event");
+ shouldBeTrue("'status' in event");
+ shouldBeTrue("'message' in event");
+
+ shouldBeEqualToString("event.reason", "changed");
+ shouldBeEqualToString("event.url", "");
+ shouldBe("event.status", "0");
+
+ finishJSTest();
+}
+
+applicationCache.addEventListener('checking', onChecking, false);
+applicationCache.addEventListener('downloading', onDownloading, false);
+applicationCache.addEventListener('error', onError, false);
+
+</script>
+</html>

Powered by Google App Engine
This is Rietveld 408576698