puppeteer/third_party/phantomjs/test/module/webpage/no-plugin.js
2017-05-11 00:06:41 -07:00

20 lines
590 B
JavaScript

async_test(function () {
var webpage = require('webpage');
var page = webpage.create();
var pluginLength = page.evaluate(function() {
return window.navigator.plugins.length;
});
assert_equals(pluginLength, 0);
page.open(TEST_HTTP_BASE + 'hello.html',
this.step_func_done(function (status) {
assert_equals(status, 'success');
var pluginLength = page.evaluate(function() {
return window.navigator.plugins.length;
});
assert_equals(pluginLength, 0);
}));
}, "window.navigator.plugins is empty");