animation-trigger-range-px-roundtrip.tentative.html (999B)
1 <!DOCTYPE html> 2 <html> 3 <head> 4 <link rel="help" src="https://drafts.csswg.org/css-animations-2/#animation-trigger"> 5 <script src="/resources/testharness.js"></script> 6 <script src="/resources/testharnessreport.js"></script> 7 </head> 8 <body> 9 <div id="subject"></div> 10 <script> 11 // This test is aimed at environments where the device scale factor is not 12 // 1, i.e. the ratio of physical pixels to CSS pixels isn't 1. 13 promise_test(async (test) => { 14 let trigger = new TimelineTrigger({ 15 timeline: new ViewTimeline({ 16 subject: document.getElementById('subject'), axis: "y" 17 }), 18 rangeStart: "100px", 19 rangeEnd: "300px" 20 }); 21 22 assert_equals(trigger.rangeStart, "100px", 23 "correct range start returned"); 24 assert_equals(trigger.rangeEnd, "300px", "correct range end returned"); 25 }, "Ranges of triggers created by script are read in CSS pixels"); 26 </script> 27 </body> 28 </html>