Make Scratchpad's reloadAndRun use the RDP and enable scratchpad tests with e10s (bug 1106702). r=harth

This commit is contained in:
Panos Astithas 2014-12-16 10:43:08 +02:00
parent 968c3084d0
commit fc9b0c05eb
2 changed files with 9 additions and 19 deletions

View File

@ -572,20 +572,11 @@ var Scratchpad = {
return;
}
let browser = this.gBrowser.selectedBrowser;
this._reloadAndRunEvent = evt => {
if (evt.target !== browser.contentDocument) {
return;
}
browser.removeEventListener("load", this._reloadAndRunEvent, true);
this.run().then(aResults => deferred.resolve(aResults));
};
browser.addEventListener("load", this._reloadAndRunEvent, true);
browser.contentWindow.location.reload();
let target = TargetFactory.forTab(this.gBrowser.selectedTab);
target.once("navigate", () => {
this.run().then(results => deferred.resolve(results));
});
target.makeRemote().then(() => target.activeTab.reload());
return deferred.promise;
},
@ -2067,8 +2058,8 @@ ScratchpadTab.prototype = {
/**
* Initialize a debugger client and connect it to the debugger server.
*
* @param object aSubject
* The tab or window to obtain the connection for.
* @param object aSubject
* The tab or window to obtain the connection for.
* @return Promise
* The promise for the result of connecting to this tab or window.
*/
@ -2113,8 +2104,8 @@ ScratchpadTab.prototype = {
/**
* Attach to this tab.
*
* @param object aSubject
* The tab or window to obtain the connection for.
* @param object aSubject
* The tab or window to obtain the connection for.
* @return Promise
* The promise for the TabTarget for this tab.
*/

View File

@ -1,5 +1,4 @@
[DEFAULT]
skip-if = e10s # Bug ?????? - devtools tests disabled with e10s
subsuite = devtools
support-files = head.js