Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / html / marquee-alternate.html-disabled
blobd04d72e20d0b5a890e156fa472fe03b1a43ae35f
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <meta charset="utf-8">
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");
16   } else {
17       debug("FAIL");
18       debug("ScrollLeft = " + section1.scrollLeft);
19       debug("ScrollWidth = " + section1.scrollWidth);
20       finishJSTest();
21   }
24 function scrollOffsetCompleteCycle()
26   var section1 = document.getElementById('marquee');
27   if (section1.scrollLeft == -initialPosition) {
28       debug("PASS on after full cycle completion");
29   } else {
30       debug("FAIL");
31       debug("ScrollLeft = " + section1.scrollLeft);
32       debug("ScrollWidth = " + section1.scrollWidth);
33   }
34   finishJSTest();
37 function scrollOffsetMidCycle()
39   var section1 = document.getElementById('marquee');
40   if (section1.scrollLeft == 0 ) {
41       debug("PASS on after half cycle completion");
42   } else {
43       debug("FAIL");
44       debug("ScrollLeft = " + section1.scrollLeft);
45       debug("ScrollWidth = " + section1.scrollWidth);
46       finishJSTest();
47   }
50 function dump() {
51   var t=setTimeout("scrollOffsetInitial()",0);
52   var t=setTimeout("scrollOffsetMidCycle()",halfAnimationPeriod);
53   var t=setTimeout("scrollOffsetCompleteCycle()",fullAnimationPeriod);
55 successfullyParsed = true;
56 </script>
57 </head>
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>
61 </body>
62 </body>
63 </html>