Backed out changeset 04bfd88f4fb8 (bug 1008126)
authorCarsten "Tomcat" Book <cbook@mozilla.com>
Fri, 06 Jun 2014 12:08:20 +0200
changeset 206301 c0df4d901b8e59628e74acf707ba1d84b8c12458
parent 206300 e9d959645b8f63abbd97761db50b99da8087aee1
child 206302 52d75fbe02802458ef23eafd8d2f38d269df9a93
push id3741
push userasasaki@mozilla.com
push dateMon, 21 Jul 2014 20:25:18 +0000
treeherdermozilla-beta@4d6f46f5af68 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1008126
milestone32.0a1
backs out04bfd88f4fb8051ddeb9053a19f01a6a86c956b9
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
Backed out changeset 04bfd88f4fb8 (bug 1008126)
content/base/test/file_bug1008126_worker.js
content/base/test/mochitest.ini
content/base/test/test_bug1008126.html
deleted file mode 100644
--- a/content/base/test/file_bug1008126_worker.js
+++ /dev/null
@@ -1,162 +0,0 @@
-/**
- * Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/
- */
-
-var gJar1 = "jar:http://example.org/tests/content/base/test/file_bug945152.jar!/data_1.txt";
-var gJar2 = "jar:http://example.org/tests/content/base/test/file_bug945152.jar!/data_2.txt";
-var gPaddingChar = ".";
-var gPaddingSize = 10000;
-var gPadding = "";
-for (var i = 0; i < gPaddingSize; i++) {
-  gPadding += gPaddingChar;
-}
-var gData1 = "TEST_DATA_1:ABCDEFGHIJKLMNOPQRSTUVWXYZ" + gPadding;
-var gData2 = "TEST_DATA_2:1234567890" + gPadding;
-
-function ok(a, msg) {
-  postMessage({type: "status", status: !!a, msg: msg });
-}
-
-function is(a, b, msg) {
-  postMessage({type: "status", status: a === b, msg: msg });
-}
-
-function checkData(xhr, data, mapped, cb) {
-  var ct = xhr.getResponseHeader("Content-Type");
-  if (mapped) {
-    ok(ct.indexOf("mem-mapped") != -1, "Data is memory-mapped");
-  } else {
-    ok(ct.indexOf("mem-mapped") == -1, "Data is not memory-mapped");
-  }
-  ok(xhr.response, "Data is non-null");
-  var str = String.fromCharCode.apply(null, Uint8Array(xhr.response));
-  ok(str == data, "Data is correct");
-  cb();
-}
-
-self.onmessage = function onmessage(event) {
-
-  var xhr = new XMLHttpRequest({mozAnon: true, mozSystem: true});
-
-  function reset_event_hander() {
-    xhr.onerror = function(e) {
-      ok(false, "Error: " + e.error + "\n");
-    };
-    xhr.onprogress = null;
-    xhr.onreadystatechange = null;
-    xhr.onload = null;
-    xhr.onloadend = null;
-  }
-
-  function test_chunked_arraybuffer() {
-    ok(true, "Test chunked arraybuffer");
-
-    var lastIndex = 0;
-    xhr.onprogress = function(event) {
-      if (xhr.response) {
-        var str = String.fromCharCode.apply(null, Uint8Array(xhr.response));
-        ok(str.length == gData1.length, "Data size is correct");
-        ok(str == gData1.substr(lastIndex, str.length), "Data chunk is correct");
-      }
-      lastIndex += str.length;
-    };
-    xhr.onload = runTests;
-    xhr.open("GET", gJar1, true);
-    xhr.responseType = "moz-chunked-arraybuffer";
-    xhr.send();
-  }
-
-  var readystatechangeCount = 0;
-  var loadCount = 0;
-  var loadendCount = 0;
-
-  function checkEventCount(cb) {
-    ok(readystatechangeCount == 1 && loadCount == 1 && loadendCount == 1,
-       "Saw all expected events");
-    cb();
-  }
-
-  function test_multiple_events() {
-    ok(true, "Test multiple events");
-    xhr.abort();
-
-    xhr.onreadystatechange = function() {
-      if (xhr.readyState == xhr.DONE) {
-        readystatechangeCount++;
-        checkData(xhr, gData2, false, function() {} );
-      }
-    };
-    xhr.onload = function() {
-      loadCount++;
-      checkData(xhr, gData2, false, function() {} );
-    };
-    xhr.onloadend = function() {
-      loadendCount++;
-      checkData(xhr, gData2, false, function() {} );
-    };
-    xhr.open("GET", gJar2, false);
-    xhr.responseType = "arraybuffer";
-    xhr.send();
-    checkEventCount(runTests);
-  }
-
-  function test_sync_xhr_data1() {
-    ok(true, "Test sync XHR with data1");
-    xhr.open("GET", gJar1, false);
-    xhr.responseType = "arraybuffer";
-    xhr.send();
-    checkData(xhr, gData1, true, runTests);
-  }
-
-  function test_sync_xhr_data2() {
-    ok(true, "Test sync XHR with data2");
-    xhr.open("GET", gJar2, false);
-    xhr.responseType = "arraybuffer";
-    xhr.send();
-    checkData(xhr, gData2, false, runTests);
-  }
-
-  function test_async_xhr_data1() {
-    ok(true, "Test async XHR with data1");
-    xhr.onload = function() {
-      checkData(xhr, gData1, true, runTests);
-    };
-    xhr.open("GET", gJar1, true);
-    xhr.responseType = "arraybuffer";
-    xhr.send();
-  }
-
-  function test_async_xhr_data2() {
-    ok(true, "Test async XHR with data2");
-    xhr.onload = function() {
-      checkData(xhr, gData2, false, runTests);
-    };
-    xhr.open("GET", gJar2, true);
-    xhr.responseType = "arraybuffer";
-    xhr.send();
-  }
-
-  var tests = [
-    test_chunked_arraybuffer,
-    test_multiple_events,
-    test_sync_xhr_data1,
-    test_sync_xhr_data2,
-    test_async_xhr_data1,
-    test_async_xhr_data2
-  ];
-
-  function runTests() {
-    if (!tests.length) {
-      postMessage({type: "finish" });
-      return;
-    }
-
-    reset_event_hander();
-
-    var test = tests.shift();
-    test();
-  }
-
-  runTests();
-};
--- a/content/base/test/mochitest.ini
+++ b/content/base/test/mochitest.ini
@@ -137,17 +137,16 @@ support-files =
   file_bug804395.jar
   file_bug869432.eventsource
   file_bug869432.eventsource^headers^
   file_bug902350.html
   file_bug902350_frame.html
   file_bug907892.html
   file_bug945152.jar
   file_bug945152_worker.js
-  file_bug1008126_worker.js
   file_general_document.html
   file_html_in_xhr.html
   file_html_in_xhr.sjs
   file_html_in_xhr2.html
   file_html_in_xhr3.html
   file_htmlserializer_1.html
   file_htmlserializer_1_bodyonly.html
   file_htmlserializer_1_format.html
@@ -551,18 +550,16 @@ skip-if = buildapp == 'b2g' || toolkit =
 [test_bug895239.html]
 [test_bug895974.html]
 [test_bug902847.html]
 [test_bug907892.html]
 [test_bug922681.html]
 [test_bug927196.html]
 [test_bug945152.html]
 run-if = os == 'linux'
-[test_bug1008126.html]
-run-if = os == 'linux'
 [test_caretPositionFromPoint.html]
 [test_classList.html]
 # This test fails on the Mac for some reason
 [test_copyimage.html]
 skip-if = (buildapp == 'b2g' && toolkit != 'gonk') || toolkit != 'gtk2' && toolkit != 'gtk3' && toolkit != 'windows' || e10s #b2g-desktop(Bug 931116, b2g desktop specific, initial triage)
 [test_copypaste.html]
 skip-if = buildapp == 'b2g' || toolkit == 'android' || e10s #bug 904183 # b2g(clipboard undefined) b2g-debug(clipboard undefined) b2g-desktop(clipboard undefined)
 [test_copypaste.xhtml]
deleted file mode 100644
--- a/content/base/test/test_bug1008126.html
+++ /dev/null
@@ -1,56 +0,0 @@
-<!--
-2   Any copyright is dedicated to the Public Domain.
-3   http://creativecommons.org/publicdomain/zero/1.0/
-4 -->
-<!DOCTYPE HTML>
-<html>
-<!--
-https://bugzilla.mozilla.org/show_bug.cgi?id=1008126
--->
-<head>
-  <meta charset="utf-8">
-  <title>Test for Bug 1008126</title>
-  <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.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=1008126">Mozilla Bug 1008126</a>
-<p id="display"></p>
-<div id="content" style="display: none">
-
-</div>
-<pre id="test">
-<script type="application/javascript">
-
-function runTest() {
-
-  var worker = new Worker("file_bug1008126_worker.js");
-
-  worker.onmessage = function(event) {
-    if (event.data.type == 'finish') {
-      SimpleTest.finish();
-    } else if (event.data.type == 'status') {
-      ok(event.data.status, event.data.msg);
-    }
-  };
-
-  worker.onerror = function(event) {
-    is(event.target, worker);
-    ok(false, "Worker had an error: " + event.message);
-    SimpleTest.finish();
-  };
-
-  worker.postMessage(true);
-}
-
-SimpleTest.waitForExplicitFinish();
-
-addLoadEvent(function() {
-   SpecialPowers.pushPrefEnv({"set": [["dom.mapped_arraybuffer.enabled", true]]}, function() {
-     SpecialPowers.pushPermissions([{'type': 'systemXHR', 'allow': true, 'context': document}], runTest);
-   });
-});
-</script>
-</pre>
-</body>
-</html>