Jacek Caban (@jacek) commented about dlls/mshtml/tests/documentmode.js:
window.toString.call(null); ok(false, "expected exception calling window.toString with null context"); }catch(ex) {}
- }else {
ok(window instanceof Object, "window not instance of Object");
ok(document instanceof Object, "document not instance of Object");
ok(Object.isExtensible(window), "window is not extensible");
ok(Object.isExtensible(document), "document is not extensible");
ok(f.toString() === "\nfunction createElement() {\n [native code]\n}\n", "f.toString() = " + f.toString());
ok(Object.getPrototypeOf(f) === Function.prototype, "unexpected document.createElement prototype");
ok(Object.getPrototypeOf(f.apply) === Function.prototype, "unexpected f.apply prototype");
ok(Object.getPrototypeOf(f.call) === Function.prototype, "unexpected f.call prototype");
We have some of that in "builtin_func". You essentially test `Function.prototype.call`'s prototype, which is not specific to builtin functions anymore. It really comes down to `!f.hasOwnProperty("apply")`.