Port the test to check for plugin non-existence.

https://github.com/ariya/phantomjs/issues/12439
2.0
Ariya Hidayat 2014-09-14 09:35:41 -05:00
parent f85238322e
commit 83f4baf8c6
3 changed files with 18 additions and 6 deletions

View File

@ -0,0 +1,17 @@
var assert = require('../../assert');
var webpage = require('webpage');
var page = webpage.create();
var pluginLength = page.evaluate(function() {
return window.navigator.plugins.length;
});
assert.equal(pluginLength, 0);
page.open('http://localhost:9180/hello.html', function (status) {
assert.equal(status, 'success');
var pluginLength = page.evaluate(function() {
return window.navigator.plugins.length;
});
assert.equal(pluginLength, 0);
});

View File

@ -38,6 +38,7 @@ TESTS = [
'module/webpage/abort-network-request.js',
'module/webpage/resource-request-error.js',
'module/webpage/resource-received-error.js',
'module/webpage/no-plugin.js',
'module/system/system.js',
'module/system/args.js',
'module/system/os.js',

View File

@ -641,12 +641,6 @@ describe("WebPage object", function() {
});
});
it("should not load any NPAPI plugins (e.g. Flash)", function() {
runs(function() {
expect(page.evaluate(function () { return window.navigator.plugins.length; })).toEqual(0);
});
});
it("reports unhandled errors", function() {
var lastError = null;