Bug 1305230 - removing fileutils.js from tests when not needed, r=qdot
☠☠ backed out by 2f665a0a379f ☠ ☠
authorAndrea Marchesini <amarchesini@mozilla.com>
Fri, 13 Oct 2017 08:47:42 +0200
changeset 386125 f442143b5b90f10b362a8c09137ad7b794465b31
parent 386124 856c3889f319b81a38da582967e4a561376f1821
child 386126 e6afe93a22826c75f028ebe252cdc0907905fa5e
push id32676
push userarchaeopteryx@coole-files.de
push dateFri, 13 Oct 2017 21:38:18 +0000
treeherdermozilla-central@a31334a65a1c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersqdot
bugs1305230
milestone58.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1305230 - removing fileutils.js from tests when not needed, r=qdot
dom/file/tests/test_file_negative_date.html
dom/file/tests/test_fileapi_slice.html
dom/file/tests/test_nonascii_blob_url.html
--- a/dom/file/tests/test_file_negative_date.html
+++ b/dom/file/tests/test_file_negative_date.html
@@ -2,38 +2,32 @@
 <html>
 <!--
 https://bugzilla.mozilla.org/show_bug.cgi?id=1158437
 -->
 <head>
   <title>Test for negative date in File (Bug 1158437)</title>
   <script type="text/javascript" src="/MochiKit/MochiKit.js"></script>
   <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
-  <script type="text/javascript" src="fileutils.js"></script>
   <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
 </head>
 <body>
 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1158437">Mozilla Bug 1158437</a>
-<p id="display"></p>
-<div id="content" style="display: none">
 
-</div>
-<pre id="test">
 <script class="testbody" type="text/javascript">
 "use strict";
 
 var blob = new Blob(['hello world']);
 var f1 = new File([blob], 'f1.txt', { lastModified: 0 });
 var f2 = new File([blob], 'f2.txt', { lastModified: -1 });
 var f3 = new File([blob], 'f3.txt', { lastModified: -1000 });
 
 is(f1.lastModified, 0, "lastModified == 0 is supported");
 ok(f1.lastModifiedDate.toString(), (new Date(0)).toString(), "Correct f1.lastModifiedDate value");
 is(f2.lastModified, -1, "lastModified == -1 is supported");
 ok(f2.lastModifiedDate.toString(), (new Date(-1)).toString(), "Correct f2.lastModifiedDate value");
 is(f3.lastModified, -1000, "lastModified == -1000 is supported");
 ok(f3.lastModifiedDate.toString(), (new Date(-1000)).toString(), "Correct f3.lastModifiedDate value");
 
 </script>
-</pre>
 </body>
 </html>
 
--- a/dom/file/tests/test_fileapi_slice.html
+++ b/dom/file/tests/test_fileapi_slice.html
@@ -12,22 +12,19 @@ https://bugzilla.mozilla.org/show_bug.cg
 
 <body>
 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=575946">Mozilla Bug 575946</a>
 <p id="display">
   <canvas id=canvas width=1100 height=1100 hidden moz-opaque></canvas>
   <canvas id=testcanvas hidden moz-opaque></canvas>
   <input id="fileList" type="file"></input>
 </p>
-<div id="content" style="display: none">
-</div>
 
-<pre id="test">
 <script class="testbody" type="text/javascript">
-var fileNum = 1;
+
 SimpleTest.waitForExplicitFinish();
 
 // Create files containing data we'll test with. We'll want long
 // strings to ensure they span multiple buffers while loading
 
 // Create a decent-sized image
 cx = $("canvas").getContext('2d');
 var s = cx.canvas.width;
@@ -157,11 +154,10 @@ function imagePastEndTest(files) {
   is(imgfile.size, size + testBinaryData.length, "correct file size (past end)");
   var img = new Image;
   img.src = URL.createObjectURL(imgfile.slice(testBinaryData.length, testBinaryData.length + size + 1000));
   img.onload = imageLoadHandler;
   expectedTestCount++;
 }
 
 </script>
-</pre>
 </body>
 </html>
--- a/dom/file/tests/test_nonascii_blob_url.html
+++ b/dom/file/tests/test_nonascii_blob_url.html
@@ -1,15 +1,14 @@
 <!DOCTYPE HTML>
 <html>
 <head>
   <title>Test blob URL for non-ascii domain</title>
   <script type="text/javascript" src="/MochiKit/MochiKit.js"></script>
   <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
-  <script type="text/javascript" src="fileutils.js"></script>
   <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
 </head>
 <body>
 <div id="content"></div>
 <script class="testbody" type="text/javascript">
 
 var iframe = document.createElement('iframe');
 iframe.src = 'http://xn--exmple-cua.test/tests/dom/file/tests/file_nonascii_blob_url.html';
@@ -20,11 +19,10 @@ iframe.onload = function() {
     SimpleTest.finish();
   }
 }
 
 document.getElementById('content').appendChild(iframe);
 SimpleTest.waitForExplicitFinish();
 
 </script>
-</pre>
 </body>
 </html>