Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / events / constructors / application-cache-error-event-constructor.html
blobf8b20fbb14f50b49337c247b05e0ba3f17ee261c
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <script src="../../../resources/js-test.js"></script>
5 </head>
6 <body>
7 <script>
9 description("This tests the constructor for the ApplicationCacheErrorEvent DOM class.");
11 // No initializer is passed.
12 shouldBe("new ApplicationCacheErrorEvent('eventType').bubbles", "false");
13 shouldBe("new ApplicationCacheErrorEvent('eventType').cancelable", "false");
14 shouldBeEqualToString("new ApplicationCacheErrorEvent('eventType').reason", "");
15 shouldBeEqualToString("new ApplicationCacheErrorEvent('eventType').url", "");
16 shouldBe("new ApplicationCacheErrorEvent('eventType').status", "0");
17 shouldBeEqualToString("new ApplicationCacheErrorEvent('eventType').message", "");
19 // bubbles is passed.
20 shouldBe("new ApplicationCacheErrorEvent('eventType', { bubbles: false }).bubbles", "false");
21 shouldBe("new ApplicationCacheErrorEvent('eventType', { bubbles: true }).bubbles", "true");
23 // cancelable is passed.
24 shouldBe("new ApplicationCacheErrorEvent('eventType', { cancelable: false }).cancelable", "false");
25 shouldBe("new ApplicationCacheErrorEvent('eventType', { cancelable: true }).cancelable", "true");
27 // reason is passed.
28 shouldBeEqualToString("new ApplicationCacheErrorEvent('eventType', { reason: 'foo' }).reason", "foo");
30 // url is passed.
31 shouldBeEqualToString("new ApplicationCacheErrorEvent('eventType', { url: 'bar' }).url", "bar");
33 // status is passed.
34 shouldBe("new ApplicationCacheErrorEvent('eventType', { status: 42 }).status", "42");
36 // message is passed.
37 shouldBeEqualToString("new ApplicationCacheErrorEvent('eventType', { message: 'baz' }).message", "baz");
39 </script>
40 </body>
41 </html>