Unit test: secure connection check becomes async.

Issue #10882: https://github.com/ariya/phantomjs/issues/10882
1.x
Ariya Hidayat 2013-06-02 12:22:17 -07:00
parent 44c3d6080d
commit 01587211cb
1 changed files with 5 additions and 2 deletions

View File

@ -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);