Bug 1347508 - Fix duplicate test names in selection test, r=AutomatedTester draft
authorJames Graham <james@hoppipolla.co.uk>
Mon, 13 Mar 2017 18:01:53 +0000
changeset 499217 1bf5fa9e49de11374ecfb20b0f39324a6909a026
parent 499216 f13fc978c3e2f40aa7c184658ed697bf43de8e2e
child 499218 c1a38cdde4818a8facfa47db2be3bed93002999d
push id49335
push userbmo:james@hoppipolla.co.uk
push dateWed, 15 Mar 2017 12:03:22 +0000
reviewersAutomatedTester
bugs1347508
milestone55.0a1
Bug 1347508 - Fix duplicate test names in selection test, r=AutomatedTester MozReview-Commit-ID: 8ZyMh9j3xaL
testing/web-platform/meta/MANIFEST.json
testing/web-platform/tests/html/semantics/forms/textfieldselection/selection-start-end.html
--- a/testing/web-platform/meta/MANIFEST.json
+++ b/testing/web-platform/meta/MANIFEST.json
@@ -178329,17 +178329,17 @@
    "629f3682421060ea18e9046a637402212be1b1fd",
    "testharness"
   ],
   "html/semantics/forms/textfieldselection/selection-not-application.html": [
    "3763f117f8973ca9a994354ccbf22cb7114ece7a",
    "testharness"
   ],
   "html/semantics/forms/textfieldselection/selection-start-end.html": [
-   "755fb11ec3d9440d3883ec3e2820a9e77fc144ae",
+   "e88c9bed7a83098ecd4733b2f0ee364dcf92948c",
    "testharness"
   ],
   "html/semantics/forms/textfieldselection/selection.html": [
    "7f3969423e86313ec20846c84f8deecc95048b82",
    "testharness"
   ],
   "html/semantics/forms/textfieldselection/textfieldselection-setRangeText.html": [
    "f824af3b23cc1d0412783dbcbcbdee818a501d56",
--- a/testing/web-platform/tests/html/semantics/forms/textfieldselection/selection-start-end.html
+++ b/testing/web-platform/tests/html/semantics/forms/textfieldselection/selection-start-end.html
@@ -1,46 +1,46 @@
 <!doctype html>
 <meta charset=utf-8>
 <title></title>
 <script src=/resources/testharness.js></script>
 <script src=/resources/testharnessreport.js></script>
 <div id=log></div>
 <script>
-  function createInputElement(value, append) {
+  function createInputElement(value, append, suffix) {
     var el = document.createElement("input");
     el.type = "text";
     el.value = value;
-    el.id = "input" + (append ? "-appended" : "-not-appended");
+    el.id = "input" + (append ? "-appended" : "-not-appended") + (suffix ? suffix : "");
     if (append) {
       document.body.appendChild(el);
     }
     return el;
   };
 
-  function createTextareaElement(value, append) {
+  function createTextareaElement(value, append, suffix) {
     var el = document.createElement("textarea");
     el.value = value;
 
-    el.id = "textarea" + (append ? "-appended" : "-not-appended");
+    el.id = "textarea" + (append ? "-appended" : "-not-appended") + (suffix ? suffix : "");
     if (append) {
       document.body.appendChild(el);
     }
     return el;
   };
 
   function createPrefocusedInputElement(value, append) {
-    var el = createInputElement(value, append);
+    var el = createInputElement(value, append, "-prefocused");
     el.focus();
     el.blur();
     return el;
   }
 
   function createPrefocusedTextareaElement(value, append) {
-    var el = createTextareaElement(value, append);
+    var el = createTextareaElement(value, append, "-prefocused");
     el.focus();
     el.blur();
     return el;
   }
 
   function createTestElements(value) {
     return [ createInputElement(value, true),
              createInputElement(value, false),
@@ -48,17 +48,17 @@
              createPrefocusedInputElement(value, false),
              createTextareaElement(value, true),
              createTextareaElement(value, false),
              createPrefocusedTextareaElement(value, true),
              createPrefocusedTextareaElement(value, false),
            ];
   }
 
-  const testValue = "abcdefghij";
+  var testValue = "abcdefghij";
 
   test(function() {
     assert_equals(testValue.length, 10);
   }, "Sanity check for testValue length; if this fails, variou absolute offsets in the test below need to be adjusted to be less than testValue.length");
 
   test(function() {
     for (let el of createTestElements(testValue)) {
       assert_equals(el.selectionStart, testValue.length,