Backed out changeset 8d5f10959b2c (bug 1073462) for adding a frequent bc3 failure to open a CLOSED TREE

This commit is contained in:
Wes Kocher 2015-03-04 17:48:02 -08:00
parent 073b9fa9a9
commit 69218dd87b
6 changed files with 20 additions and 65 deletions

View File

@ -140,7 +140,6 @@ let WebProgressListener = {
json.charset = content.document.characterSet;
json.mayEnableCharacterEncodingMenu = docShell.mayEnableCharacterEncodingMenu;
json.principal = content.document.nodePrincipal;
json.synthetic = content.document.mozSyntheticDocument;
}
sendAsyncMessage("Content:LocationChange", json, objects);
@ -327,6 +326,22 @@ addEventListener("ImageContentLoaded", function (aEvent) {
}
}, false);
let DocumentObserver = {
init: function() {
Services.obs.addObserver(this, "document-element-inserted", false);
addEventListener("unload", () => {
Services.obs.removeObserver(this, "document-element-inserted");
});
},
observe: function(aSubject, aTopic, aData) {
if (aSubject == content.document) {
sendAsyncMessage("DocumentInserted", {synthetic: aSubject.mozSyntheticDocument});
}
},
};
DocumentObserver.init();
const ZoomManager = {
get fullZoom() {
return this._cache.fullZoom;

View File

@ -18,9 +18,6 @@ skip-if = e10s
skip-if = e10s # Disabled for e10s: Bug ?????? - seems to be a timing issue with RemoteFinder.jsm messages coming later than the tests expect.
[browser_input_file_tooltips.js]
skip-if = e10s # Bug ?????? - test directly manipulates content (TypeError: doc.createElement is not a function)
[browser_isSynthetic.js]
support-files =
empty.png
[browser_keyevents_during_autoscrolling.js]
skip-if = e10s # Bug 921935 - focusmanager issues with e10s
[browser_save_resend_postdata.js]

View File

@ -1,60 +0,0 @@
function waitForLoad(browser) {
return new Promise(resolve => {
let wasSynthetic = browser.isSyntheticDocument;
browser.addProgressListener({
onLocationChange: function(webProgress, request, location, flags) {
wasSynthetic = browser.isSyntheticDocument;
},
onStateChange: function(webProgress, request, flags, status) {
let docStop = Ci.nsIWebProgressListener.STATE_IS_NETWORK |
Ci.nsIWebProgressListener.STATE_STOP;
if ((flags & docStop) == docStop) {
browser.removeProgressListener(this);
resolve(wasSynthetic);
}
},
QueryInterface: XPCOMUtils.generateQI([Ci.nsIWebProgressListener,
Ci.nsISupportsWeakReference])
});
});
}
const FILES = gTestPath.replace("browser_isSynthetic.js", "")
.replace("chrome://mochitests/content/", "http://example.com/");
add_task(function*() {
let tab = gBrowser.addTab("about:blank");
let browser = tab.linkedBrowser;
yield waitForLoad(browser);
is(browser.isSyntheticDocument, false, "Should not be synthetic");
let loadPromise = waitForLoad(browser);
browser.loadURI("data:text/html;charset=utf-8,<html/>");
let wasSynthetic = yield loadPromise;
is(wasSynthetic, false, "Should not be synthetic");
is(browser.isSyntheticDocument, false, "Should not be synthetic");
loadPromise = waitForLoad(browser);
browser.loadURI(FILES + "empty.png");
wasSynthetic = yield loadPromise;
is(wasSynthetic, true, "Should be synthetic");
is(browser.isSyntheticDocument, true, "Should be synthetic");
loadPromise = waitForLoad(browser);
browser.goBack();
wasSynthetic = yield loadPromise;
is(wasSynthetic, false, "Should not be synthetic");
is(browser.isSyntheticDocument, false, "Should not be synthetic");
loadPromise = waitForLoad(browser);
browser.goForward();
wasSynthetic = yield loadPromise;
is(wasSynthetic, true, "Should be synthetic");
is(browser.isSyntheticDocument, true, "Should be synthetic");
gBrowser.removeTab(tab);
});

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

View File

@ -322,6 +322,10 @@
break;
}
case "DocumentInserted":
this._isSyntheticDocument = data.synthetic;
break;
case "FullZoomChange": {
this._fullZoom = data.value;
let event = document.createEvent("Events");

View File

@ -198,7 +198,6 @@ RemoteWebProgressManager.prototype = {
this._browser._imageDocument = null;
this._browser._mayEnableCharacterEncodingMenu = json.mayEnableCharacterEncodingMenu;
this._browser._contentPrincipal = json.principal;
this._browser._isSyntheticDocument = json.synthetic;
}
this._callProgressListeners("onLocationChange", webProgress, request, location, flags);