Bug 1056871 - Remove workarounds for bug 687194 in tests. r=mconley

This commit is contained in:
Michael Pruett 2014-09-28 21:52:25 -05:00
parent ab65de651f
commit 06db6f98bd
2 changed files with 2 additions and 21 deletions

View File

@ -109,16 +109,7 @@ function addTab(url) {
let browser = tab.linkedBrowser;
info("Loading the helper frame script " + FRAME_SCRIPT_URL);
// Bug 687194 - Mochitest registers its chrome URLs after browser
// initialization, so the content processes don't pick them up. That
// means we can't load our frame script from its chrome URI, because
// the content process won't be able to find it.
// Instead, we resolve the chrome URI for the script to a file URI, which
// we can then pass to the content process, which it is able to find.
let registry = Cc['@mozilla.org/chrome/chrome-registry;1']
.getService(Ci.nsIChromeRegistry);
let fileURI = registry.convertChromeURL(Services.io.newURI(FRAME_SCRIPT_URL, null, null)).spec;
browser.messageManager.loadFrameScript(fileURI, false);
browser.messageManager.loadFrameScript(FRAME_SCRIPT_URL, false);
browser.addEventListener("load", function onload() {
browser.removeEventListener("load", onload, true);

View File

@ -156,17 +156,7 @@ function loadAndSelectTestTab() {
gBrowser.selectedTab = tab;
let browser = gBrowser.getBrowserForTab(tab);
// Bug 687194 - Mochitest registers its chrome URLs after browser
// initialization, so the content processes don't pick them up. That
// means we can't load our frame script from its chrome URI, because
// the content process won't be able to find it.
//
// Instead, we resolve the chrome URI for the script to a file URI, which
// we can then pass to the content process, which it is able to find.
let registry = Cc['@mozilla.org/chrome/chrome-registry;1'].getService(Ci.nsIChromeRegistry);
let fileURI = registry.convertChromeURL(Services.io.newURI(kContentScript, null, null)).spec;
browser.messageManager.loadFrameScript(fileURI, false);
browser.messageManager.loadFrameScript(kContentScript, false);
let deferred = Promise.defer();
browser.addEventListener("DOMContentLoaded", function onBrowserLoad(aEvent) {