test_bug1301290.html (1776B)
1 <!DOCTYPE html> 2 <html> 3 <head> 4 <title>Test for Bug 1301290</title> 5 <script src="/tests/SimpleTest/SimpleTest.js"></script> 6 <script src="/tests/SimpleTest/EventUtils.js"></script> 7 <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/> 8 <style type="text/css"> 9 .blue, .green { 10 border: none; 11 box-sizing: border-box; 12 display: block; 13 width: 200px; 14 height: 100px; 15 overflow: scroll; 16 resize: both; 17 } 18 19 .blue { 20 background: blue; 21 } 22 23 .green { 24 background: green; 25 margin-top: -100px; 26 } 27 </style> 28 </head> 29 <body> 30 <div class="blue"></div> 31 <textarea class="green" id="textarea"></textarea> 32 <script type="application/javascript"> 33 SimpleTest.waitForExplicitFinish(); 34 addLoadEvent(() => SimpleTest.executeSoon(function() { 35 var textarea = $("textarea"); 36 var rect = textarea.getBoundingClientRect(); 37 38 synthesizeMouse(textarea, rect.width - 9, rect.height - 9, { type: "mousedown" }); 39 synthesizeMouse(textarea, rect.width + 40, rect.height + 40, { type: "mousemove" }); 40 synthesizeMouse(textarea, rect.width + 40, rect.height + 40, { type: "mouseup" }); 41 42 var newrect = textarea.getBoundingClientRect(); 43 ok(newrect.width > rect.width, "width did not increase"); 44 ok(newrect.height > rect.height, "height did not increase"); 45 SimpleTest.finish(); 46 })); 47 </script> 48 </body> 49 </html>