Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
michael@0 | 1 | <!DOCTYPE HTML> |
michael@0 | 2 | <html> |
michael@0 | 3 | <!-- |
michael@0 | 4 | https://bugzilla.mozilla.org/show_bug.cgi?id=579767 |
michael@0 | 5 | --> |
michael@0 | 6 | <head> |
michael@0 | 7 | <title>Test for Bug 579767</title> |
michael@0 | 8 | <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script> |
michael@0 | 9 | <script type="text/javascript" src="/tests/SimpleTest/EventUtils.js"></script> |
michael@0 | 10 | <script type="text/javascript" src="/tests/SimpleTest/WindowSnapshot.js"></script> |
michael@0 | 11 | <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/> |
michael@0 | 12 | <style> |
michael@0 | 13 | iframe { |
michael@0 | 14 | width: 1006px; |
michael@0 | 15 | height: 306px; |
michael@0 | 16 | } |
michael@0 | 17 | </style> |
michael@0 | 18 | </head> |
michael@0 | 19 | <body> |
michael@0 | 20 | <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=579767">Mozilla Bug 579767</a> |
michael@0 | 21 | <p id="display"></p> |
michael@0 | 22 | <div id="content"> |
michael@0 | 23 | <iframe src="file_bug579767_1.html" id="f1"></iframe> |
michael@0 | 24 | <iframe src="file_bug579767_2.html" id="f2"></iframe> |
michael@0 | 25 | </div> |
michael@0 | 26 | <pre id="test"> |
michael@0 | 27 | <script type="application/javascript"> |
michael@0 | 28 | |
michael@0 | 29 | /** Test for Bug 579767 **/ |
michael@0 | 30 | SimpleTest.waitForExplicitFinish(); |
michael@0 | 31 | addLoadEvent(function() { |
michael@0 | 32 | var f1 = document.getElementById("f1"); |
michael@0 | 33 | var f2 = document.getElementById("f2"); |
michael@0 | 34 | var t1 = f1.contentDocument.documentElement; |
michael@0 | 35 | var t2 = f2.contentDocument.documentElement; |
michael@0 | 36 | |
michael@0 | 37 | setTimeout(function() { |
michael@0 | 38 | // drag the vertical handle 10px to the right |
michael@0 | 39 | synthesizeMouse(t1, 100, 6, {type: "mousedown"}, f1.contentWindow); |
michael@0 | 40 | synthesizeMouse(t1, 101, 6, {type: "mousemove"}, f1.contentWindow); |
michael@0 | 41 | synthesizeMouse(t1, 102, 6, {type: "mousemove"}, f1.contentWindow); |
michael@0 | 42 | synthesizeMouse(t1, 103, 6, {type: "mousemove"}, f1.contentWindow); |
michael@0 | 43 | synthesizeMouse(t1, 104, 6, {type: "mousemove"}, f1.contentWindow); |
michael@0 | 44 | synthesizeMouse(t1, 105, 6, {type: "mousemove"}, f1.contentWindow); |
michael@0 | 45 | synthesizeMouse(t1, 106, 6, {type: "mousemove"}, f1.contentWindow); |
michael@0 | 46 | synthesizeMouse(t1, 107, 6, {type: "mousemove"}, f1.contentWindow); |
michael@0 | 47 | synthesizeMouse(t1, 108, 6, {type: "mousemove"}, f1.contentWindow); |
michael@0 | 48 | synthesizeMouse(t1, 109, 6, {type: "mousemove"}, f1.contentWindow); |
michael@0 | 49 | synthesizeMouse(t1, 200, 6, {type: "mouseup" }, f1.contentWindow); |
michael@0 | 50 | |
michael@0 | 51 | setTimeout(function() { |
michael@0 | 52 | // drag the horizontal handle 10px to down and 5px to right |
michael@0 | 53 | synthesizeMouse(t1, 2, 92, {type: "mousedown"}, f1.contentWindow); |
michael@0 | 54 | synthesizeMouse(t1, 3, 93, {type: "mousemove"}, f1.contentWindow); |
michael@0 | 55 | synthesizeMouse(t1, 4, 94, {type: "mousemove"}, f1.contentWindow); |
michael@0 | 56 | synthesizeMouse(t1, 5, 95, {type: "mousemove"}, f1.contentWindow); |
michael@0 | 57 | synthesizeMouse(t1, 7, 102,{type: "mousemove"}, f1.contentWindow); |
michael@0 | 58 | synthesizeMouse(t1, 7, 102,{type: "mouseup" }, f1.contentWindow); |
michael@0 | 59 | |
michael@0 | 60 | setTimeout(function() { |
michael@0 | 61 | // now compare the two windows |
michael@0 | 62 | ok(compareSnapshots(snapshotWindow(f1.contentWindow), |
michael@0 | 63 | snapshotWindow(f2.contentWindow), true)[0], |
michael@0 | 64 | "The borders should be painted correctly after resizing"); |
michael@0 | 65 | is(t1.querySelectorAll("frameset")[0].getAttribute("cols"), "11%,89%", |
michael@0 | 66 | "The cols attribute should be correctly updated"); |
michael@0 | 67 | is(t1.querySelectorAll("frameset")[1].getAttribute("rows"), "100,200", |
michael@0 | 68 | "The rows attribute should be correctly updated"); |
michael@0 | 69 | SimpleTest.finish(); |
michael@0 | 70 | }, 0); |
michael@0 | 71 | }, 0); |
michael@0 | 72 | }, 0); |
michael@0 | 73 | }); |
michael@0 | 74 | |
michael@0 | 75 | </script> |
michael@0 | 76 | </pre> |
michael@0 | 77 | </body> |
michael@0 | 78 | </html> |