[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc
andreas.kling at nokia.com
andreas.kling at nokia.com
Wed Dec 22 12:56:15 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit 0b61e815d29461a1306c67524078af65d59879ce
Author: andreas.kling at nokia.com <andreas.kling at nokia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Thu Sep 2 10:54:23 2010 +0000
2010-09-02 Andreas Kling <andreas.kling at nokia.com>
Unreviewed, forgot to add the new layout test in last commit.
* fast/dom/Selection/script-tests/wrong-document-err.js: Added.
* fast/dom/Selection/wrong-document-err-expected.txt: Added.
* fast/dom/Selection/wrong-document-err.html: Added.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@66656 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index a7c01c8..4390a3e 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,11 @@
+2010-09-02 Andreas Kling <andreas.kling at nokia.com>
+
+ Unreviewed, forgot to add the new layout test in last commit.
+
+ * fast/dom/Selection/script-tests/wrong-document-err.js: Added.
+ * fast/dom/Selection/wrong-document-err-expected.txt: Added.
+ * fast/dom/Selection/wrong-document-err.html: Added.
+
2010-09-01 Andreas Kling <andreas.kling at nokia.com>
Reviewed by Darin Adler.
diff --git a/LayoutTests/fast/dom/Selection/script-tests/wrong-document-err.js b/LayoutTests/fast/dom/Selection/script-tests/wrong-document-err.js
new file mode 100644
index 0000000..42a0905
--- /dev/null
+++ b/LayoutTests/fast/dom/Selection/script-tests/wrong-document-err.js
@@ -0,0 +1,23 @@
+description("Test that collapse() and selectAllChildren() throw WRONG_DOCUMENT_ERR if the node is in another document.");
+
+var sel = window.getSelection();
+var iframe = document.createElement("iframe");
+document.body.appendChild(iframe);
+var iframe_doc = iframe.contentDocument;
+var div = iframe_doc.createElement('div');
+iframe_doc.body.appendChild(div);
+var externalTextNode = iframe_doc.createTextNode("abcdef");
+div.appendChild(externalTextNode);
+
+var internalTextNode = iframe_doc.createTextNode("abcdef");
+document.body.appendChild(internalTextNode);
+
+shouldThrow("sel.collapse(externalTextNode, 0)", "'Error: WRONG_DOCUMENT_ERR: DOM Exception 4'");
+shouldThrow("sel.selectAllChildren(externalTextNode)", "'Error: WRONG_DOCUMENT_ERR: DOM Exception 4'");
+shouldBe("sel.collapse(internalTextNode, 0)", "undefined");
+shouldBe("sel.selectAllChildren(internalTextNode)", "undefined");
+
+document.body.removeChild(iframe);
+document.body.removeChild(internalTextNode);
+
+var successfullyParsed = true;
diff --git a/LayoutTests/fast/dom/Selection/wrong-document-err-expected.txt b/LayoutTests/fast/dom/Selection/wrong-document-err-expected.txt
new file mode 100644
index 0000000..77850d8
--- /dev/null
+++ b/LayoutTests/fast/dom/Selection/wrong-document-err-expected.txt
@@ -0,0 +1,13 @@
+Test that collapse() and selectAllChildren() throw WRONG_DOCUMENT_ERR if the node is in another document.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS sel.collapse(externalTextNode, 0) threw exception Error: WRONG_DOCUMENT_ERR: DOM Exception 4.
+PASS sel.selectAllChildren(externalTextNode) threw exception Error: WRONG_DOCUMENT_ERR: DOM Exception 4.
+PASS sel.collapse(internalTextNode, 0) is undefined
+PASS sel.selectAllChildren(internalTextNode) is undefined
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/fast/dom/Selection/wrong-document-err.html b/LayoutTests/fast/dom/Selection/wrong-document-err.html
new file mode 100644
index 0000000..bbd6d4d
--- /dev/null
+++ b/LayoutTests/fast/dom/Selection/wrong-document-err.html
@@ -0,0 +1,13 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<link rel="stylesheet" href="../../js/resources/js-test-style.css">
+<script src="../../js/resources/js-test-pre.js"></script>
+</head>
+<body>
+<p id="description"></p>
+<div id="console"></div>
+<script src="script-tests/wrong-document-err.js"></script>
+<script src="../../js/resources/js-test-post.js"></script>
+</body>
+</html>
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list