mirror of https://github.com/vitalif/phantomjs
Add a test to demonstrate the problem with JSON-ification.
https://github.com/ariya/phantomjs/issues/126152.0
parent
5768b705a0
commit
7bcb9a8725
|
@ -0,0 +1,14 @@
|
|||
var assert = require('../../assert');
|
||||
var webpage = require('webpage');
|
||||
|
||||
var page = webpage.create();
|
||||
|
||||
// Hijack JSON.parse to something completely useless.
|
||||
page.content = '<html><script>JSON.parse = function() {}</script></html>';
|
||||
|
||||
var result = page.evaluate(function(obj) {
|
||||
return obj.value * obj.value;
|
||||
}, { value: 4 });
|
||||
|
||||
// FAIL
|
||||
// assert.equal(result, 16);
|
Loading…
Reference in New Issue