4 <script src=
"../../../resources/js-test.js"></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", "");
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");
28 shouldBeEqualToString("new ApplicationCacheErrorEvent('eventType', { reason: 'foo' }).reason", "foo");
31 shouldBeEqualToString("new ApplicationCacheErrorEvent('eventType', { url: 'bar' }).url", "bar");
34 shouldBe("new ApplicationCacheErrorEvent('eventType', { status: 42 }).status", "42");
37 shouldBeEqualToString("new ApplicationCacheErrorEvent('eventType', { message: 'baz' }).message", "baz");