Source code

Revision control

Copy as Markdown

Other Tools

Test Info: Warnings

<!DOCTYPE html>
<html>
<head>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
</head>
<body>
<div id="subject"></div>
<script>
// This test is aimed at environments where the device scale factor is not
// 1, i.e. the ratio of physical pixels to CSS pixels isn't 1.
promise_test(async (test) => {
let trigger = new AnimationTrigger({
behavior: "alternate",
timeline: new ViewTimeline({
subject: document.getElementById('subject'), axis: "y"
}),
rangeStart: "100px",
rangeEnd: "300px"
});
assert_equals(trigger.rangeStart, "100px",
"correct range start returned");
assert_equals(trigger.rangeEnd, "300px", "correct range end returned");
}, "Ranges of triggers created by script are read in CSS pixels");
</script>
</body>
</html>