remove bogus test for bug 521495
authorDão Gottwald <dao@mozilla.com>
Thu, 15 Jul 2010 11:35:33 +0200
changeset 47677 5fda39cd703c3d2bcfde4908a0ae89b04e0c34c9
parent 47676 e63da1dc90b68247a00884015a5288fb3f00aa3f
child 47679 3f5e9b0e02c54a72b298850196e5c3cbe0e0bd01
push id14391
push userdgottwald@mozilla.com
push dateThu, 15 Jul 2010 09:35:59 +0000
treeherderautoland@5fda39cd703c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs521495
milestone2.0b2pre
first release with
nightly linux32
5fda39cd703c / 4.0b2pre / 20100715030436 / files
nightly linux64
5fda39cd703c / 4.0b2pre / 20100715030655 / files
nightly mac
5fda39cd703c / 4.0b2pre / 20100715030656 / files
nightly win32
5fda39cd703c / 4.0b2pre / 20100715040517 / files
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
releases
nightly linux32
nightly linux64
nightly mac
nightly win32
remove bogus test for bug 521495
modules/libpr0n/test/unit/test_moziconchannel.js
deleted file mode 100644
--- a/modules/libpr0n/test/unit/test_moziconchannel.js
+++ /dev/null
@@ -1,97 +0,0 @@
-/**
- * Basic tests for the moz-icon:// protocol
- * Tests will try to load icons for a set of given extensions.
- * Different icon sizes will be tested as well.
- * 
- * Some systems use svg icons. Those svg icons are also
- * expected to load just fine.
- *
- *
- * Written by Nils Maier <MaierMan@web.de>
- * Code is in the public domain; Copyrights are disclaimed
- */
-
-const Cc = Components.classes;
-const Ci = Components.interfaces;
-const Cr = Components.results;
-const Ctor = Components.Constructor;
-const Exception = Components.Exception;
-
-const URIDEFAULT = "moz-icon://file.%e";
-const URISIZE = "moz-icon://file.%e?size=%s";
-
-
-const IOService = Cc["@mozilla.org/network/io-service;1"].
-                  getService(Ci.nsIIOService);
-
-
-// These file extensions should be tested
-// All systems should provide some kind of icon
-var extensions = [
-  'png', 'jpg', 'jpeg',
-  'pdf',
-  'mpg', 'avi', 'mov',
-  'zip', 'rar', 'tar.gz', 'tar.bz2',
-];
-
-// What sizes to test
-var sizes = [
-  16,
-  24,
-  32,
-  48,
-  64
-];
-
-// Stream listener for the channels
-function Listener() {}
-Listener.prototype = {
-  _dataReceived: false,
-  QueryInterface: function(iid) {
-    if (iid.equals(Ci.nsIStreamListener)
-        || iid.equals(Ci.nsIRequestObserver)
-        || iid.equals(Ci.nsISupports)) {
-      return this;
-    }
-    throw Cr.NS_ERROR_NO_INTERFACE;
-  },
-  onStopRequest: function(aRequest, aContext, aStatusCode) {
-    // Usually newChannel will throw
-    // However, better be safe than sorry and check
-    // the channel actually returned data
-    do_check_true(!!this._dataReceived);
-
-    do_test_finished();
-  },
-  onStartRequest: function() {},
-  onDataAvailable: function(aRequest, aContext, aInputStream, aOffset, aCount) {
-    this._dataReceived |= aInputStream.available() > 0;
-
-    aRequest.cancel(0x804B0002); // binding aborted
-  }
-};
-
-// test a single url for all extensions
-function verifyChannelFor(aExt, aURI) {
-  var uri = aURI.replace(/%e/g, aExt);
-  try {
-    var channel = IOService.newChannel(uri, null, null);
-    channel.asyncOpen(new Listener(), null);
-
-    do_test_pending();
-  }
-  catch (ex) {
-    // If moz-icon: cannot "resolve" an icon then newChannel will throw.
-    do_throw("Cannot open channel for " + uri + " Error: " + ex);
-  }
-}
-
-// runs the test
-function run_test() {
-  for each (let ext in extensions) {
-    verifyChannelFor(ext, URIDEFAULT);
-    for each (let size in sizes) {
-      verifyChannelFor(ext, URISIZE.replace(/%s/g, size));
-    }
-  }
-};