blob: fdc69c519fcb45d1c28455ba32857126077ac8e3 [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<script src="../../../resources/js-test-pre.js"></script>
</head>
<body>
<script>
description("This tests the constructor for the PageTransitionEvent DOM class.");
// No initializer is passed.
shouldBe("new PageTransitionEvent('eventType').bubbles", "false");
shouldBe("new PageTransitionEvent('eventType').cancelable", "false");
shouldBe("new PageTransitionEvent('eventType').persisted", "false");
// bubbles is passed.
shouldBe("new PageTransitionEvent('eventType', { bubbles: false }).bubbles", "false");
shouldBe("new PageTransitionEvent('eventType', { bubbles: true }).bubbles", "true");
// cancelable is passed.
shouldBe("new PageTransitionEvent('eventType', { cancelable: false }).cancelable", "false");
shouldBe("new PageTransitionEvent('eventType', { cancelable: true }).cancelable", "true");
// persisted is passed.
shouldBe("new PageTransitionEvent('eventType', { persisted: false }).persisted", "false");
shouldBe("new PageTransitionEvent('eventType', { persisted: true }).persisted", "true");
// All initializers are passed.
shouldBe("new PageTransitionEvent('eventType', { bubbles: true, cancelable: true, persisted: true }).bubbles", "true");
shouldBe("new PageTransitionEvent('eventType', { bubbles: true, cancelable: true, persisted: true }).cancelable", "true");
shouldBe("new PageTransitionEvent('eventType', { bubbles: true, cancelable: true, persisted: true }).persisted", "true");
</script>
<script src="../../../resources/js-test-post.js"></script>
</body>
</html>