Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / editing / selection / focus-and-display-none.html
blob12a8cfd08802dfe118d81fc979dc2da8e8c77b05
1 <!DOCTYPE html>
2 <html>
3 <body onload="runTest()">
4 <script>
5 function focusAndSetDisplayNone() {
6 var ta = document.getElementById("ta");
7 ta.focus();
8 ta.style.display = "none";
11 function getPositionOfNode(id)
13 var n = document.getElementById(id);
14 var pos = {x: 0, y: 0};
16 while (n) {
17 pos.x += n.offsetLeft + n.clientLeft;
18 pos.y += n.offsetTop + n.clientTop;
19 n = n.offsetParent;
21 return pos;
24 function runTest() {
25 if (window.testRunner) {
26 testRunner.dumpAsText()
27 var pos = getPositionOfNode("clickTarget");
28 // Repeat the test for better reproducability
29 var i;
30 for (i=0; i<10; ++i) {
31 document.getElementById("ta").style.display="";
32 eventSender.mouseMoveTo(pos.x + 5, pos.y + 5);
33 eventSender.mouseDown();
34 eventSender.mouseUp();
38 </script>
39 <textarea id="ta">a</textarea>
40 <span onclick="focusAndSetDisplayNone()" id="clickTarget">Click me</span><br>
41 To run manually, click the 'Click me' text. Test passes if it does not crash.
42 </body>
43 </html>