Bug 585713 - Suite part of |Bug 552023 - Kill Places partitioned temp tables|;
authorSerge Gautherie <sgautherie.bz@free.fr>
Fri, 14 Jan 2011 18:30:03 +0100
changeset 6954 21421642db18e4c316eb9276e4a0e8f40190e75e
parent 6953 d3f37c90dfd951513edd121b451e10ddd27c890e
child 6955 285ca4c14963a68aeadde9743306b2ca5dbd47cb
push idunknown
push userunknown
push dateunknown
bugs585713, 552023, 610442
Bug 585713 - Suite part of |Bug 552023 - Kill Places partitioned temp tables|; (Av1a) Just copy (the relevant part of) it, Copy bug 610442 too.
suite/common/places/tests/unit/test_clearHistory_shutdown.js
suite/common/src/nsSuiteGlue.js
suite/common/tests/browser/browser_markPageAsFollowedLink.js
suite/installer/package-manifest.in
suite/installer/removed-files.in
--- a/suite/common/places/tests/unit/test_clearHistory_shutdown.js
+++ b/suite/common/places/tests/unit/test_clearHistory_shutdown.js
@@ -48,19 +48,17 @@ const URIS = [
 ];
 
 const TOPIC_CONNECTION_CLOSED = "places-connection-closed";
 
 let EXPECTED_NOTIFICATIONS = [
   "places-shutdown"
 , "places-will-close-connection"
 , "places-connection-closing"
-, "places-sync-finished"
 , "places-expiration-finished"
-, "places-sync-finished"
 , "places-connection-closed"
 ];
 
 const UNEXPECTED_NOTIFICATIONS = [
   "xpcom-shutdown"
 ];
 
 const URL = "ftp://localhost/clearHistoryOnShutdown/";
--- a/suite/common/src/nsSuiteGlue.js
+++ b/suite/common/src/nsSuiteGlue.js
@@ -235,20 +235,17 @@ SuiteGlue.prototype = {
   {
     var notifyBox = aWindow.getBrowser().getNotificationBox();
 
     // Show about:rights notification, if needed.
     if (this._shouldShowRights())
       this._showRightsNotification(notifyBox);
 
     // Load the "more info" page for a locked places.sqlite
-    // This property is set earlier in the startup process:
-    // nsPlacesDBFlush loads after profile-after-change and initializes
-    // the history service, which sends out places-database-locked
-    // which sets this property.
+    // This property is set earlier by places-database-locked topic.
     if (this._isPlacesDatabaseLocked) {
       this._showPlacesLockedNotificationBox(aWindow);
     }
     // Detect if updates are off and warn for outdated builds.
     if (this._shouldShowUpdateWarning())
       notifyBox.showUpdateWarning();
   },
 
--- a/suite/common/tests/browser/browser_markPageAsFollowedLink.js
+++ b/suite/common/tests/browser/browser_markPageAsFollowedLink.js
@@ -19,18 +19,18 @@ Components.utils.import("resource://gre/
 let gTabLoaded = false;
 let gLeftFrameVisited = false;
 
 let observer = {
   observe: function(aSubject, aTopic, aData)
   {
     let url = aSubject.QueryInterface(Ci.nsIURI).spec;
     if (url == LEFT_URL ) {
-      is(getTransitionForUrl(url), PlacesUtils.history.TRANSITION_EMBED,
-         "Frames should get a EMBED transition.");
+      is(getTransitionForUrl(url), null,
+         "Embed visits should not get a database entry.");
       gLeftFrameVisited = true;
       maybeClickLink();
     }
     else if (url == RIGHT_URL ) {
       is(getTransitionForUrl(url), PlacesUtils.history.TRANSITION_FRAMED_LINK,
          "User activated visits should get a FRAMED_LINK transition.");
       finish();
     }
@@ -65,21 +65,23 @@ function maybeClickLink() {
   }
 }
 
 function getTransitionForUrl(aUrl)
 {
   let dbConn = PlacesUtils.history
                           .QueryInterface(Ci.nsPIPlacesDatabase).DBConnection;
   let stmt = dbConn.createStatement(
-    "SELECT visit_type FROM moz_historyvisits_view WHERE place_id = " +
-      "(SELECT id FROM moz_places_view WHERE url = :page_url)");
+    "SELECT visit_type FROM moz_historyvisits WHERE place_id = " +
+      "(SELECT id FROM moz_places WHERE url = :page_url)");
   stmt.params.page_url = aUrl;
   try {
-    ok(stmt.executeStep(), "Found the visit in the database");
+    if (!stmt.executeStep()) {
+      return null;
+    }
     return stmt.row.visit_type;
   }
   finally {
     stmt.finalize();
   }
 }
 
 registerCleanupFunction(function ()
--- a/suite/installer/package-manifest.in
+++ b/suite/installer/package-manifest.in
@@ -357,17 +357,16 @@
 @BINPATH@/components/nsInputListAutoComplete.js
 @BINPATH@/components/nsLivemarkService.js
 @BINPATH@/components/nsLoginInfo.js
 @BINPATH@/components/nsLoginManager.js
 @BINPATH@/components/nsLoginManagerPrompter.js
 @BINPATH@/components/nsMicrosummaryService.js
 @BINPATH@/components/nsPlacesAutoComplete.js
 @BINPATH@/components/nsPlacesAutoComplete.manifest
-@BINPATH@/components/nsPlacesDBFlush.js
 @BINPATH@/components/nsPlacesExpiration.js
 @BINPATH@/components/nsPrompter.js
 @BINPATH@/components/nsPrompter.manifest
 @BINPATH@/components/nsProxyAutoConfig.js
 @BINPATH@/components/nsProxyAutoConfig.manifest
 @BINPATH@/components/nsSearchService.js
 @BINPATH@/components/nsSearchSuggestions.js
 @BINPATH@/components/nsSessionStartup.js
--- a/suite/installer/removed-files.in
+++ b/suite/installer/removed-files.in
@@ -68,16 +68,17 @@ components/@DLL_PREFIX@mozfind@DLL_SUFFI
 components/@DLL_PREFIX@myspell@DLL_SUFFIX@
 components/nsCloseAllWindows.js
 components/nsDictionary.js
 components/nsDownloadProgressListener.js
 components/nsExtensionManager.js
 components/nsInterfaceInfoToIDL.js
 components/nsKillAll.js
 components/nsLDAPPrefsService.js
+components/nsPlacesDBFlush.js
 #ifdef XP_WIN
 components/nsPostUpdateWin.js
 #endif
 components/nsProgressDialog.js
 components/nsResetPref.js
 components/nsScriptableIO.js
 components/nsSetDefaultBrowser.js
 components/nsSetDefaultMail.js