Bug 1274596 - Fixing tests for HTMLInputElement.value + fakepath, r=me
authorAndrea Marchesini <amarchesini@mozilla.com>
Tue, 17 Jan 2017 12:42:30 +0100
changeset 357680 1c613cebdbb35323a672b18fc6125b34fea47746
parent 357679 7b434711753b98a87603453caaa0945791ffe12b
child 357681 6a23526fe5168087d7e4132c0705aefcaed5f571
child 357714 b3e49a7ecc2c1b8f45e30445a7b18f943b27f8ff
push id10621
push userjlund@mozilla.com
push dateMon, 23 Jan 2017 16:02:43 +0000
treeherdermozilla-aurora@dca7b42e6c67 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersme
bugs1274596
milestone53.0a1
Bug 1274596 - Fixing tests for HTMLInputElement.value + fakepath, r=me
dom/html/test/test_bug143220.html
dom/html/test/test_bug523771.html
--- a/dom/html/test/test_bug143220.html
+++ b/dom/html/test/test_bug143220.html
@@ -48,18 +48,18 @@ function onFileOpened(message) {
     is(0, 1, "Should have thrown exception on set!");
   } catch(e) {
     is($("i1").value, "", "Shouldn't have value here");
   }
 
   initControl1();
   initControl2();
 
-  is($("i1").value, leafName, "Leaking full value?");
-  is($("i2").value, leafName, "Leaking full value?");
+  is($("i1").value, 'C:\\fakepath\\' + leafName, "Leaking full value?");
+  is($("i2").value, 'C:\\fakepath\\' + leafName, "Leaking full value?");
 
   helper.addMessageListener("file.removed", onFileRemoved);
   helper.sendAsyncMessage("file.remove", null);
 }
 
 function onFileRemoved() {
   helper.destroy();
   SimpleTest.finish();
--- a/dom/html/test/test_bug523771.html
+++ b/dom/html/test/test_bug523771.html
@@ -54,18 +54,18 @@ function cleanupFiles() {
 
 is(singleFileInput.files.length, 0, "single-file .files.length"); // bug 524421
 is(multiFileInput.files.length, 0, "multi-file .files.length"); // bug 524421
 
 setFileInputs();
 
 is(singleFileInput.multiple, false, "single-file input .multiple");
 is(multiFileInput.multiple, true, "multi-file input .multiple");
-is(singleFileInput.value, input1File.name, "single-file input .value");
-is(multiFileInput.value, input2Files[0].name, "multi-file input .value");
+is(singleFileInput.value, 'C:\\fakepath\\' + input1File.name, "single-file input .value");
+is(multiFileInput.value, 'C:\\fakepath\\' + input2Files[0].name, "multi-file input .value");
 is(singleFileInput.files[0].name, input1File.name, "single-file input .files[n].name");
 is(singleFileInput.files[0].size, input1File.body.length, "single-file input .files[n].size");
 is(singleFileInput.files[0].type, input1File.type, "single-file input .files[n].type");
 for(i = 0; i < input2Files.length; ++i) {
   is(multiFileInput.files[i].name, input2Files[i].name, "multi-file input .files[n].name");
   is(multiFileInput.files[i].size, input2Files[i].body.length, "multi-file input .files[n].size");
   is(multiFileInput.files[i].type, input2Files[i].type, "multi-file input .files[n].type");
 }