puppeteer/third_party/phantomjs/test/module/webpage/no-plugin.js

20 lines
590 B
JavaScript
Raw Normal View History

2017-05-11 07:06:41 +00:00
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");