diff options
| author | Phil Crosby | 2014-08-12 08:28:42 -0700 |
|---|---|---|
| committer | Phil Crosby | 2014-08-12 08:28:42 -0700 |
| commit | be76291cfdbae4ce142efe2ab35795fff91e12e6 (patch) | |
| tree | 954c65df8cca963e20fe8803a636fb924d107deb /tests | |
| parent | 4ab75878b3d59c0f970195bfae191781e0b9f5b3 (diff) | |
| parent | 06729270f7e3968d9a6bd6c8ec8d47f3afe97bd7 (diff) | |
| download | vimium-be76291cfdbae4ce142efe2ab35795fff91e12e6.tar.bz2 | |
Merge pull request #922 from camflint/FixBuildAndTestTasksOnWindows
Fix build and test tasks on Windows
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/dom_tests/phantom_runner.coffee | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/tests/dom_tests/phantom_runner.coffee b/tests/dom_tests/phantom_runner.coffee index 91eeb526..d05d9ab4 100644 --- a/tests/dom_tests/phantom_runner.coffee +++ b/tests/dom_tests/phantom_runner.coffee @@ -1,5 +1,6 @@ system = require 'system' fs = require 'fs' +path = require 'path' page = require('webpage').create() page.settings.userAgent = 'phantom' @@ -12,12 +13,16 @@ page.viewportSize = page.onConsoleMessage = (msg) -> console.log msg -dirname = do -> - pathParts = system.args[0].split(fs.separator) - pathParts[pathParts.length - 1] = '' - pathParts.join(fs.separator) +page.onError = (msg, trace) -> + console.log(msg); + trace.forEach (item) -> + console.log(' ', item.file, ':', item.line) -page.open dirname + 'dom_tests.html', (status) -> +page.onResourceError = (resourceError) -> + console.log(resourceError.errorString) + +testfile = path.join(path.dirname(system.args[0]), 'dom_tests.html') +page.open testfile, (status) -> if status != 'success' console.log 'Unable to load tests.' phantom.exit 1 |
