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

Side by Side Diff: LayoutTests/http/tests/appcache/404-resource-cross-origin.html

Issue 217133002: AppCache error details tests (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Restore missing files Created 6 years, 8 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 <html manifest="resources/404-resource-cross-origin.manifest">
2 <script src="/js-test-resources/js-test.js"></script>
3 <script>
4 var jsTestIsAsync = true;
5 description("Test that a missing cross-origin resource failure doesn't leak deta ils.");
6
7 function unexpectedCallback(eventName)
8 {
9 testFailed("An unexpected " + eventName + " event was dispatched on window.a pplicationCache.");
10 finishJSTest();
11 }
12
13 function test(e)
14 {
15 shouldBe("applicationCache.status", "applicationCache.UNCACHED");
16
17 event = e;
18 shouldBeTrue("'reason' in event");
19 shouldBeTrue("'url' in event");
20 shouldBeTrue("'status' in event");
21 shouldBeTrue("'message' in event");
22
23 shouldBeEqualToString("event.reason", "resource");
24 shouldBeEqualToString("event.url", "http://127.0.0.1/does-not-exist.txt");
25 shouldBe("event.status", "0");
26 shouldBeEqualToString("event.message", "");
27
28 finishJSTest();
29 }
30
31 applicationCache.addEventListener('cached', function() { unexpectedCallback("cac hed"); }, false);
32 applicationCache.addEventListener('noupdate', function() { unexpectedCallback("n oupdate"); }, false);
33 applicationCache.addEventListener('error', test, false);
34
35 </script>
36 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698