Jacek Caban : mshtml/tests: Added more ownerDocument property tests.

Alexandre Julliard julliard at winehq.org
Mon Feb 19 13:52:02 CST 2018


Module: wine
Branch: master
Commit: 7586334008364935ac3c8cc2699474cf7e859ccc
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=7586334008364935ac3c8cc2699474cf7e859ccc

Author: Jacek Caban <jacek at codeweavers.com>
Date:   Mon Feb 19 14:48:54 2018 +0100

mshtml/tests: Added more ownerDocument property tests.

Signed-off-by: Jacek Caban <jacek at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/mshtml/tests/elements.js | 24 +++++++++++++++++++++++-
 1 file changed, 23 insertions(+), 1 deletion(-)

diff --git a/dlls/mshtml/tests/elements.js b/dlls/mshtml/tests/elements.js
index a16194f..089d356 100644
--- a/dlls/mshtml/tests/elements.js
+++ b/dlls/mshtml/tests/elements.js
@@ -187,6 +187,27 @@ function test_compare_position() {
     next_test();
 }
 
+function test_document_owner() {
+    var node;
+
+    ok(document.ownerDocument === null, "ownerDocument = " + document.ownerDocument);
+    ok(document.body.ownerDocument === document,
+       "body.ownerDocument = " + document.body.ownerDocument);
+    ok(document.documentElement.ownerDocument === document,
+       "documentElement.ownerDocument = " + document.documentElement.ownerDocument);
+
+    node = document.createElement("test");
+    ok(node.ownerDocument === document, "element.ownerDocument = " + node.ownerDocument);
+
+    node = document.createDocumentFragment("test");
+    ok(node.ownerDocument === document, "fragment.ownerDocument = " + node.ownerDocument);
+
+    node = document.createTextNode("test");
+    ok(node.ownerDocument === document, "text.ownerDocument = " + node.ownerDocument);
+
+    next_test();
+}
+
 var tests = [
     test_input_selection,
     test_textContent,
@@ -195,5 +216,6 @@ var tests = [
     test_head,
     test_iframe,
     test_query_selector,
-    test_compare_position
+    test_compare_position,
+    test_document_owner
 ];




More information about the wine-cvs mailing list