mirror of https://github.com/vitalif/phantomjs
Unit test: secure connection check becomes async.
Issue #10882: https://github.com/ariya/phantomjs/issues/108821.x
parent
44c3d6080d
commit
01587211cb
|
@ -1095,16 +1095,19 @@ describe("WebPage object", function() {
|
|||
var page = require('webpage').create();
|
||||
var url = 'https://www.google.com/m';
|
||||
|
||||
var handled = false;
|
||||
var loaded = false, handled = false;
|
||||
|
||||
runs(function() {
|
||||
page.open(url, function(status) {
|
||||
loaded = true;
|
||||
expect(status == 'success').toEqual(true);
|
||||
handled = true;
|
||||
});
|
||||
});
|
||||
|
||||
waits(3000);
|
||||
waitsFor(function () {
|
||||
return loaded;
|
||||
}, 'Can not load ' + url, 3000);
|
||||
|
||||
runs(function() {
|
||||
expect(handled).toEqual(true);
|
||||
|
|
Loading…
Reference in New Issue