| OLD | NEW | 
|   1 <html> |   1 <html> | 
|   2     <head> |   2     <head> | 
|   3         <script src="../../resources/js-test.js"></script> |   3         <script src="../../resources/js-test.js"></script> | 
|   4         <script> |   4         <script> | 
|   5             var givenScrollTop = 2; |   5             var givenScrollTop = 2; | 
|   6             var givenScrollLeft = 0; |   6             var givenScrollLeft = 0; | 
|   7             var expectedScrollTop = 0; |   7             var expectedScrollTop = 0; | 
|   8             var expectedScrollLeft = 0; |   8             var expectedScrollLeft = 0; | 
|   9             var event; |   9             var event; | 
|  10             var div; |  10             var div; | 
|  11  |  11  | 
|  12             if (window.testRunner) |  12             if (window.testRunner) | 
|  13                 testRunner.waitUntilDone(); |  13                 testRunner.waitUntilDone(); | 
|  14  |  14  | 
|  15             function dispatchWheelEvent() |  15             function dispatchWheelEvent() | 
|  16             { |  16             { | 
|  17                 document.body.addEventListener("mousewheel", mousewheelHandler, 
    false); |  17                 document.body.addEventListener("mousewheel", mousewheelHandler, 
    false); | 
|  18  |  18  | 
|  19                 if (window.eventSender) { |  19                 if (window.eventSender) { | 
|  20                     eventSender.mouseMoveTo(100, 110); |  20                     eventSender.mouseMoveTo(100, 110); | 
|  21                     eventSender.continuousMouseScrollBy(-window.givenScrollLeft,
     -window.givenScrollTop, true); |  21                     eventSender.continuousMouseScrollBy(-window.givenScrollLeft,
     -window.givenScrollTop, true); | 
|  22                 } |  22                 } | 
|  23  |  23  | 
|  24                 setTimeout('checkOffsets();', 100); |  24                 setTimeout('checkOffsets();', 100); | 
|  25             } |  25             } | 
|  26  |  26  | 
|  27             function checkOffsets() |  27             function checkOffsets() | 
|  28             { |  28             { | 
|  29                 shouldBe("document.body.scrollTop", "window.expectedScrollTop"); |  29                 shouldBe("document.scrollingElement.scrollTop", "window.expected
    ScrollTop"); | 
|  30                 shouldBe("document.body.scrollLeft", "window.expectedScrollLeft"
    ); |  30                 shouldBe("document.scrollingElement.scrollLeft", "window.expecte
    dScrollLeft"); | 
|  31  |  31  | 
|  32                 if (window.testRunner) |  32                 if (window.testRunner) | 
|  33                     window.testRunner.notifyDone(); |  33                     window.testRunner.notifyDone(); | 
|  34             } |  34             } | 
|  35  |  35  | 
|  36             function mousewheelHandler(e) |  36             function mousewheelHandler(e) | 
|  37             { |  37             { | 
|  38                                 event = e; |  38                                 event = e; | 
|  39                                 shouldBe("event.wheelDeltaY", "window.givenScrol
    lTop * -3"); |  39                                 shouldBe("event.wheelDeltaY", "window.givenScrol
    lTop * -3"); | 
|  40                                 shouldBe("event.wheelDeltaX", "0"); |  40                                 shouldBe("event.wheelDeltaX", "0"); | 
| (...skipping 11 matching lines...) Expand all  Loading... | 
|  52           <div style="background-color:red;height:200px;width:1200px;position:re
    lative;left:0px;top:0px"></div> |  52           <div style="background-color:red;height:200px;width:1200px;position:re
    lative;left:0px;top:0px"></div> | 
|  53           <div style="background-color:green;height:200px;width:1200px;position:
    relative;left:1200px;top:-200px"></div> |  53           <div style="background-color:green;height:200px;width:1200px;position:
    relative;left:1200px;top:-200px"></div> | 
|  54         </div> |  54         </div> | 
|  55         <div style="height:200px;width:2400px"> |  55         <div style="height:200px;width:2400px"> | 
|  56           <div style="background-color:blue;height:200px;width:1200px;position:r
    elative;left:0px;top:0px"></div> |  56           <div style="background-color:blue;height:200px;width:1200px;position:r
    elative;left:0px;top:0px"></div> | 
|  57           <div style="background-color:yellow;height:200px;width:1200px;position
    :relative;left:1200px;top:-200px"></div> |  57           <div style="background-color:yellow;height:200px;width:1200px;position
    :relative;left:1200px;top:-200px"></div> | 
|  58         </div> |  58         </div> | 
|  59         <div id="console"></div> |  59         <div id="console"></div> | 
|  60     </body> |  60     </body> | 
|  61 </html> |  61 </html> | 
| OLD | NEW |