mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Merging mozilla-inbound and mozilla-central.
This commit is contained in:
commit
45fde43e01
@ -149,7 +149,7 @@ function test() {
|
||||
|
||||
let tab_A2 = gBrowser.addTab("http://example.com");
|
||||
tab_A2.linkedBrowser.addEventListener("load", function(aEvent) {
|
||||
tab_A2.removeEventListener("load", arguments.callee, true);
|
||||
tab_A2.linkedBrowser.removeEventListener("load", arguments.callee, true);
|
||||
gBrowser.selectedTab = tab_A2;
|
||||
is(getPriority(tab_A1), Ci.nsISupportsPriority.PRIORITY_LOWEST - PRIORITY_DELTA,
|
||||
"Can adjust priority beyond 'lowest'");
|
||||
|
@ -26,25 +26,22 @@ function next() {
|
||||
|
||||
function detach() {
|
||||
var win = gBrowser.replaceTabWithWindow(tab);
|
||||
win.addEventListener("load", function () {
|
||||
win.removeEventListener("load", arguments.callee, false);
|
||||
|
||||
var _delayedStartup = win.delayedStartup;
|
||||
win.delayedStartup = function delayedStartup() {
|
||||
_delayedStartup.apply(win, arguments);
|
||||
win.delayedStartup = _delayedStartup;
|
||||
Services.obs.addObserver(function (subject, topic, data) {
|
||||
if (subject != win)
|
||||
return;
|
||||
Services.obs.removeObserver(arguments.callee, topic);
|
||||
|
||||
is(win.gBrowser.currentURI.spec, uri, uri + ": uri loaded in detached tab");
|
||||
is(win.document.activeElement, win.gBrowser.selectedBrowser, uri + ": browser is focused");
|
||||
is(win.gURLBar.value, "", uri + ": urlbar is empty");
|
||||
ok(win.gURLBar.placeholder, uri + ": placeholder text is present");
|
||||
is(win.gBrowser.currentURI.spec, uri, uri + ": uri loaded in detached tab");
|
||||
is(win.document.activeElement, win.gBrowser.selectedBrowser, uri + ": browser is focused");
|
||||
is(win.gURLBar.value, "", uri + ": urlbar is empty");
|
||||
ok(win.gURLBar.placeholder, uri + ": placeholder text is present");
|
||||
|
||||
win.close();
|
||||
if (uris.length)
|
||||
next();
|
||||
else
|
||||
executeSoon(finish);
|
||||
};
|
||||
}, false);
|
||||
win.close();
|
||||
if (uris.length)
|
||||
next();
|
||||
else
|
||||
executeSoon(finish);
|
||||
}, "browser-delayed-startup-finished", false);
|
||||
}
|
||||
}
|
||||
|
@ -152,9 +152,6 @@ function test() {
|
||||
}, true);
|
||||
}
|
||||
|
||||
// sessionstore service
|
||||
let ss = Cc["@mozilla.org/browser/sessionstore;1"].
|
||||
getService(Ci.nsISessionStore);
|
||||
// Remove the sessionstore.js file before setting the interval to 0
|
||||
let sessionStoreJS = getSessionstoreFile();
|
||||
if (sessionStoreJS.exists())
|
||||
|
@ -109,10 +109,6 @@ function test() {
|
||||
getService(Ci.nsIPrivateBrowsingService);
|
||||
gPrefService.setBoolPref("browser.privatebrowsing.keep_current_session", true);
|
||||
|
||||
// sessionstore service
|
||||
let ss = test(function() Cc["@mozilla.org/browser/sessionstore;1"].
|
||||
getService(Ci.nsISessionStore));
|
||||
|
||||
//////////////////////////////////////////////////////////////////
|
||||
// Test (B) : Session data restoration between modes //
|
||||
//////////////////////////////////////////////////////////////////
|
||||
|
@ -46,9 +46,7 @@ function test() {
|
||||
return ex.name == "NS_ERROR_ILLEGAL_VALUE";
|
||||
}
|
||||
}
|
||||
|
||||
let ss = Cc["@mozilla.org/browser/sessionstore;1"].getService(Ci.nsISessionStore);
|
||||
|
||||
|
||||
// all of the following calls with illegal arguments should throw NS_ERROR_ILLEGAL_VALUE
|
||||
ok(test(function() ss.getWindowState({})),
|
||||
"Invalid window for getWindowState throws");
|
||||
|
@ -8,19 +8,9 @@ function test() {
|
||||
catch (ex) { }
|
||||
return false;
|
||||
}
|
||||
|
||||
// test setup
|
||||
let tabbrowser = gBrowser;
|
||||
|
||||
waitForExplicitFinish();
|
||||
|
||||
// component
|
||||
let ssComponent = test(function() Cc["@mozilla.org/browser/sessionstore;1"]);
|
||||
ok(ssComponent, "reference the sessionstore component");
|
||||
|
||||
// service
|
||||
let ss = test(function() ssComponent.getService(Ci.nsISessionStore));
|
||||
ok(ss, "reference the sessionstore service");
|
||||
|
||||
|
||||
////////////////////////////
|
||||
// setWindowValue, et al. //
|
||||
////////////////////////////
|
||||
@ -47,7 +37,7 @@ function test() {
|
||||
/////////////////////////
|
||||
key = "Unique name: " + Math.random();
|
||||
value = "Unique value: " + Date.now();
|
||||
let tab = tabbrowser.addTab();
|
||||
let tab = gBrowser.addTab();
|
||||
tab.linkedBrowser.stop();
|
||||
|
||||
// test adding
|
||||
@ -66,7 +56,7 @@ function test() {
|
||||
ok(test(function() ss.deleteTabValue(tab, key)), "delete non-existent tab value");
|
||||
|
||||
// clean up
|
||||
tabbrowser.removeTab(tab);
|
||||
gBrowser.removeTab(tab);
|
||||
|
||||
/////////////////////////////////////
|
||||
// getClosedTabCount, undoCloseTab //
|
||||
@ -80,14 +70,14 @@ function test() {
|
||||
|
||||
// create a new tab
|
||||
let testURL = "about:";
|
||||
tab = tabbrowser.addTab(testURL);
|
||||
tab = gBrowser.addTab(testURL);
|
||||
tab.linkedBrowser.addEventListener("load", function(aEvent) {
|
||||
this.removeEventListener("load", arguments.callee, true);
|
||||
// make sure that the next closed tab will increase getClosedTabCount
|
||||
gPrefService.setIntPref("browser.sessionstore.max_tabs_undo", max_tabs_undo + 1);
|
||||
|
||||
// remove tab
|
||||
tabbrowser.removeTab(tab);
|
||||
gBrowser.removeTab(tab);
|
||||
|
||||
// getClosedTabCount
|
||||
var newcount = ss.getClosedTabCount(window);
|
||||
@ -104,7 +94,7 @@ function test() {
|
||||
// clean up
|
||||
if (gPrefService.prefHasUserValue("browser.sessionstore.max_tabs_undo"))
|
||||
gPrefService.clearUserPref("browser.sessionstore.max_tabs_undo");
|
||||
tabbrowser.removeTab(tab);
|
||||
gBrowser.removeTab(tab);
|
||||
finish();
|
||||
}, true);
|
||||
}, true);
|
||||
|
@ -115,9 +115,7 @@ function browserWindowsCount(expected, msg) {
|
||||
++count;
|
||||
}
|
||||
is(count, expected[0], msg + " (nsIWindowMediator)");
|
||||
let state = Cc["@mozilla.org/browser/sessionstore;1"]
|
||||
.getService(Ci.nsISessionStore)
|
||||
.getBrowserState();
|
||||
let state = ss.getBrowserState();
|
||||
is(JSON.parse(state).windows.length, expected[1], msg + " (getBrowserState)");
|
||||
}
|
||||
|
||||
|
@ -36,10 +36,7 @@
|
||||
|
||||
function test() {
|
||||
/** Test for Bug 367052 **/
|
||||
|
||||
// test setup
|
||||
let ss = Cc["@mozilla.org/browser/sessionstore;1"].getService(Ci.nsISessionStore);
|
||||
let tabbrowser = gBrowser;
|
||||
|
||||
waitForExplicitFinish();
|
||||
|
||||
// make sure that the next closed tab will increase getClosedTabCount
|
||||
@ -48,7 +45,7 @@ function test() {
|
||||
let closedTabCount = ss.getClosedTabCount(window);
|
||||
|
||||
// restore a blank tab
|
||||
let tab = tabbrowser.addTab("about:");
|
||||
let tab = gBrowser.addTab("about:");
|
||||
tab.linkedBrowser.addEventListener("load", function(aEvent) {
|
||||
this.removeEventListener("load", arguments.callee, true);
|
||||
|
||||
@ -60,7 +57,7 @@ function test() {
|
||||
this.removeEventListener("load", arguments.callee, true);
|
||||
ok(history.count == 0, "the tab was restored without any history whatsoever");
|
||||
|
||||
tabbrowser.removeTab(tab);
|
||||
gBrowser.removeTab(tab);
|
||||
ok(ss.getClosedTabCount(window) == closedTabCount,
|
||||
"The closed blank tab wasn't added to Recently Closed Tabs");
|
||||
|
||||
|
@ -1,13 +1,6 @@
|
||||
function test() {
|
||||
/** Test for Bug 393716 **/
|
||||
|
||||
// set up the basics (SessionStore service, tabbrowser)
|
||||
try {
|
||||
var ss = Cc["@mozilla.org/browser/sessionstore;1"].getService(Ci.nsISessionStore);
|
||||
}
|
||||
catch (ex) { }
|
||||
ok(ss, "SessionStore service is available");
|
||||
let tabbrowser = gBrowser;
|
||||
|
||||
waitForExplicitFinish();
|
||||
|
||||
/////////////////
|
||||
@ -18,7 +11,7 @@ function test() {
|
||||
let testURL = "about:config";
|
||||
|
||||
// create a new tab
|
||||
let tab = tabbrowser.addTab(testURL);
|
||||
let tab = gBrowser.addTab(testURL);
|
||||
ss.setTabValue(tab, key, value);
|
||||
tab.linkedBrowser.addEventListener("load", function(aEvent) {
|
||||
this.removeEventListener("load", arguments.callee, true);
|
||||
@ -36,7 +29,7 @@ function test() {
|
||||
"Got the expected state object (test manually set tab value)");
|
||||
|
||||
// clean up
|
||||
tabbrowser.removeTab(tab);
|
||||
gBrowser.removeTab(tab);
|
||||
}, true);
|
||||
|
||||
//////////////////////////////////
|
||||
@ -48,7 +41,7 @@ function test() {
|
||||
let state = { entries: [{ url: testURL }], extData: { key2: value2 } };
|
||||
|
||||
// create a new tab
|
||||
let tab2 = tabbrowser.addTab();
|
||||
let tab2 = gBrowser.addTab();
|
||||
// set the tab's state
|
||||
ss.setTabState(tab2, JSON.stringify(state));
|
||||
tab2.linkedBrowser.addEventListener("load", function(aEvent) {
|
||||
@ -63,7 +56,7 @@ function test() {
|
||||
|
||||
// duplicate the tab
|
||||
let duplicateTab = ss.duplicateTab(window, tab2);
|
||||
tabbrowser.removeTab(tab2);
|
||||
gBrowser.removeTab(tab2);
|
||||
|
||||
duplicateTab.linkedBrowser.addEventListener("load", function(aEvent) {
|
||||
this.removeEventListener("load", arguments.callee, true);
|
||||
@ -74,7 +67,7 @@ function test() {
|
||||
is(textbox.value, value3, "also duplicated text data");
|
||||
|
||||
// clean up
|
||||
tabbrowser.removeTab(duplicateTab);
|
||||
gBrowser.removeTab(duplicateTab);
|
||||
finish();
|
||||
}, true);
|
||||
}, true);
|
||||
|
@ -51,8 +51,6 @@ function test() {
|
||||
// See Bug 518970.
|
||||
requestLongerTimeout(2);
|
||||
|
||||
// test setup
|
||||
let ss = Cc["@mozilla.org/browser/sessionstore;1"].getService(Ci.nsISessionStore);
|
||||
let pb = Cc["@mozilla.org/privatebrowsing;1"].getService(Ci.nsIPrivateBrowsingService);
|
||||
waitForExplicitFinish();
|
||||
|
||||
|
@ -47,8 +47,6 @@ function test() {
|
||||
|
||||
// Set up the browser in a blank state. Popup windows in previous tests result
|
||||
// in different states on different platforms.
|
||||
let ss = Cc["@mozilla.org/browser/sessionstore;1"].
|
||||
getService(Ci.nsISessionStore);
|
||||
let blankState = JSON.stringify({
|
||||
windows: [{
|
||||
tabs: [{ entries: [{ url: "about:blank" }] }],
|
||||
@ -87,8 +85,6 @@ function continue_test() {
|
||||
getService(Ci.nsIPrivateBrowsingService);
|
||||
// Ensure Private Browsing mode is disabled.
|
||||
ok(!pb.privateBrowsingEnabled, "Private Browsing is disabled");
|
||||
let ss = Cc["@mozilla.org/browser/sessionstore;1"].
|
||||
getService(Ci.nsISessionStore);
|
||||
|
||||
let closedWindowCount = ss.getClosedWindowCount();
|
||||
is(closedWindowCount, 0, "Correctly set window count");
|
||||
|
@ -38,14 +38,11 @@ function test() {
|
||||
// test that cookies are stored and restored correctly by sessionstore,
|
||||
// bug 423132.
|
||||
|
||||
// test setup
|
||||
waitForExplicitFinish();
|
||||
|
||||
let cs = Cc["@mozilla.org/cookiemanager;1"].getService(Ci.nsICookieManager2);
|
||||
cs.removeAll();
|
||||
|
||||
let ss = Cc["@mozilla.org/browser/sessionstore;1"].getService(Ci.nsISessionStore);
|
||||
|
||||
// make sure that sessionstore.js can be forced to be created by setting
|
||||
// the interval pref to 0
|
||||
gPrefService.setIntPref("browser.sessionstore.interval", 0);
|
||||
|
@ -37,8 +37,6 @@
|
||||
function test() {
|
||||
/** Test for Bug 447951 **/
|
||||
|
||||
// test setup
|
||||
let ss = Cc["@mozilla.org/browser/sessionstore;1"].getService(Ci.nsISessionStore);
|
||||
waitForExplicitFinish();
|
||||
const baseURL = "http://mochi.test:8888/browser/" +
|
||||
"browser/components/sessionstore/test/browser/browser_447951_sample.html#";
|
||||
|
@ -37,8 +37,6 @@
|
||||
function test() {
|
||||
/** Test for Bug 448741 **/
|
||||
|
||||
// test setup
|
||||
let ss = Cc["@mozilla.org/browser/sessionstore;1"].getService(Ci.nsISessionStore);
|
||||
waitForExplicitFinish();
|
||||
|
||||
let uniqueName = "bug 448741";
|
||||
|
@ -57,8 +57,6 @@ function test() {
|
||||
|
||||
gBrowser.removeTab(tab);
|
||||
|
||||
let ss = Cc["@mozilla.org/browser/sessionstore;1"]
|
||||
.getService(Ci.nsISessionStore);
|
||||
let undoItems = JSON.parse(ss.getClosedTabData(window));
|
||||
let savedFormData = undoItems[0].state.entries[0].formdata;
|
||||
|
||||
|
@ -38,8 +38,6 @@
|
||||
function test() {
|
||||
/** Test for Bug 461634 **/
|
||||
|
||||
// test setup
|
||||
let ss = Cc["@mozilla.org/browser/sessionstore;1"].getService(Ci.nsISessionStore);
|
||||
waitForExplicitFinish();
|
||||
|
||||
const REMEMBER = Date.now(), FORGET = Math.random();
|
||||
|
@ -37,8 +37,6 @@
|
||||
function test() {
|
||||
/** Test for Bug 464199 **/
|
||||
|
||||
// test setup
|
||||
let ss = Cc["@mozilla.org/browser/sessionstore;1"].getService(Ci.nsISessionStore);
|
||||
waitForExplicitFinish();
|
||||
|
||||
const REMEMBER = Date.now(), FORGET = Math.random();
|
||||
|
@ -37,7 +37,6 @@
|
||||
function test() {
|
||||
/** Test for Bug 465215 **/
|
||||
|
||||
let ss = Cc["@mozilla.org/browser/sessionstore;1"].getService(Ci.nsISessionStore);
|
||||
waitForExplicitFinish();
|
||||
|
||||
let uniqueName = "bug 465215";
|
||||
|
@ -38,7 +38,6 @@ function test() {
|
||||
/** Test for Bug 465223 **/
|
||||
|
||||
// test setup
|
||||
let ss = Cc["@mozilla.org/browser/sessionstore;1"].getService(Ci.nsISessionStore);
|
||||
waitForExplicitFinish();
|
||||
|
||||
let uniqueKey1 = "bug 465223.1";
|
||||
|
@ -41,7 +41,6 @@ function test() {
|
||||
if ("nsILocalFileMac" in Ci)
|
||||
return;
|
||||
|
||||
let ss = Cc["@mozilla.org/browser/sessionstore;1"].getService(Ci.nsISessionStore);
|
||||
waitForExplicitFinish();
|
||||
|
||||
let newWin = openDialog(location, "_blank", "chrome,all,dialog=no");
|
||||
|
@ -38,7 +38,6 @@ function test() {
|
||||
/** Test for Bug 484108 **/
|
||||
requestLongerTimeout(2);
|
||||
|
||||
let ss = Cc["@mozilla.org/browser/sessionstore;1"].getService(Ci.nsISessionStore);
|
||||
waitForExplicitFinish();
|
||||
|
||||
// builds the tests state based on a few parameters
|
||||
|
@ -1,8 +1,6 @@
|
||||
function test() {
|
||||
/** Test for Bug 483330 **/
|
||||
|
||||
// test setup
|
||||
let ss = Cc["@mozilla.org/browser/sessionstore;1"].getService(Ci.nsISessionStore);
|
||||
waitForExplicitFinish();
|
||||
|
||||
let tab = gBrowser.addTab();
|
||||
|
@ -37,7 +37,6 @@
|
||||
function test() {
|
||||
/** Test for Bug 485563 **/
|
||||
|
||||
let ss = Cc["@mozilla.org/browser/sessionstore;1"].getService(Ci.nsISessionStore);
|
||||
waitForExplicitFinish();
|
||||
|
||||
let uniqueValue = Math.random() + "\u2028Second line\u2029Second paragraph\u2027";
|
||||
|
@ -38,9 +38,6 @@
|
||||
function test() {
|
||||
/** Test for Bug 490040 **/
|
||||
|
||||
let ss = Cc["@mozilla.org/browser/sessionstore;1"].
|
||||
getService(Ci.nsISessionStore);
|
||||
|
||||
waitForExplicitFinish();
|
||||
|
||||
function testWithState(aState) {
|
||||
|
@ -37,9 +37,6 @@
|
||||
function test() {
|
||||
/** Test for Bug 491168 **/
|
||||
|
||||
// test setup
|
||||
let ss = Cc["@mozilla.org/browser/sessionstore;1"].getService(Ci.nsISessionStore);
|
||||
|
||||
waitForExplicitFinish();
|
||||
|
||||
const REFERRER1 = "http://example.org/?" + Date.now();
|
||||
|
@ -39,7 +39,6 @@ function test() {
|
||||
/** Test for Bug 491577 **/
|
||||
|
||||
// test setup
|
||||
let ss = Cc["@mozilla.org/browser/sessionstore;1"].getService(Ci.nsISessionStore);
|
||||
waitForExplicitFinish();
|
||||
|
||||
const REMEMBER = Date.now(), FORGET = Math.random();
|
||||
|
@ -36,9 +36,7 @@
|
||||
|
||||
function test() {
|
||||
/** Test for Bug 493467 **/
|
||||
|
||||
let ss = Cc["@mozilla.org/browser/sessionstore;1"].getService(Ci.nsISessionStore);
|
||||
|
||||
|
||||
let tab = gBrowser.addTab();
|
||||
tab.linkedBrowser.stop();
|
||||
let tabState = JSON.parse(ss.getTabState(tab));
|
||||
|
@ -37,7 +37,6 @@
|
||||
function test() {
|
||||
/** Test for Bug 495495 **/
|
||||
|
||||
let ss = Cc["@mozilla.org/browser/sessionstore;1"].getService(Ci.nsISessionStore);
|
||||
waitForExplicitFinish();
|
||||
|
||||
let newWin = openDialog(location, "_blank", "chrome,all,dialog=no,toolbar=yes");
|
||||
|
@ -98,7 +98,6 @@ function test() {
|
||||
// Tests session restore functionality of history.pushState and
|
||||
// history.replaceState(). (Bug 500328)
|
||||
|
||||
let ss = Cc["@mozilla.org/browser/sessionstore;1"].getService(Ci.nsISessionStore);
|
||||
waitForExplicitFinish();
|
||||
|
||||
// We open a new blank window, let it load, and then load in
|
||||
|
@ -41,9 +41,6 @@ function test() {
|
||||
// test setup
|
||||
waitForExplicitFinish();
|
||||
|
||||
let ss = Cc["@mozilla.org/browser/sessionstore;1"].
|
||||
getService(Ci.nsISessionStore);
|
||||
|
||||
// read the sessionstore.js mtime (picked from browser_248970_a.js)
|
||||
let profilePath = Cc["@mozilla.org/file/directory_service;1"].
|
||||
getService(Ci.nsIProperties).
|
||||
|
@ -37,9 +37,6 @@
|
||||
function test() {
|
||||
/** Test for Bug 514751 (Wallpaper) **/
|
||||
|
||||
let ss = Cc["@mozilla.org/browser/sessionstore;1"].
|
||||
getService(Ci.nsISessionStore);
|
||||
|
||||
waitForExplicitFinish();
|
||||
|
||||
let state = {
|
||||
|
@ -41,9 +41,6 @@ function test() {
|
||||
waitForExplicitFinish();
|
||||
requestLongerTimeout(2);
|
||||
|
||||
let ss = Cc["@mozilla.org/browser/sessionstore;1"].
|
||||
getService(Ci.nsISessionStore);
|
||||
|
||||
// This tests the following use case:
|
||||
// User opens a new tab which gets focus. The user types something into the
|
||||
// address bar, then crashes or quits.
|
||||
|
@ -38,8 +38,6 @@
|
||||
function test() {
|
||||
/** Test for Bug 524745 **/
|
||||
|
||||
let ss = Cc["@mozilla.org/browser/sessionstore;1"].
|
||||
getService(Ci.nsISessionStore);
|
||||
let uniqKey = "bug524745";
|
||||
let uniqVal = Date.now();
|
||||
|
||||
|
@ -39,8 +39,6 @@ function test() {
|
||||
/** Test for Bug 526613 **/
|
||||
|
||||
// test setup
|
||||
let ss = Cc["@mozilla.org/browser/sessionstore;1"].
|
||||
getService(Ci.nsISessionStore);
|
||||
waitForExplicitFinish();
|
||||
|
||||
function browserWindowsCount(expected) {
|
||||
|
@ -1,5 +1,3 @@
|
||||
var ss = Cc["@mozilla.org/browser/sessionstore;1"].getService(Ci.nsISessionStore);
|
||||
|
||||
function browserWindowsCount(expected) {
|
||||
var count = 0;
|
||||
var e = Services.wm.getEnumerator("navigator:browser");
|
||||
|
@ -45,8 +45,6 @@ function test() {
|
||||
|
||||
// Tell the session storer that the tab is pinned
|
||||
let newTabState = '{"entries":[{"url":"about:robots"}],"pinned":true,"userTypedValue":"Hello World!"}';
|
||||
let ss = Cc["@mozilla.org/browser/sessionstore;1"]
|
||||
.getService(Ci.nsISessionStore);
|
||||
ss.setTabState(tab1, newTabState);
|
||||
|
||||
// Undo pinning
|
||||
|
@ -35,9 +35,6 @@
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
let ss = Cc["@mozilla.org/browser/sessionstore;1"].
|
||||
getService(Ci.nsISessionStore);
|
||||
|
||||
let stateBackup = ss.getBrowserState();
|
||||
|
||||
function test() {
|
||||
|
@ -35,11 +35,8 @@
|
||||
*
|
||||
* ***** END LICENSE BLOCK *****/
|
||||
|
||||
// Tests that an about:blank tab with no history will not be saved into
|
||||
// session store and thus, it will not show up in Recently Closed Tabs.
|
||||
|
||||
let ss = Cc["@mozilla.org/browser/sessionstore;1"].
|
||||
getService(Ci.nsISessionStore);
|
||||
// Tests that an about:blank tab with no history will not be saved into
|
||||
// session store and thus, it will not show up in Recently Closed Tabs.
|
||||
|
||||
let tab;
|
||||
function test() {
|
||||
|
@ -35,9 +35,6 @@
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
let ss = Cc["@mozilla.org/browser/sessionstore;1"].
|
||||
getService(Ci.nsISessionStore);
|
||||
|
||||
let stateBackup = ss.getBrowserState();
|
||||
|
||||
const TAB_STATE_NEEDS_RESTORE = 1;
|
||||
|
@ -43,7 +43,6 @@ function observeOneRestore(callback) {
|
||||
};
|
||||
|
||||
function test() {
|
||||
let ss = Cc["@mozilla.org/browser/sessionstore;1"].getService(Ci.nsISessionStore);
|
||||
waitForExplicitFinish();
|
||||
|
||||
// There should be one tab when we start the test
|
||||
|
@ -38,9 +38,6 @@
|
||||
// Mirrors WINDOW_ATTRIBUTES IN nsSessionStore.js
|
||||
const WINDOW_ATTRIBUTES = ["width", "height", "screenX", "screenY", "sizemode"];
|
||||
|
||||
let ss = Cc["@mozilla.org/browser/sessionstore;1"].
|
||||
getService(Ci.nsISessionStore);
|
||||
|
||||
let stateBackup = ss.getBrowserState();
|
||||
|
||||
let originalWarnOnClose = gPrefService.getBoolPref("browser.tabs.warnOnClose");
|
||||
|
@ -37,9 +37,6 @@
|
||||
|
||||
const NUM_TABS = 12;
|
||||
|
||||
let ss = Cc["@mozilla.org/browser/sessionstore;1"].
|
||||
getService(Ci.nsISessionStore);
|
||||
|
||||
let stateBackup = ss.getBrowserState();
|
||||
|
||||
function test() {
|
||||
|
@ -1,9 +1,6 @@
|
||||
/* Any copyright is dedicated to the Public Domain.
|
||||
http://creativecommons.org/publicdomain/zero/1.0/ */
|
||||
|
||||
let ss = Cc["@mozilla.org/browser/sessionstore;1"].
|
||||
getService(Ci.nsISessionStore);
|
||||
|
||||
let stateBackup = ss.getBrowserState();
|
||||
|
||||
function test() {
|
||||
|
@ -1,9 +1,6 @@
|
||||
/* Any copyright is dedicated to the Public Domain.
|
||||
http://creativecommons.org/publicdomain/zero/1.0/ */
|
||||
|
||||
let ss = Cc["@mozilla.org/browser/sessionstore;1"].
|
||||
getService(Ci.nsISessionStore);
|
||||
|
||||
const TAB_STATE_NEEDS_RESTORE = 1;
|
||||
const TAB_STATE_RESTORING = 2;
|
||||
|
||||
|
@ -40,8 +40,6 @@ function test() {
|
||||
|
||||
waitForExplicitFinish();
|
||||
|
||||
let ss = Cc["@mozilla.org/browser/sessionstore;1"].
|
||||
getService(Ci.nsISessionStore);
|
||||
let pb = Cc["@mozilla.org/privatebrowsing;1"].
|
||||
getService(Ci.nsIPrivateBrowsingService);
|
||||
|
||||
|
@ -35,9 +35,6 @@
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
let ss = Cc["@mozilla.org/browser/sessionstore;1"].
|
||||
getService(Ci.nsISessionStore);
|
||||
|
||||
function test() {
|
||||
/** Test for Bug 597315 - Frameset history does not work properly when restoring a tab **/
|
||||
waitForExplicitFinish();
|
||||
|
@ -38,9 +38,6 @@
|
||||
const TAB_STATE_NEEDS_RESTORE = 1;
|
||||
const TAB_STATE_RESTORING = 2;
|
||||
|
||||
let ss = Cc["@mozilla.org/browser/sessionstore;1"].
|
||||
getService(Ci.nsISessionStore);
|
||||
|
||||
let stateBackup = ss.getBrowserState();
|
||||
|
||||
function cleanup() {
|
||||
|
@ -35,9 +35,6 @@
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
let ss = Cc["@mozilla.org/browser/sessionstore;1"].
|
||||
getService(Ci.nsISessionStore);
|
||||
|
||||
let stateBackup = ss.getBrowserState();
|
||||
|
||||
function test() {
|
||||
|
@ -37,8 +37,6 @@
|
||||
|
||||
// This tests that pinning/unpinning a tab, on its own, eventually triggers a
|
||||
// session store.
|
||||
let ss = Cc["@mozilla.org/browser/sessionstore;1"].
|
||||
getService(Ci.nsISessionStore);
|
||||
|
||||
function test() {
|
||||
waitForExplicitFinish();
|
||||
|
@ -38,9 +38,6 @@
|
||||
const TAB_STATE_NEEDS_RESTORE = 1;
|
||||
const TAB_STATE_RESTORING = 2;
|
||||
|
||||
let ss = Cc["@mozilla.org/browser/sessionstore;1"].
|
||||
getService(Ci.nsISessionStore);
|
||||
|
||||
let stateBackup = ss.getBrowserState();
|
||||
|
||||
function cleanup() {
|
||||
|
@ -35,9 +35,6 @@
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
var ss = Cc["@mozilla.org/browser/sessionstore;1"].
|
||||
getService(Ci.nsISessionStore);
|
||||
|
||||
const stateBackup = ss.getBrowserState();
|
||||
const testState = {
|
||||
windows: [{
|
||||
|
@ -35,9 +35,6 @@
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
var ss = Cc["@mozilla.org/browser/sessionstore;1"].
|
||||
getService(Ci.nsISessionStore);
|
||||
|
||||
const stateBackup = ss.getBrowserState();
|
||||
const testState = {
|
||||
windows: [{
|
||||
|
@ -1,9 +1,6 @@
|
||||
/* Any copyright is dedicated to the Public Domain.
|
||||
http://creativecommons.org/publicdomain/zero/1.0/ */
|
||||
|
||||
let ss = Cc["@mozilla.org/browser/sessionstore;1"].
|
||||
getService(Ci.nsISessionStore);
|
||||
|
||||
function test() {
|
||||
let assertNumberOfTabs = function (num, msg) {
|
||||
is(gBrowser.tabs.length, num, msg);
|
||||
|
@ -21,10 +21,10 @@ function test() {
|
||||
|
||||
// We'll clear all closed windows to make sure our state is clean
|
||||
// forgetClosedWindow doesn't trigger a delayed save
|
||||
while(SS_SVC.getClosedWindowCount()) {
|
||||
SS_SVC.forgetClosedWindow(0);
|
||||
while (ss.getClosedWindowCount()) {
|
||||
ss.forgetClosedWindow(0);
|
||||
}
|
||||
is(SS_SVC.getClosedWindowCount(), 0, "starting with no closed windows");
|
||||
is(ss.getClosedWindowCount(), 0, "starting with no closed windows");
|
||||
|
||||
// Open a new window, which should trigger a save event soon.
|
||||
waitForSaveState(onSaveState);
|
||||
@ -33,7 +33,7 @@ function test() {
|
||||
|
||||
function onSaveState() {
|
||||
// Double check that we have no closed windows
|
||||
is(SS_SVC.getClosedWindowCount(), 0, "no closed windows on first save");
|
||||
is(ss.getClosedWindowCount(), 0, "no closed windows on first save");
|
||||
|
||||
Services.obs.addObserver(observe1, "sessionstore-state-write", false);
|
||||
|
||||
@ -43,7 +43,7 @@ function onSaveState() {
|
||||
|
||||
function observe1(aSubject, aTopic, aData) {
|
||||
info("observe1: " + aTopic);
|
||||
switch(aTopic) {
|
||||
switch (aTopic) {
|
||||
case "sessionstore-state-write":
|
||||
aSubject.QueryInterface(Ci.nsISupportsString);
|
||||
let state = JSON.parse(aSubject.data);
|
||||
@ -53,7 +53,7 @@ function observe1(aSubject, aTopic, aData) {
|
||||
"observe1: no closed windows in data being writted to disk");
|
||||
|
||||
// The API still treats the closed window as closed, so ensure that window is there
|
||||
is(SS_SVC.getClosedWindowCount(), 1,
|
||||
is(ss.getClosedWindowCount(), 1,
|
||||
"observe1: 1 closed window according to API");
|
||||
Services.obs.removeObserver(observe1, "sessionstore-state-write", false);
|
||||
Services.obs.addObserver(observe1, "sessionstore-state-write-complete", false);
|
||||
@ -67,7 +67,7 @@ function observe1(aSubject, aTopic, aData) {
|
||||
|
||||
function observe2(aSubject, aTopic, aData) {
|
||||
info("observe2: " + aTopic);
|
||||
switch(aTopic) {
|
||||
switch (aTopic) {
|
||||
case "sessionstore-state-write":
|
||||
aSubject.QueryInterface(Ci.nsISupportsString);
|
||||
let state = JSON.parse(aSubject.data);
|
||||
@ -77,7 +77,7 @@ function observe2(aSubject, aTopic, aData) {
|
||||
"observe2: 1 closed window in data being writted to disk");
|
||||
|
||||
// The API still treats the closed window as closed, so ensure that window is there
|
||||
is(SS_SVC.getClosedWindowCount(), 1,
|
||||
is(ss.getClosedWindowCount(), 1,
|
||||
"observe2: 1 closed window according to API");
|
||||
Services.obs.removeObserver(observe2, "sessionstore-state-write", false);
|
||||
Services.obs.addObserver(observe2, "sessionstore-state-write-complete", false);
|
||||
@ -101,8 +101,8 @@ function done() {
|
||||
gBrowser.removeTab(newTab);
|
||||
// The API still represents the closed window as closed, so we can clear it
|
||||
// with the API, but just to make sure...
|
||||
is(SS_SVC.getClosedWindowCount(), 1, "1 closed window according to API");
|
||||
SS_SVC.forgetClosedWindow(0);
|
||||
is(ss.getClosedWindowCount(), 1, "1 closed window according to API");
|
||||
ss.forgetClosedWindow(0);
|
||||
executeSoon(finish);
|
||||
}
|
||||
|
||||
|
@ -39,9 +39,6 @@
|
||||
// Specifically, that session store does not rely on an invalid cache when
|
||||
// constructing data for a tab which is loading.
|
||||
|
||||
let ss = Cc["@mozilla.org/browser/sessionstore;1"].
|
||||
getService(Ci.nsISessionStore);
|
||||
|
||||
// The newly created tab which we load a URL into and try closing/undoing.
|
||||
let tab;
|
||||
|
||||
|
@ -1,9 +1,6 @@
|
||||
/* Any copyright is dedicated to the Public Domain.
|
||||
http://creativecommons.org/publicdomain/zero/1.0/ */
|
||||
|
||||
let ss = Cc["@mozilla.org/browser/sessionstore;1"].
|
||||
getService(Ci.nsISessionStore);
|
||||
|
||||
function test() {
|
||||
let assertNumberOfTabs = function (num, msg) {
|
||||
is(gBrowser.tabs.length, num, msg);
|
||||
|
@ -63,7 +63,7 @@ function testBug635418_1() {
|
||||
}
|
||||
|
||||
function testBug635418_2() {
|
||||
let state = JSON.parse(SS_SVC.getBrowserState());
|
||||
let state = JSON.parse(ss.getBrowserState());
|
||||
ok(!state.windows[0].tabs[0].hidden, "first tab should still not be hidden");
|
||||
ok(state.windows[0].tabs[1].hidden, "second tab should be hidden by now");
|
||||
|
||||
@ -72,7 +72,7 @@ function testBug635418_2() {
|
||||
}
|
||||
|
||||
function testBug635418_3() {
|
||||
let state = JSON.parse(SS_SVC.getBrowserState());
|
||||
let state = JSON.parse(ss.getBrowserState());
|
||||
ok(!state.windows[0].tabs[0].hidden, "first tab should still still not be hidden");
|
||||
ok(!state.windows[0].tabs[1].hidden, "second tab should not be hidden again");
|
||||
|
||||
|
@ -1,9 +1,6 @@
|
||||
/* Any copyright is dedicated to the Public Domain.
|
||||
http://creativecommons.org/publicdomain/zero/1.0/ */
|
||||
|
||||
let ss = Cc["@mozilla.org/browser/sessionstore;1"].
|
||||
getService(Ci.nsISessionStore);
|
||||
|
||||
const TAB_STATE_NEEDS_RESTORE = 1;
|
||||
const TAB_STATE_RESTORING = 2;
|
||||
|
||||
|
@ -35,8 +35,7 @@
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
const SS_SVC = Cc["@mozilla.org/browser/sessionstore;1"].
|
||||
getService(Ci.nsISessionStore);
|
||||
let ss = Cc["@mozilla.org/browser/sessionstore;1"].getService(Ci.nsISessionStore);
|
||||
|
||||
// This assumes that tests will at least have some state/entries
|
||||
function waitForBrowserState(aState, aSetStateCallback) {
|
||||
@ -118,7 +117,7 @@ function waitForBrowserState(aState, aSetStateCallback) {
|
||||
gBrowser.tabContainer.addEventListener("SSTabRestored", onSSTabRestored, true);
|
||||
|
||||
// Finally, call setBrowserState
|
||||
SS_SVC.setBrowserState(JSON.stringify(aState));
|
||||
ss.setBrowserState(JSON.stringify(aState));
|
||||
}
|
||||
|
||||
// waitForSaveState waits for a state write but not necessarily for the state to
|
||||
|
@ -28,3 +28,10 @@
|
||||
fun:_XSend
|
||||
fun:XChangeProperty
|
||||
}
|
||||
{
|
||||
malloc-libmozsqlite3.so
|
||||
Memcheck:Leak
|
||||
fun:malloc
|
||||
...
|
||||
obj:/builds/slave/valgrind-linux/objdir/dist/firefox/libmozsqlite3.so
|
||||
}
|
||||
|
@ -31,6 +31,19 @@ function isPixel(ctx, x,y, r,g,b,a, pos, colour, d) {
|
||||
"pixel "+pos+" is "+pr+","+pg+","+pb+","+pa+"; expected "+colour+" +/- "+d);
|
||||
}
|
||||
|
||||
function todo_isPixel(ctx, x,y, r,g,b,a, pos, colour, d) {
|
||||
var pixel = ctx.getImageData(x, y, 1, 1);
|
||||
var pr = pixel.data[0],
|
||||
pg = pixel.data[1],
|
||||
pb = pixel.data[2],
|
||||
pa = pixel.data[3];
|
||||
todo(r-d <= pr && pr <= r+d &&
|
||||
g-d <= pg && pg <= g+d &&
|
||||
b-d <= pb && pb <= b+d &&
|
||||
a-d <= pa && pa <= a+d,
|
||||
"pixel "+pos+" is "+pr+","+pg+","+pb+","+pa+"; expected "+colour+" +/- "+d);
|
||||
}
|
||||
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
MochiKit.DOM.addLoadEvent(function () {
|
||||
|
||||
|
@ -176,13 +176,15 @@ class GeckoSurfaceView
|
||||
Log.w("GeckoAppJava", "surfaceChanged while mInDrawing is true!");
|
||||
}
|
||||
|
||||
boolean invalidSize = false;
|
||||
boolean invalidSize;
|
||||
|
||||
if (width == 0 || height == 0) {
|
||||
mSoftwareBitmap = null;
|
||||
mSoftwareBuffer = null;
|
||||
mSoftwareBufferCopy = null;
|
||||
invalidSize = true;
|
||||
} else {
|
||||
invalidSize = false;
|
||||
}
|
||||
|
||||
boolean doSyncDraw =
|
||||
@ -205,9 +207,6 @@ class GeckoSurfaceView
|
||||
metrics.widthPixels, metrics.heightPixels);
|
||||
GeckoAppShell.sendEventToGecko(e);
|
||||
|
||||
if (!invalidSize)
|
||||
GeckoAppShell.scheduleRedraw();
|
||||
|
||||
if (!doSyncDraw) {
|
||||
if (mDrawMode == DRAW_GLES_2 || mShowingSplashScreen)
|
||||
return;
|
||||
@ -215,6 +214,8 @@ class GeckoSurfaceView
|
||||
c.drawARGB(255, 255, 255, 255);
|
||||
holder.unlockCanvasAndPost(c);
|
||||
return;
|
||||
} else {
|
||||
GeckoAppShell.scheduleRedraw();
|
||||
}
|
||||
} finally {
|
||||
mSurfaceLock.unlock();
|
||||
@ -222,7 +223,7 @@ class GeckoSurfaceView
|
||||
|
||||
Object syncDrawObject = null;
|
||||
try {
|
||||
Object syncObject = mSyncDraws.take();
|
||||
syncDrawObject = mSyncDraws.take();
|
||||
} catch (InterruptedException ie) {
|
||||
Log.e("GeckoAppJava", "Threw exception while getting sync draw bitmap/buffer: ", ie);
|
||||
}
|
||||
@ -231,6 +232,8 @@ class GeckoSurfaceView
|
||||
draw(holder, (Bitmap)syncDrawObject);
|
||||
else
|
||||
draw(holder, (ByteBuffer)syncDrawObject);
|
||||
} else {
|
||||
Log.e("GeckoSurfaceViewJava", "Synchronised draw object is null");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -790,21 +790,22 @@ var isDeeply = SimpleTest.isDeeply;
|
||||
var gOldOnError = window.onerror;
|
||||
window.onerror = function simpletestOnerror(errorMsg, url, lineNumber) {
|
||||
var funcIdentifier = "[SimpleTest/SimpleTest.js, window.onerror]";
|
||||
var isPlainMochitest = window.location.protocol != "chrome:";
|
||||
|
||||
// Log the message.
|
||||
// XXX Chrome mochitests sometimes trigger this window.onerror handler,
|
||||
// but there are a number of uncaught JS exceptions from those tests
|
||||
// currently, so we can't log them as errors just yet. For now, when
|
||||
// parentRunner is null, just dump it so that the error is visible but
|
||||
// not in a plain mochitest, just dump it so that the error is visible but
|
||||
// doesn't cause a test failure. See bug 652494.
|
||||
function logInfo(message) {
|
||||
if (parentRunner) {
|
||||
SimpleTest._logInfo(funcIdentifier, message);
|
||||
function logError(message) {
|
||||
if (isPlainMochitest) {
|
||||
SimpleTest.ok(false, funcIdentifier, message);
|
||||
} else {
|
||||
dump(funcIdentifier + " " + message);
|
||||
}
|
||||
}
|
||||
logInfo("An error occurred: " + errorMsg + " at " + url + ":" + lineNumber);
|
||||
logError("An error occurred: " + errorMsg + " at " + url + ":" + lineNumber);
|
||||
// There is no Components.stack.caller to log. (See bug 511888.)
|
||||
|
||||
// Call previous handler.
|
||||
@ -814,10 +815,10 @@ window.onerror = function simpletestOnerror(errorMsg, url, lineNumber) {
|
||||
gOldOnError(errorMsg, url, lineNumber);
|
||||
} catch (e) {
|
||||
// Log the error.
|
||||
logInfo("Exception thrown by gOldOnError(): " + e);
|
||||
logError("Exception thrown by gOldOnError(): " + e);
|
||||
// Log its stack.
|
||||
if (e.stack) {
|
||||
logInfo("JavaScript error stack:\n" + e.stack);
|
||||
logError("JavaScript error stack:\n" + e.stack);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user