5 <script src="../../resources/js-test.js"></script>
6 <script type="text/javascript">
7 window.jsTestIsAsync = true;
8 var initialPosition = 1;
9 var halfAnimationPeriod = 63;
10 var fullAnimationPeriod = 123;
11 function scrollOffsetInitial()
13 var section1 = document.getElementById('marquee');
14 if (section1.scrollLeft == -initialPosition) {
15 debug("PASS on initial position");
18 debug("ScrollLeft = " + section1.scrollLeft);
19 debug("ScrollWidth = " + section1.scrollWidth);
24 function scrollOffsetCompleteCycle()
26 var section1 = document.getElementById('marquee');
27 if (section1.scrollLeft == -initialPosition) {
28 debug("PASS on after full cycle completion");
31 debug("ScrollLeft = " + section1.scrollLeft);
32 debug("ScrollWidth = " + section1.scrollWidth);
37 function scrollOffsetMidCycle()
39 var section1 = document.getElementById('marquee');
40 if (section1.scrollLeft == 0 ) {
41 debug("PASS on after half cycle completion");
44 debug("ScrollLeft = " + section1.scrollLeft);
45 debug("ScrollWidth = " + section1.scrollWidth);
51 var t=setTimeout("scrollOffsetInitial()",0);
52 var t=setTimeout("scrollOffsetMidCycle()",halfAnimationPeriod);
53 var t=setTimeout("scrollOffsetCompleteCycle()",fullAnimationPeriod);
55 successfullyParsed = true;
58 <body onload = dump() >
59 <marquee id="marquee" width=30 behavior="alternate" scrollamount=1 scrolldelay=1><img src="resources/images/lime.png" width="29" height="29" alt="lime"></marquee>
60 <pre id="console"></pre>