Permalink
Browse files

add test static server to proper test repl injection works on Firefox…

… >= 40 is remote tabs feature is disabled
  • Loading branch information...
rpl committed Jul 29, 2015
1 parent 510a278 commit d344db0ba5474a5f5c17a0f92febc31ef5ac4405
Showing with 20 additions and 3 deletions.
  1. +1 −0 .travis.yml
  2. +2 −1 package.json
  3. 0 test/fixtures/index.html
  4. +4 −1 test/fixtures/test-prefs.json
  5. +13 −1 test/test-repl.js
View
@@ -3,6 +3,7 @@ language: node_js
node_js:
- "0.10"
env:
- FIREFOX_VERSION=40.0b8
- FIREFOX_VERSION=39.0
- FIREFOX_VERSION=38.0.6
- FIREFOX_VERSION=37.0.2
View
@@ -19,6 +19,7 @@
"chai": "^3.2.0",
"jpm": "^1.0.0",
"mocha": "^2.2.5",
"mozfee": "^0.1.5"
"mozfee": "^0.1.5",
"node-static": "^0.7.7"
}
}
View
No changes.
@@ -1,3 +1,6 @@
{
"extensions.mozrepl.autoStart": true
"extensions.mozrepl.autoStart": true,
"browser.tabs.remote.autostart": false,
"browser.tabs.remote.autostart.1": false,
"browser.tabs.remote.autostart.2": false
}
View
@@ -10,6 +10,16 @@ var path = require("path");
var mozrepl;
var static = require('node-static');
var file = new static.Server("./test/fixtures/");
require('http').createServer(function (request, response) {
request.addListener('end', function () {
file.serve(request, response);
}).resume();
}).listen(8080);
var manifest = jpm_utils.getManifest();
jpm_run(manifest, {
@@ -30,7 +40,9 @@ beforeEach(function(done) {
mozrepl.connect();
}
mozrepl.on("connect", done);
mozrepl.on("connect", function() {
mozrepl.eval("content.location = 'http://localhost:8080';", done);
});
mozrepl.on("error", function() {
if (retries > 0) {
console.log("RETRY");

0 comments on commit d344db0

Please sign in to comment.