Bug 676906 - xpcshell test for async getFaviconDataForPage in mozIAsyncFavicons. r=mak
authorBrian R. Bondy <netzen@gmail.com>
Wed, 31 Aug 2011 10:28:20 -0400
changeset 76326 79f89328862d8acbf6ee6f312e1cb010a8aadae9
parent 76325 0b8b1ba3c97d626f7dbd0a73c938e4154b4f9f6e
child 76327 6006d67f5a0972bab8a137039b08c3908781ebc4
push id21097
push userbmo@edmorley.co.uk
push dateThu, 01 Sep 2011 07:45:07 +0000
treeherdermozilla-central@7d3d1c2c75f8 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmak
bugs676906
milestone9.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 676906 - xpcshell test for async getFaviconDataForPage in mozIAsyncFavicons. r=mak
toolkit/components/places/tests/unit/test_favicons.js
--- a/toolkit/components/places/tests/unit/test_favicons.js
+++ b/toolkit/components/places/tests/unit/test_favicons.js
@@ -336,16 +336,26 @@ var savedIcon1URI = iconsvc.getFaviconFo
 // Test getFaviconForPage().
 do_test_pending();
 iconsvc.getFaviconURLForPage(page1URI, {
     onFaviconDataAvailable: function(aURI, aDataLen, aData, aMimeType) {
       do_check_true(aURI.equals(savedIcon1URI));
       do_check_eq(aDataLen, 0);
       do_check_eq(aData.length, 0);
       do_check_eq(aMimeType, "");
+  },
+  QueryInterface: XPCOMUtils.generateQI([Ci.nsIFaviconDataCallback])
+});
+
+iconsvc.getFaviconDataForPage(page1URI, {
+    onFaviconDataAvailable: function(aURI, aDataLen, aData, aMimeType) {
+      do_check_true(aURI.equals(savedIcon1URI));
+      do_check_eq(icon1MimeType, out1MimeType.value);
+      checkArrays(icon1Data, aData);
+      do_check_eq(aDataLen, aData.length);
       do_test_finished();
   },
   QueryInterface: XPCOMUtils.generateQI([Ci.nsIFaviconDataCallback])
 });
 
 // set second page icon
 try {
   iconsvc.setFaviconData(icon2URI, icon2Data, icon2Data.length,