Bug 552025 - Remove the instances of nsINavHistoryResultObserver.containerOpened/Closed. r=mak
authorAmod Narvekar <amod.narvekar@gmail.com>
Thu, 17 Apr 2014 16:43:03 -0400
changeset 179499 b90918a83e1526c90c75c24b1bb317f210595963
parent 179498 9f9e83390b460fa1ded4aa746bec47c3e9ff47dc
child 179500 f7645d1aaaea8c83cd6da1836fc4ceec408f7c2f
push id272
push userpvanderbeken@mozilla.com
push dateMon, 05 May 2014 16:31:18 +0000
reviewersmak
bugs552025
milestone31.0a1
Bug 552025 - Remove the instances of nsINavHistoryResultObserver.containerOpened/Closed. r=mak
toolkit/components/places/tests/head_common.js
toolkit/components/places/tests/unit/test_nsINavHistoryViewer.js
--- a/toolkit/components/places/tests/head_common.js
+++ b/toolkit/components/places/tests/head_common.js
@@ -844,18 +844,16 @@ NavHistoryObserver.prototype = {
  * Generic nsINavHistoryResultObserver that doesn't implement anything, but
  * provides dummy methods to prevent errors about an object not having a certain
  * method.
  */
 function NavHistoryResultObserver() {}
 
 NavHistoryResultObserver.prototype = {
   batching: function () {},
-  containerClosed: function () {},
-  containerOpened: function () {},
   containerStateChanged: function () {},
   invalidateContainer: function () {},
   nodeAnnotationChanged: function () {},
   nodeDateAddedChanged: function () {},
   nodeHistoryDetailsChanged: function () {},
   nodeIconChanged: function () {},
   nodeInserted: function () {},
   nodeKeywordChanged: function () {},
--- a/toolkit/components/places/tests/unit/test_nsINavHistoryViewer.js
+++ b/toolkit/components/places/tests/unit/test_nsINavHistoryViewer.js
@@ -92,17 +92,16 @@ add_test(function check_history_query() 
   options.sortingMode = options.SORT_BY_DATE_DESCENDING;
   options.resultType = options.RESULTS_AS_VISIT;
   var query = histsvc.getNewQuery();
   var result = histsvc.executeQuery(query, options);
   result.addObserver(resultObserver, false);
   var root = result.root;
   root.containerOpen = true;
 
-  // nsINavHistoryResultObserver.containerOpened
   do_check_neq(resultObserver.openedContainer, null);
 
   // nsINavHistoryResultObserver.nodeInserted
   // add a visit
   promiseAddVisits(testURI).then(function() {
     do_check_eq(testURI.spec, resultObserver.insertedNode.uri);
 
     // nsINavHistoryResultObserver.nodeHistoryDetailsChanged
@@ -143,17 +142,16 @@ add_test(function check_history_query() 
         do_check_false(resultObserver.inBatchMode);
         bmsvc.runInBatchMode({
           runBatched: function (aUserData) {
             do_check_true(resultObserver.inBatchMode);
           }
         }, null);
         do_check_false(resultObserver.inBatchMode);
 
-        // nsINavHistoryResultObserver.containerClosed
         root.containerOpen = false;
         do_check_eq(resultObserver.closedContainer, resultObserver.openedContainer);
         result.removeObserver(resultObserver);
         resultObserver.reset();
         promiseAsyncUpdates().then(run_next_test);
       });
     });
   });
@@ -163,17 +161,16 @@ add_test(function check_bookmarks_query(
   var options = histsvc.getNewQueryOptions();
   var query = histsvc.getNewQuery();
   query.setFolders([bmsvc.bookmarksMenuFolder], 1);
   var result = histsvc.executeQuery(query, options);
   result.addObserver(resultObserver, false);
   var root = result.root;
   root.containerOpen = true;
 
-  // nsINavHistoryResultObserver.containerOpened
   do_check_neq(resultObserver.openedContainer, null);
 
   // nsINavHistoryResultObserver.nodeInserted
   // add a bookmark
   var testBookmark = bmsvc.insertBookmark(bmsvc.bookmarksMenuFolder, testURI, bmsvc.DEFAULT_INDEX, "foo");
   do_check_eq("foo", resultObserver.insertedNode.title);
   do_check_eq(testURI.spec, resultObserver.insertedNode.uri);
 
@@ -212,34 +209,32 @@ add_test(function check_bookmarks_query(
   do_check_false(resultObserver.inBatchMode);
   bmsvc.runInBatchMode({
     runBatched: function (aUserData) {
       do_check_true(resultObserver.inBatchMode);
     }
   }, null);
   do_check_false(resultObserver.inBatchMode);
 
-  // nsINavHistoryResultObserver.containerClosed
   root.containerOpen = false;
   do_check_eq(resultObserver.closedContainer, resultObserver.openedContainer);
   result.removeObserver(resultObserver);
   resultObserver.reset();
   promiseAsyncUpdates().then(run_next_test);
 });
 
 add_test(function check_mixed_query() {
   var options = histsvc.getNewQueryOptions();
   var query = histsvc.getNewQuery();
   query.onlyBookmarked = true;
   var result = histsvc.executeQuery(query, options);
   result.addObserver(resultObserver, false);
   var root = result.root;
   root.containerOpen = true;
 
-  // nsINavHistoryResultObserver.containerOpened
   do_check_neq(resultObserver.openedContainer, null);
 
   // nsINavHistoryResultObserver.batching
   do_check_false(resultObserver.inBatchMode);
   histsvc.runInBatchMode({
     runBatched: function (aUserData) {
       do_check_true(resultObserver.inBatchMode);
     }
@@ -247,15 +242,14 @@ add_test(function check_mixed_query() {
   do_check_false(resultObserver.inBatchMode);
   bmsvc.runInBatchMode({
     runBatched: function (aUserData) {
       do_check_true(resultObserver.inBatchMode);
     }
   }, null);
   do_check_false(resultObserver.inBatchMode);
 
-  // nsINavHistoryResultObserver.containerClosed
   root.containerOpen = false;
   do_check_eq(resultObserver.closedContainer, resultObserver.openedContainer);
   result.removeObserver(resultObserver);
   resultObserver.reset();
   promiseAsyncUpdates().then(run_next_test);
 });