It should be possible to open a page preview by clicking on it
[WebKit-https.git] / LayoutTests / platform / mac / editing / deleting / deletionUI-click-on-delete-button.html
1 <!DOCTYPE html>
2 <html>
3 <body>
4
5 <div id="test" contenteditable="true" style="padding: 1em;">
6 <ul class="needsDeletionUI"><li>1</li><li id="li">2</li></ul>
7 </div>
8
9 <script src="../../../../resources/dump-as-markup.js"></script>
10 <script>
11
12 sel = window.getSelection();
13 li = document.getElementById("li");
14 sel.setPosition(li, 0);
15
16 if (window.testRunner) {
17     deleteButton = internals.findEditingDeleteButton();
18     x = deleteButton.offsetParent.offsetLeft + deleteButton.offsetParent.offsetParent.offsetLeft + deleteButton.offsetLeft + deleteButton.offsetWidth / 2;
19     y = deleteButton.offsetParent.offsetTop + deleteButton.offsetParent.offsetParent.offsetTop + deleteButton.offsetTop + deleteButton.offsetHeight / 2;
20     eventSender.mouseMoveTo(x, y);
21     eventSender.mouseDown();
22     eventSender.mouseUp();
23     deleteButton = internals.findEditingDeleteButton();
24     testContainer = document.getElementById("test");
25     Markup.description("There should be no visible content in the markup below. This test is for a bug where the delete button wouldn't work because it had -webkit-user-select:none instead of -webkit-user-select:ignore.");
26     if (deleteButton)
27         testContainer.innerHTML += "FAIL";
28     Markup.dump("test");
29 }
30
31 </script>
32 </body>
33 </html>