merge backout
authorDão Gottwald <dao@mozilla.com>
Wed, 22 Feb 2012 14:02:37 +0100
changeset 88958 fa3472e10ca220ae47bf6a80fc977965634f8ad7
parent 88956 4720524d2eab068fc1a0491abcb5f51f104c3cab (current diff)
parent 88957 f506334d2f3fc1bd7d404e07d6b9ad804df00473 (diff)
child 88960 82d382c27135e932a17d4928c87f155a909c00b2
push idunknown
push userunknown
push dateunknown
milestone13.0a1
merge backout
modules/libjar/zipwriter/test/unit/data/test_bug717061.gz
modules/libjar/zipwriter/test/unit/data/test_bug717061.html
modules/libjar/zipwriter/test/unit/test_bug717061.js
deleted file mode 100644
deleted file mode 100644
--- a/modules/libjar/zipwriter/test/unit/data/test_bug717061.html
+++ /dev/null
@@ -1,16 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
-<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta http-equiv="Content-Language" content="en-us"><title>Lorem Ipsum</title><style type="text/css">
-body {
-	font-family: verdana, arial;
-	font-size: 10pt;
-	color: black;
-	background-color: #D0E8E8;
-}
-</style></head><body>
-<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
-
-<p>Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. Neque porro quisquam est, qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit, sed quia non numquam eius modi tempora incidunt ut labore et dolore magnam aliquam quaerat voluptatem. Ut enim ad minima veniam, quis nostrum exercitationem ullam corporis suscipit laboriosam, nisi ut aliquid ex ea commodi consequatur? Quis autem vel eum iure reprehenderit qui in ea voluptate velit esse quam nihil molestiae consequatur, vel illum qui dolorem eum fugiat quo voluptas nulla pariatur?</p>
-
-<p>At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium voluptatum deleniti atque corrupti quos dolores et quas molestias excepturi sint occaecati cupiditate non provident, similique sunt in culpa qui officia deserunt mollitia animi, id est laborum et dolorum fuga. Et harum quidem rerum facilis est et expedita distinctio. Nam libero tempore, cum soluta nobis est eligendi optio cumque nihil impedit quo minus id quod maxime placeat facere possimus, omnis voluptas assumenda est, omnis dolor repellendus. Temporibus autem quibusdam et aut officiis debitis aut rerum necessitatibus saepe eveniet ut et voluptates repudiandae sint et molestiae non recusandae. Itaque earum rerum hic tenetur a sapiente delectus, ut aut reiciendis voluptatibus maiores alias consequatur aut perferendis doloribus asperiores repellat.</p>
-
-</body></html>
deleted file mode 100644
--- a/modules/libjar/zipwriter/test/unit/test_bug717061.js
+++ /dev/null
@@ -1,85 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0
- */
-
-function BinaryComparer(file, callback) {
-  var fstream = Cc["@mozilla.org/network/file-input-stream;1"].
-                createInstance(Ci.nsIFileInputStream);
-  fstream.init(file, -1, 0, 0);
-  this.length = file.fileSize;
-  this.fileStream = Cc["@mozilla.org/binaryinputstream;1"].
-                    createInstance(Ci.nsIBinaryInputStream);
-  this.fileStream.setInputStream(fstream);
-  this.offset = 0;
-  this.callback = callback;
-}
-
-BinaryComparer.prototype = {
-  fileStream: null,
-  offset: null,
-  length: null,
-  callback: null,
-
-  onStartRequest: function(aRequest, aContext) {
-  },
-
-  onStopRequest: function(aRequest, aContext, aStatusCode) {
-    this.fileStream.close();
-    do_check_eq(aStatusCode, Components.results.NS_OK);
-    do_check_eq(this.offset, this.length);
-    this.callback();
-  },
-
-  onDataAvailable: function(aRequest, aContext, aInputStream, aOffset, aCount) {
-    var stream = Cc["@mozilla.org/binaryinputstream;1"].
-                 createInstance(Ci.nsIBinaryInputStream);
-    stream.setInputStream(aInputStream);
-    var source, actual;
-    for (var i = 0; i < aCount; i++) {
-      try {
-        source = this.fileStream.read8();
-      }
-      catch (e) {
-        do_throw("Unable to read from file at offset " + this.offset + " " + e);
-      }
-      try {
-        actual = stream.read8();
-      }
-      catch (e) {
-        do_throw("Unable to read from converted stream at offset " + this.offset + " " + e);
-      }
-      if (source != actual)
-        do_throw("Invalid value " + actual + " at offset " + this.offset + ", should have been " + source);
-      this.offset++;
-    }
-  }
-}
-
-function comparer_callback()
-{
-  do_test_finished();
-}
-
-function run_test()
-{
-  var source = do_get_file(DATA_DIR + "test_bug717061.html");
-  var comparer = new BinaryComparer(do_get_file(DATA_DIR + "test_bug717061.gz"),
-                                    comparer_callback);
-  
-  // Prepare the stream converter
-  var scs = Cc["@mozilla.org/streamConverters;1"].
-            getService(Ci.nsIStreamConverterService);
-  var converter = scs.asyncConvertData("uncompressed", "gzip", comparer, null);
-
-  // Open the expected output file
-  var fstream = Cc["@mozilla.org/network/file-input-stream;1"].
-                createInstance(Ci.nsIFileInputStream);
-  fstream.init(source, -1, 0, 0);
-
-  // Set up a pump to push data from the file to the stream converter
-  var pump = Cc["@mozilla.org/network/input-stream-pump;1"].
-             createInstance(Ci.nsIInputStreamPump);
-  pump.init(fstream, -1, -1, 0, 0, true);
-  pump.asyncRead(converter, null);
-  do_test_pending();
-}
--- a/modules/libjar/zipwriter/test/unit/xpcshell.ini
+++ b/modules/libjar/zipwriter/test/unit/xpcshell.ini
@@ -17,9 +17,8 @@ tail = tail_zipwriter.js
 [test_deflatedata.js]
 [test_directory.js]
 [test_editexisting.js]
 [test_storedata.js]
 [test_sync.js]
 [test_undochange.js]
 [test_zipcomment.js]
 [test_zippermissions.js]
-[test_bug717061.js]