4372674c99
This patch improves phantom_shim: - introduce WebPage.loading/WebPage.loadingProgress - improve compatibility of WebPage.onInitialized. This allows to pass phantomjs tests, even though the implementation is hacky. - teach PhantomResponse about "stage" state which could be either "start" or "end" - unskip a bunch of phantom webpage tests: - webpage/change-request-encoded-url - webpage/loading.js - webpage/long-running-javascript.js - webpage/modify-header.js - webpage/on-initialized.js - webpage/remove-header.js
19 lines
656 B
JavaScript
19 lines
656 B
JavaScript
async_test(function () {
|
|
var page = require('webpage').create();
|
|
|
|
page.onLongRunningScript = this.step_func_done(function () {
|
|
page.stopJavaScript();
|
|
});
|
|
|
|
page.open(TEST_HTTP_BASE + "js-infinite-loop.html",
|
|
this.step_func(function (s) {
|
|
assert_equals(s, "success");
|
|
}));
|
|
|
|
}, "page.onLongRunningScript can interrupt scripts", {
|
|
skip: true // https://github.com/ariya/phantomjs/issues/13490
|
|
// The underlying WebKit feature is so broken that an
|
|
// infinite loop in a _page_ script prevents timeouts
|
|
// from firing in the _controller_!
|
|
});
|