Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
graouts authored Oct 5, 2024
1 parent e662078 commit 9448ab3
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 0 deletions.
16 changes: 16 additions & 0 deletions scroll-animations/scroll-timelines/duration.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>ScrollTimeline.duration</title>
<link rel="help" href="https://drafts.csswg.org/web-animations-2/#dom-animationtimeline-duration">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>

<script>
'use strict';

test(t => {
const timeline = new ScrollTimeline();
assert_equals(timeline.duration.toString(), '100%');
}, 'The duration of a scroll timeline is 100%');

</script>
16 changes: 16 additions & 0 deletions scroll-animations/view-timelines/duration.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>ViewTimeline.duration</title>
<link rel="help" href="https://drafts.csswg.org/web-animations-2/#dom-animationtimeline-duration">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>

<script>
'use strict';

test(t => {
const timeline = new ViewTimeline();
assert_equals(timeline.duration.toString(), '100%');
}, 'The duration of a view timeline is 100%');

</script>
20 changes: 20 additions & 0 deletions web-animations/interfaces/DocumentTimeline/duration.tentative.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<!DOCTYPE html>
<meta charset=utf-8>
<title>DocumentTimeline.duration</title>
<link rel="help" href="https://drafts.csswg.org/web-animations-2/#dom-animationtimeline-duration">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="../../testcommon.js"></script>
<script src="../../resources/timing-override.js"></script>
<body>
<div id="log"></div>
<script>
'use strict';

test(t => {
const timeline = new DocumentTimeline();
assert_equals(timeline.duration, null);
}, 'A document timeline does not have a duration');

</script>
</body>

0 comments on commit 9448ab3

Please sign in to comment.