This repository has been archived by the owner on Apr 10, 2024. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge in fixes for bug 689375, bug 698753, and bug 687367 to release …
…branch, a=alexk --HG-- branch : GECKO80_2011103118_RELBRANCH
- Loading branch information
Showing
8 changed files
with
623 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
43 changes: 43 additions & 0 deletions
43
toolkit/mozapps/extensions/test/xpcshell/test_bug689375.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
/* Any copyright is dedicated to the Public Domain. | ||
* http://creativecommons.org/publicdomain/zero/1.0/ | ||
*/ | ||
|
||
|
||
function run_test() { | ||
do_test_pending(); | ||
createAppInfo("xpcshell@tests.mozilla.org", "XPCShell", "1", "1.9.2"); | ||
|
||
// Write out a minimal database. | ||
let dbfile = gProfD.clone(); | ||
dbfile.append("addons.sqlite"); | ||
let db = AM_Cc["@mozilla.org/storage/service;1"]. | ||
getService(AM_Ci.mozIStorageService). | ||
openDatabase(dbfile); | ||
|
||
db.createTable("futuristicSchema", | ||
"id INTEGER, " + | ||
"sharks TEXT, " + | ||
"lasers TEXT"); | ||
|
||
db.schemaVersion = 1000; | ||
db.close(); | ||
|
||
Services.obs.addObserver({ | ||
observe: function () { | ||
Services.obs.removeObserver(this, "addon-repository-shutdown"); | ||
// Check the DB schema has changed once AddonRepository has freed it. | ||
db = AM_Cc["@mozilla.org/storage/service;1"]. | ||
getService(AM_Ci.mozIStorageService). | ||
openDatabase(dbfile); | ||
do_check_eq(db.schemaVersion, 1); | ||
db.close(); | ||
do_test_finished(); | ||
} | ||
}, "addon-repository-shutdown", null); | ||
|
||
// Force a connection to the addon database to be opened. | ||
Services.prefs.setBoolPref("extensions.getAddons.cache.enabled", true); | ||
AddonRepository.getCachedAddonByID("test1@tests.mozilla.org", function (aAddon) { | ||
AddonRepository.shutdown(); | ||
}); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters