Bug 796911 - Attempt to fix Intermittent test_clear_browser_data.html. r=jwatt

This commit is contained in:
Mounir Lamouri 2012-10-03 13:46:21 +01:00
Родитель e6e722ad0c
Коммит 75541be457
1 изменённых файлов: 19 добавлений и 17 удалений

Просмотреть файл

@ -193,28 +193,30 @@ function browserLoadEvent() {
frames[1].postMessage("clear", "http://www.example.com"); frames[1].postMessage("clear", "http://www.example.com");
navigator.mozApps.mgmt.getAll().onsuccess = function() { SimpleTest.executeSoon(function() {
for (i in this.result) { navigator.mozApps.mgmt.getAll().onsuccess = function() {
var app = this.result[i]; for (i in this.result) {
if (app.manifestURL == gManifestURL) { var app = this.result[i];
is(gBrowserStorage.localStorage.getItem("foo"), null, "localstorage data have been deleted"); if (app.manifestURL == gManifestURL) {
is(gBrowserStorage.sessionStorage.getItem("foo"), "bar", "sessionstorage data have not been deleted"); is(gBrowserStorage.localStorage.getItem("foo"), null, "localstorage data have been deleted");
is(gBrowserStorage.sessionStorage.getItem("foo"), "bar", "sessionstorage data have not been deleted");
is(gAppStorage.localStorage.getItem("foo"), "bar", "data are still there"); is(gAppStorage.localStorage.getItem("foo"), "bar", "data are still there");
is(gAppStorage.sessionStorage.getItem("foo"), "bar", "data are still there"); is(gAppStorage.sessionStorage.getItem("foo"), "bar", "data are still there");
is(gWitnessStorage.localStorage.getItem("foo"), "bar", "data are still there"); is(gWitnessStorage.localStorage.getItem("foo"), "bar", "data are still there");
is(gWitnessStorage.sessionStorage.getItem("foo"), "bar", "data are still there"); is(gWitnessStorage.sessionStorage.getItem("foo"), "bar", "data are still there");
Webapps.DOMApplicationRegistry.allAppsLaunchable = gPreviousLaunchableValue; Webapps.DOMApplicationRegistry.allAppsLaunchable = gPreviousLaunchableValue;
// Now we uninstall the app and make sure everything is clean. // Now we uninstall the app and make sure everything is clean.
app.uninstall().onsuccess = function() { app.uninstall().onsuccess = function() {
finish(); finish();
}; };
}
} }
} };
}; });
} }
/** /**