blob: 9b86a7105d5dcfafc7e5d7f1f63593f7b1063f33 [file] [log] [blame]
<!DOCTYPE html>
<meta charset=utf-8>
<title>Test basic functionality of document timeline phases.</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script>
'use strict';
promise_test(async t => {
const timeline = new DocumentTimeline();
assert_equals(timeline.phase, "active");
}, 'Document timeline starts in "active" phase.');
promise_test(async t => {
const timeline = new DocumentTimeline();
assert_throws_js(TypeError, () => {
timeline.phase = "after";
});
}, 'Setting document timeline phase (which is readonly) throws TypeError.');
</script>