зеркало из https://github.com/mozilla/pluotsorbet.git
use slimerjs 0.10pre to kill and report unresponsive scripts
This commit is contained in:
Родитель
0abf5abc7b
Коммит
219d784ccb
|
@ -2,10 +2,12 @@ language: node_js
|
|||
node_js:
|
||||
- "0.10"
|
||||
env:
|
||||
- DISPLAY=:99.0 PATH=${PATH}:$TRAVIS_BUILD_DIR/node_modules/slimerjs/lib/slimer
|
||||
- DISPLAY=:99.0
|
||||
before_script:
|
||||
- "sh -e /etc/init.d/xvfb start"
|
||||
- npm install casperjs
|
||||
- npm install slimerjs
|
||||
- wget http://download.slimerjs.org/nightlies/latest-slimerjs-master/slimerjs-0.10.0pre-linux-x86_64.tar.bz2
|
||||
- tar x -C /tmp -f slimerjs-0.10.0pre-linux-x86_64.tar.bz2
|
||||
- export PATH=$PATH:/tmp/slimerjs-0.10.0pre
|
||||
script:
|
||||
- make test
|
||||
|
|
|
@ -96,10 +96,17 @@ function syncFS() {
|
|||
}
|
||||
|
||||
casper.test.begin("unit tests", 10 + gfxTests.length, function(test) {
|
||||
casper.start("data:text/plain,start");
|
||||
|
||||
casper.page.onLongRunningScript = function(message) {
|
||||
casper.echo("FAIL unresponsive " + message, "ERROR");
|
||||
casper.page.stopJavaScript();
|
||||
};
|
||||
|
||||
// Run the Init midlet, which does nothing by itself but ensures that any
|
||||
// initialization code gets run before we start a test that depends on it.
|
||||
casper
|
||||
.start("http://localhost:8000/index.html?midletClassName=midlets.InitMidlet&jars=tests/tests.jar&logConsole=web,page")
|
||||
.thenOpen("http://localhost:8000/index.html?midletClassName=midlets.InitMidlet&jars=tests/tests.jar&logConsole=web,page")
|
||||
.withFrame(0, function() {
|
||||
casper.waitForText("DONE", syncFS);
|
||||
});
|
||||
|
|
|
@ -23,8 +23,15 @@ casper.test.begin("fs tests", 7, function(test) {
|
|||
// by deleting and recreating the database between test runs. We may also
|
||||
// want to move over the other tests that touch the fs.
|
||||
|
||||
casper.start("data:text/plain,start");
|
||||
|
||||
casper.page.onLongRunningScript = function(message) {
|
||||
casper.echo("FAIL unresponsive " + message, "ERROR");
|
||||
casper.page.stopJavaScript();
|
||||
};
|
||||
|
||||
casper
|
||||
.start("http://localhost:8000/tests/fs/delete-fs.html")
|
||||
.thenOpen("http://localhost:8000/tests/fs/delete-fs.html")
|
||||
.waitForText("DONE");
|
||||
|
||||
// Initialize a v1 database.
|
||||
|
|
Загрузка…
Ссылка в новой задаче