Editing tests should use testRunner instead of layoutTestController
[WebKit-https.git] / LayoutTests / platform / mac / editing / deleting / resources / deletionUI-helpers.js
1 if (window.testRunner)
2     testRunner.dumpAsText();
3
4 function debug(msg)
5 {
6     var span = document.createElement("span");
7     document.getElementById("console").appendChild(span); // insert it first so XHTML knows the namespace
8     span.innerHTML = msg + '<br />';
9 }
10
11 function deletionUIDeleteButtonForElement(id)
12 {
13     var sel = window.getSelection();
14     var selElement = document.getElementById(id);
15     sel.setPosition(selElement, 0);
16     var deleteButton = document.getElementById("WebKit-Editing-Delete-Button");
17     return deleteButton;
18 }
19
20 function determineDeletionUIExistence(id)
21 {
22     var deleteButton = deletionUIDeleteButtonForElement(id);
23     debug(id + (deleteButton ? " HAS " : " has NO ") + "deletion UI");
24 }