Commit 25888cb0 authored by Rafael Monnerat's avatar Rafael Monnerat

Add PhanthomJS draft implementation.

parent 936994b3
......@@ -201,6 +201,26 @@ user_pref("capability.principal.codebase.p1.id", "http://%s:%s");
user_pref("capability.principal.codebase.p1.subjectName", "");""" % \
(self.host, self.port)
class PhantomJS(Browser):
def _createRunJS(self):
run_js = """
var page = new WebPage(),
address;
address = phantom.args[0];
page.open(address, function (status) {
if (status !== 'success') {
console.log('FAIL to load the address');
} else {
console.log('SUCCESS load the address');
}
phantom.exit();
});
"""
return self._createFile('run.js', run_js)
def _run(self, url):
self._runCommand(("phantomjs", "phantomjs", self._createRunJS(), url))
class FunctionalTestRunner:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment