diff options
Diffstat (limited to 'testing/web-platform/tests/html/editing')
13 files changed, 42 insertions, 63 deletions
diff --git a/testing/web-platform/tests/html/editing/dnd/events/drag-event-div-manual.html b/testing/web-platform/tests/html/editing/dnd/events/drag-event-div-manual.html index 79c0c4332d..505b0049be 100644 --- a/testing/web-platform/tests/html/editing/dnd/events/drag-event-div-manual.html +++ b/testing/web-platform/tests/html/editing/dnd/events/drag-event-div-manual.html @@ -6,7 +6,6 @@ <link rel="author" title="Microsoft" href="http://www.microsoft.com/"/> <link rel="help" href="http://dev.w3.org/html5/spec/dnd.html#drag-and-drop-processing-model"/> <meta name="assert" content="Fire drag event when dragging a div element"/> - <script src="../resources/dragdrop_support.js" type="text/javascript"></script> <script type="text/javascript"> var EVENT, TARGET; @@ -14,11 +13,11 @@ { if ((TARGET == evt.target) && (EVENT == evt.type)) { - LogTestResult("PASS"); + document.getElementById("test_result").firstChild.data = "PASS"; } else { - LogTestResult("FAIL"); + document.getElementById("test_result").firstChild.data = "FAIL"; } } @@ -27,7 +26,7 @@ window.onload = function() { TARGET = document.getElementById("target"); - AddEventListenersForElement(EVENT, DragEvent, false, TARGET); + TARGET.addEventListener(EVENT, DragEvent, false); } </script> </head> diff --git a/testing/web-platform/tests/html/editing/dnd/events/drag-event-manual.html b/testing/web-platform/tests/html/editing/dnd/events/drag-event-manual.html index d278b864bb..d3f517ea1d 100644 --- a/testing/web-platform/tests/html/editing/dnd/events/drag-event-manual.html +++ b/testing/web-platform/tests/html/editing/dnd/events/drag-event-manual.html @@ -6,7 +6,6 @@ <link rel="author" title="Microsoft" href="http://www.microsoft.com/"/> <link rel="help" href="http://dev.w3.org/html5/spec/dnd.html#drag-and-drop-processing-model"/> <meta name="assert" content="Fire drag event during the drag and drop processing"/> - <script src="../resources/dragdrop_support.js" type="text/javascript"></script> <script type="text/javascript"> var EVENT, TARGET; @@ -14,11 +13,11 @@ { if ((TARGET == evt.target) && (EVENT == evt.type)) { - LogTestResult("PASS"); + document.getElementById("test_result").firstChild.data = "PASS"; } else { - LogTestResult("FAIL"); + document.getElementById("test_result").firstChild.data = "FAIL"; } } @@ -27,7 +26,7 @@ window.onload = function() { TARGET = document.getElementById("target"); - AddEventListenersForElement(EVENT, DragEvent, false, TARGET); + TARGET.addEventListener(EVENT, DragEvent, false); } </script> </head> diff --git a/testing/web-platform/tests/html/editing/dnd/events/dragend-event-manual.html b/testing/web-platform/tests/html/editing/dnd/events/dragend-event-manual.html index 8bfb1fb7b6..b4bb621e88 100644 --- a/testing/web-platform/tests/html/editing/dnd/events/dragend-event-manual.html +++ b/testing/web-platform/tests/html/editing/dnd/events/dragend-event-manual.html @@ -6,7 +6,6 @@ <link rel="author" title="Microsoft" href="http://www.microsoft.com/"/> <link rel="help" href="http://dev.w3.org/html5/spec/dnd.html#drag-and-drop-processing-model"/> <meta name="assert" content="Fire dragend event during the drag and drop processing"/> - <script src="../resources/dragdrop_support.js" type="text/javascript"></script> <script type="text/javascript"> var EVENT, TARGET; @@ -14,11 +13,11 @@ { if ((TARGET == evt.target) && (EVENT == evt.type)) { - LogTestResult("PASS"); + document.getElementById("test_result").firstChild.data = "PASS"; } else { - LogTestResult("FAIL"); + document.getElementById("test_result").firstChild.data = "FAIL"; } } @@ -27,7 +26,7 @@ window.onload = function() { TARGET = document.getElementById("target"); - AddEventListenersForElement(EVENT, DragendEvent, false, TARGET); + TARGET.addEventListener(EVENT, DragendEvent, false); } </script> </head> diff --git a/testing/web-platform/tests/html/editing/dnd/events/dragenter-event-manual.html b/testing/web-platform/tests/html/editing/dnd/events/dragenter-event-manual.html index e81b32949c..23b404b0b1 100644 --- a/testing/web-platform/tests/html/editing/dnd/events/dragenter-event-manual.html +++ b/testing/web-platform/tests/html/editing/dnd/events/dragenter-event-manual.html @@ -6,7 +6,6 @@ <link rel="author" title="Microsoft" href="http://www.microsoft.com/"/> <link rel="help" href="http://dev.w3.org/html5/spec/dnd.html#drag-and-drop-processing-model"/> <meta name="assert" content="Fire dragenter event during the drag and drop processing"/> - <script src="../resources/dragdrop_support.js" type="text/javascript"></script> <script type="text/javascript"> var EVENT, TARGET; @@ -14,11 +13,11 @@ { if ((TARGET == evt.target) && (EVENT == evt.type)) { - LogTestResult("PASS"); + document.getElementById("test_result").firstChild.data = "PASS"; } else { - LogTestResult("FAIL"); + document.getElementById("test_result").firstChild.data = "FAIL"; } } @@ -27,7 +26,7 @@ window.onload = function() { TARGET = document.getElementById("target"); - AddEventListenersForElement(EVENT, DragenterEvent, false, TARGET); + TARGET.addEventListener(EVENT, DragenterEvent, false); } </script> </head> diff --git a/testing/web-platform/tests/html/editing/dnd/events/dragleave-event-manual.html b/testing/web-platform/tests/html/editing/dnd/events/dragleave-event-manual.html index f6a405915f..a400fa3417 100644 --- a/testing/web-platform/tests/html/editing/dnd/events/dragleave-event-manual.html +++ b/testing/web-platform/tests/html/editing/dnd/events/dragleave-event-manual.html @@ -6,7 +6,6 @@ <link rel="author" title="Microsoft" href="http://www.microsoft.com/"/> <link rel="help" href="http://dev.w3.org/html5/spec/dnd.html#drag-and-drop-processing-model"/> <meta name="assert" content="Fire dragleave event during the drag and drop processing"/> - <script src="../resources/dragdrop_support.js" type="text/javascript"></script> <script type="text/javascript"> var EVENT, TARGET; @@ -14,11 +13,11 @@ { if ((TARGET == evt.target) && (EVENT == evt.type)) { - LogTestResult("PASS"); + document.getElementById("test_result").firstChild.data = "PASS"; } else { - LogTestResult("FAIL"); + document.getElementById("test_result").firstChild.data = "FAIL"; } } @@ -27,7 +26,7 @@ window.onload = function() { TARGET = document.getElementById("target"); - AddEventListenersForElement(EVENT, DragleaveEvent, false, TARGET); + TARGET.addEventListener(EVENT, DragleaveEvent, false); } </script> </head> diff --git a/testing/web-platform/tests/html/editing/dnd/events/dragover-event-manual.html b/testing/web-platform/tests/html/editing/dnd/events/dragover-event-manual.html index f8d99241d5..f37a33cff6 100644 --- a/testing/web-platform/tests/html/editing/dnd/events/dragover-event-manual.html +++ b/testing/web-platform/tests/html/editing/dnd/events/dragover-event-manual.html @@ -6,7 +6,6 @@ <link rel="author" title="Microsoft" href="http://www.microsoft.com/"/> <link rel="help" href="http://dev.w3.org/html5/spec/dnd.html#drag-and-drop-processing-model"/> <meta name="assert" content="Fire dragover event during the drag and drop processing"/> - <script src="../resources/dragdrop_support.js" type="text/javascript"></script> <script type="text/javascript"> var EVENT, TARGET; @@ -14,11 +13,11 @@ { if ((TARGET == evt.target) && (EVENT == evt.type)) { - LogTestResult("PASS"); + document.getElementById("test_result").firstChild.data = "PASS"; } else { - LogTestResult("FAIL"); + document.getElementById("test_result").firstChild.data = "FAIL"; } } @@ -27,7 +26,7 @@ window.onload = function() { TARGET = document.getElementById("target"); - AddEventListenersForElement(EVENT, DragoverEvent, false, TARGET); + TARGET.addEventListener(EVENT, DragoverEvent, false); } </script> </head> diff --git a/testing/web-platform/tests/html/editing/dnd/events/dragstart-event-manual.html b/testing/web-platform/tests/html/editing/dnd/events/dragstart-event-manual.html index 20786648da..9128401ffa 100644 --- a/testing/web-platform/tests/html/editing/dnd/events/dragstart-event-manual.html +++ b/testing/web-platform/tests/html/editing/dnd/events/dragstart-event-manual.html @@ -6,7 +6,6 @@ <link rel="author" title="Microsoft" href="http://www.microsoft.com/"/> <link rel="help" href="http://dev.w3.org/html5/spec/dnd.html#drag-and-drop-processing-model"/> <meta name="assert" content="Fire dragstart event during the drag and drop processing"/> - <script src="../resources/dragdrop_support.js" type="text/javascript"></script> <script type="text/javascript"> var EVENT, TARGET; @@ -14,11 +13,11 @@ { if ((TARGET == evt.target) && (EVENT == evt.type)) { - LogTestResult("PASS"); + document.getElementById("test_result").firstChild.data = "PASS"; } else { - LogTestResult("FAIL"); + document.getElementById("test_result").firstChild.data = "FAIL"; } } @@ -27,7 +26,7 @@ window.onload = function() { TARGET = document.getElementById("target"); - AddEventListenersForElement(EVENT, DragstartEvent, false, TARGET); + TARGET.addEventListener(EVENT, DragstartEvent, false); } </script> </head> diff --git a/testing/web-platform/tests/html/editing/dnd/events/drop-event-manual.html b/testing/web-platform/tests/html/editing/dnd/events/drop-event-manual.html index 2897bd5713..8393e38696 100644 --- a/testing/web-platform/tests/html/editing/dnd/events/drop-event-manual.html +++ b/testing/web-platform/tests/html/editing/dnd/events/drop-event-manual.html @@ -6,7 +6,6 @@ <link rel="author" title="Microsoft" href="http://www.microsoft.com/"/> <link rel="help" href="http://dev.w3.org/html5/spec/dnd.html#drag-and-drop-processing-model"/> <meta name="assert" content="Fire drop event during the drag and drop processing"/> - <script src="../resources/dragdrop_support.js" type="text/javascript"></script> <script type="text/javascript"> var EVENT, TARGET; @@ -14,11 +13,11 @@ { if ((TARGET == evt.target) && (EVENT == evt.type)) { - LogTestResult("PASS"); + document.getElementById("test_result").firstChild.data = "PASS"; } else { - LogTestResult("FAIL"); + document.getElementById("test_result").firstChild.data = "FAIL"; } } @@ -27,7 +26,7 @@ window.onload = function() { TARGET = document.getElementById("target"); - AddEventListenersForElement(EVENT, DropEvent, false, TARGET); + TARGET.addEventListener(EVENT, DropEvent, false); } </script> </head> diff --git a/testing/web-platform/tests/html/editing/dnd/resources/dragdrop_support.js b/testing/web-platform/tests/html/editing/dnd/resources/dragdrop_support.js deleted file mode 100644 index f5a1d6417f..0000000000 --- a/testing/web-platform/tests/html/editing/dnd/resources/dragdrop_support.js +++ /dev/null @@ -1,9 +0,0 @@ -function AddEventListenersForElement(evt, callback, capture, element) -{ - element.addEventListener(evt, callback, capture); -} - -function LogTestResult(result) -{ - document.getElementById("test_result").firstChild.data = result; -} diff --git a/testing/web-platform/tests/html/editing/dnd/the-datatransfer-interface/effectAllowed-manual.html b/testing/web-platform/tests/html/editing/dnd/the-datatransfer-interface/effectAllowed-manual.html index 08540b906a..61443da2c0 100644 --- a/testing/web-platform/tests/html/editing/dnd/the-datatransfer-interface/effectAllowed-manual.html +++ b/testing/web-platform/tests/html/editing/dnd/the-datatransfer-interface/effectAllowed-manual.html @@ -6,7 +6,6 @@ <link rel="author" title="Microsoft" href="http://www.microsoft.com/"/> <link rel="help" href="http://dev.w3.org/html5/spec/dnd.html#datatransfer"/> <meta name="assert" content="Set a value to effectAllowed attribute"/> - <script src="../resources/dragdrop_support.js" type="text/javascript"></script> <script type="text/javascript"> var TARGETEVENT1, TARGETEVENT2, TARGET1, TARGET2; @@ -23,11 +22,11 @@ { if("move" == evt.dataTransfer.effectAllowed) { - LogTestResult("PASS"); + document.getElementById("test_result").firstChild.data = "PASS"; } else { - LogTestResult("FAIL"); + document.getElementById("test_result").firstChild.data = "FAIL"; } } } @@ -39,8 +38,8 @@ { TARGET1 = document.getElementById("target1"); TARGET2 = document.getElementById("target2"); - AddEventListenersForElement(TARGETEVENT1, DragstartEvent, false, TARGET1); - AddEventListenersForElement(TARGETEVENT2, DragenterEvent, false, TARGET2); + TARGET1.addEventListener(TARGETEVENT1, DragstartEvent, false); + TARGET2.addEventListener(TARGETEVENT2, DragenterEvent, false); } </script> </head> diff --git a/testing/web-platform/tests/html/editing/dnd/the-datatransfer-interface/files-manual.html b/testing/web-platform/tests/html/editing/dnd/the-datatransfer-interface/files-manual.html index 7de0b4bbce..ffafb66db4 100644 --- a/testing/web-platform/tests/html/editing/dnd/the-datatransfer-interface/files-manual.html +++ b/testing/web-platform/tests/html/editing/dnd/the-datatransfer-interface/files-manual.html @@ -6,7 +6,6 @@ <link rel="author" title="Microsoft" href="http://www.microsoft.com/"/> <link rel="help" href="http://dev.w3.org/html5/spec/dnd.html#datatransfer"/> <meta name="assert" content="files attribute returns a FileList"/> - <script src="../resources/dragdrop_support.js" type="text/javascript"></script> <script type="text/javascript"> var EVENT, TARGET; @@ -17,16 +16,16 @@ var files = evt.dataTransfer.files; if(('[object FileList]' == files)) { - LogTestResult("PASS"); + document.getElementById("test_result").firstChild.data = "PASS"; } else { - LogTestResult("FAIL"); + document.getElementById("test_result").firstChild.data = "FAIL"; } } else { - LogTestResult("FAIL"); + document.getElementById("test_result").firstChild.data = "FAIL"; } } @@ -45,9 +44,9 @@ window.onload = function() { TARGET = document.getElementById("target"); - AddEventListenersForElement(EVENT, DropEvent, false, TARGET); - AddEventListenersForElement("dragenter", DragenterEvent, false, TARGET); - AddEventListenersForElement("dragover", DragoverEvent, false, TARGET); + TARGET.addEventListener(EVENT, DropEvent, false); + TARGET.addEventListener("dragenter", DragenterEvent, false); + TARGET.addEventListener("dragover", DragoverEvent, false); } </script> </head> diff --git a/testing/web-platform/tests/html/editing/dnd/the-datatransfer-interface/setData-manual.html b/testing/web-platform/tests/html/editing/dnd/the-datatransfer-interface/setData-manual.html index f0f7cae600..1438e932ad 100644 --- a/testing/web-platform/tests/html/editing/dnd/the-datatransfer-interface/setData-manual.html +++ b/testing/web-platform/tests/html/editing/dnd/the-datatransfer-interface/setData-manual.html @@ -6,7 +6,6 @@ <link rel="author" title="Microsoft" href="http://www.microsoft.com/"/> <link rel="help" href="http://dev.w3.org/html5/spec/dnd.html#datatransfer"/> <meta name="assert" content="Add an item to the drag data store item list whose data is the string given by setData method's second argument"/> - <script src="../resources/dragdrop_support.js" type="text/javascript"></script> <script type="text/javascript"> var TARGETEVENT1, TARGETEVENT2, TARGET1, TARGET2; @@ -23,11 +22,11 @@ { if("SetText" == evt.dataTransfer.getData("text")) { - LogTestResult("PASS"); + document.getElementById("test_result").firstChild.data = "PASS"; } else { - LogTestResult("FAIL"); + document.getElementById("test_result").firstChild.data = "FAIL"; } } } @@ -39,8 +38,8 @@ { TARGET1 = document.getElementById("target1"); TARGET2 = document.getElementById("target2"); - AddEventListenersForElement(TARGETEVENT1, DragstartEvent, false, TARGET1); - AddEventListenersForElement(TARGETEVENT2, DropEvent, false, TARGET2); + TARGET1.addEventListener(TARGETEVENT1, DragstartEvent, false); + TARGET2.addEventListener(TARGETEVENT2, DropEvent, false); } </script> </head> diff --git a/testing/web-platform/tests/html/editing/dnd/the-datatransfer-interface/types-manual.html b/testing/web-platform/tests/html/editing/dnd/the-datatransfer-interface/types-manual.html index 1730c4bc73..3aa1404e29 100644 --- a/testing/web-platform/tests/html/editing/dnd/the-datatransfer-interface/types-manual.html +++ b/testing/web-platform/tests/html/editing/dnd/the-datatransfer-interface/types-manual.html @@ -6,7 +6,6 @@ <link rel="author" title="Microsoft" href="http://www.microsoft.com/"/> <link rel="help" href="http://dev.w3.org/html5/spec/dnd.html#datatransfer"/> <meta name="assert" content="types attribute returns a DOMStringList"/> - <script src="../resources/dragdrop_support.js" type="text/javascript"></script> <script type="text/javascript"> var EVENT, TARGET; @@ -17,16 +16,16 @@ var types = evt.dataTransfer.types; if(('[object DOMStringList]' == types)) { - LogTestResult("PASS"); + document.getElementById("test_result").firstChild.data = "PASS"; } else { - LogTestResult("FAIL"); + document.getElementById("test_result").firstChild.data = "FAIL"; } } else { - LogTestResult("FAIL"); + document.getElementById("test_result").firstChild.data = "FAIL"; } } @@ -35,7 +34,7 @@ window.onload = function() { TARGET = document.getElementById("target"); - AddEventListenersForElement(EVENT, DropEvent, false, TARGET); + TARGET.addEventListener(EVENT, DropEvent, false); } </script> </head> |