From: Jacek Caban jacek@codeweavers.com
--- dlls/mshtml/omnavigator.c | 2 +- dlls/mshtml/tests/documentmode.js | 2 +- dlls/mshtml/tests/es5.js | 12 ++++++++++++ 3 files changed, 14 insertions(+), 2 deletions(-)
diff --git a/dlls/mshtml/omnavigator.c b/dlls/mshtml/omnavigator.c index 88dfa1b5bf9..acb4e995425 100644 --- a/dlls/mshtml/omnavigator.c +++ b/dlls/mshtml/omnavigator.c @@ -242,7 +242,7 @@ HRESULT create_dom_implementation(HTMLDocumentNode *doc_node, IHTMLDOMImplementa dom_implementation->IHTMLDOMImplementation2_iface.lpVtbl = &HTMLDOMImplementation2Vtbl; dom_implementation->browser = doc_node->browser;
- init_dispatch(&dom_implementation->dispex, &HTMLDOMImplementation_dispex, NULL, doc_node->document_mode); + init_dispatch(&dom_implementation->dispex, &HTMLDOMImplementation_dispex, doc_node->window, doc_node->document_mode);
nsres = nsIDOMDocument_GetImplementation(doc_node->dom_document, &dom_implementation->implementation); if(NS_FAILED(nsres)) { diff --git a/dlls/mshtml/tests/documentmode.js b/dlls/mshtml/tests/documentmode.js index 151ff0f1683..4368e4e45bd 100644 --- a/dlls/mshtml/tests/documentmode.js +++ b/dlls/mshtml/tests/documentmode.js @@ -301,7 +301,7 @@ sync_test("builtin_toString", function() { if(v >= 11 /* todo_wine */) test("document", document, v < 11 ? "Document" : "HTMLDocument", null, true); test("elements", document.getElementsByTagName("body"), "HTMLCollection", null, true); test("history", window.history, "History", null, true); - test("implementation", document.implementation, "DOMImplementation", null, true); + test("implementation", document.implementation, "DOMImplementation"); if(localStorage) test("localStorage", localStorage, "Storage", null, true); test("location", window.location, "Object", window.location.href, null, true); if(v >= 11 /* todo_wine */) test("mimeTypes", window.navigator.mimeTypes, v < 11 ? "MSMimeTypesCollection" : "MimeTypeArray", null, true); diff --git a/dlls/mshtml/tests/es5.js b/dlls/mshtml/tests/es5.js index b1340918fad..b04c13de984 100644 --- a/dlls/mshtml/tests/es5.js +++ b/dlls/mshtml/tests/es5.js @@ -2646,3 +2646,15 @@ sync_test("screen", function() { ok(!check_enum(o, "defprop"), "defprop enumerated"); ok(!check_enum(o, "prop2"), "prop2 enumerated"); }); + +sync_test("builtin_func", function() { + var o = document.implementation; + var f = o.hasFeature; + + ok(f instanceof Function, "f is not an instance of Function"); + ok(Object.getPrototypeOf(f) === Function.prototype, "Object.getPrototypeOf(f) = " + Object.getPrototypeOf(f)); + ok(!f.hasOwnProperty("length"), "f has own length property"); + ok(f.length === 0, "f.length = " + f.length); + ok(f.call(o, "test", 1) === false, 'f.call(o, "test", 1) = ' + f.call(o, "test", 1)); + ok("" + f === "\nfunction hasFeature() {\n [native code]\n}\n", "f = " + f); +});