[SCM] WebKit Debian packaging branch, debian/experimental, updated. debian/1.3.8-1-1049-g2e11a8e

chang.shu at nokia.com chang.shu at nokia.com
Fri Jan 21 15:11:31 UTC 2011


The following commit has been merged in the debian/experimental branch:
commit 47795909ce8d63c9c23da84f888d17530eb786bb
Author: chang.shu at nokia.com <chang.shu at nokia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Sat Jan 8 22:55:24 2011 +0000

    2011-01-08  Chang Shu  <chang.shu at nokia.com>
    
            Reviewed by Ryosuke Niwa.
    
            Added test contents for contentEditable DOM attribute.
            https://bugs.webkit.org/show_bug.cgi?id=51957
    
            * editing/editability: Added.
            * editing/editability/attr-empty-string-expected.txt: Added.
            * editing/editability/attr-empty-string.html: Added.
            * editing/editability/attr-false-string-expected.txt: Added.
            * editing/editability/attr-false-string.html: Added.
            * editing/editability/attr-invalid-string-expected.txt: Added.
            * editing/editability/attr-invalid-string.html: Added.
            * editing/editability/attr-missing-ancestor-false-expected.txt: Added.
            * editing/editability/attr-missing-ancestor-false.html: Added.
            * editing/editability/attr-missing-ancestor-true-expected.txt: Added.
            * editing/editability/attr-missing-ancestor-true.html: Added.
            * editing/editability/attr-missing-parent-ancestor-missing-expected.txt: Added.
            * editing/editability/attr-missing-parent-ancestor-missing.html: Added.
            * editing/editability/attr-missing-parent-false-expected.txt: Added.
            * editing/editability/attr-missing-parent-false.html: Added.
            * editing/editability/attr-missing-parent-true-expected.txt: Added.
            * editing/editability/attr-missing-parent-true.html: Added.
            * editing/editability/attr-true-string-expected.txt: Added.
            * editing/editability/attr-true-string.html: Added.
            * editing/editability/set-false-expected.txt: Added.
            * editing/editability/set-false.html: Added.
            * editing/editability/set-inherit-parent-false-expected.txt: Added.
            * editing/editability/set-inherit-parent-false.html: Added.
            * editing/editability/set-inherit-parent-true-expected.txt: Added.
            * editing/editability/set-inherit-parent-true.html: Added.
            * editing/editability/set-invalid-value-expected.txt: Added.
            * editing/editability/set-invalid-value.html: Added.
            * editing/editability/set-true-expected.txt: Added.
            * editing/editability/set-true.html: Added.
            * editing/editability/set-value-caseinsensitive-expected.txt: Added.
            * editing/editability/set-value-caseinsensitive.html: Added.
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@75329 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 6fc21b0..15e8e57 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,42 @@
+2011-01-08  Chang Shu  <chang.shu at nokia.com>
+
+        Reviewed by Ryosuke Niwa.
+
+        Added test contents for contentEditable DOM attribute.
+        https://bugs.webkit.org/show_bug.cgi?id=51957
+
+        * editing/editability: Added.
+        * editing/editability/attr-empty-string-expected.txt: Added.
+        * editing/editability/attr-empty-string.html: Added.
+        * editing/editability/attr-false-string-expected.txt: Added.
+        * editing/editability/attr-false-string.html: Added.
+        * editing/editability/attr-invalid-string-expected.txt: Added.
+        * editing/editability/attr-invalid-string.html: Added.
+        * editing/editability/attr-missing-ancestor-false-expected.txt: Added.
+        * editing/editability/attr-missing-ancestor-false.html: Added.
+        * editing/editability/attr-missing-ancestor-true-expected.txt: Added.
+        * editing/editability/attr-missing-ancestor-true.html: Added.
+        * editing/editability/attr-missing-parent-ancestor-missing-expected.txt: Added.
+        * editing/editability/attr-missing-parent-ancestor-missing.html: Added.
+        * editing/editability/attr-missing-parent-false-expected.txt: Added.
+        * editing/editability/attr-missing-parent-false.html: Added.
+        * editing/editability/attr-missing-parent-true-expected.txt: Added.
+        * editing/editability/attr-missing-parent-true.html: Added.
+        * editing/editability/attr-true-string-expected.txt: Added.
+        * editing/editability/attr-true-string.html: Added.
+        * editing/editability/set-false-expected.txt: Added.
+        * editing/editability/set-false.html: Added.
+        * editing/editability/set-inherit-parent-false-expected.txt: Added.
+        * editing/editability/set-inherit-parent-false.html: Added.
+        * editing/editability/set-inherit-parent-true-expected.txt: Added.
+        * editing/editability/set-inherit-parent-true.html: Added.
+        * editing/editability/set-invalid-value-expected.txt: Added.
+        * editing/editability/set-invalid-value.html: Added.
+        * editing/editability/set-true-expected.txt: Added.
+        * editing/editability/set-true.html: Added.
+        * editing/editability/set-value-caseinsensitive-expected.txt: Added.
+        * editing/editability/set-value-caseinsensitive.html: Added.
+
 2011-01-08  Eric Seidel  <eric at webkit.org>
 
         Unreviewed.
diff --git a/LayoutTests/editing/editability/attr-empty-string-expected.txt b/LayoutTests/editing/editability/attr-empty-string-expected.txt
new file mode 100644
index 0000000..a663ee3
--- /dev/null
+++ b/LayoutTests/editing/editability/attr-empty-string-expected.txt
@@ -0,0 +1,20 @@
+When contentEditable attribute is empty string, element.contentEditable returns "true" and the element is editable.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+
+
+
+PASS document.getElementById("div").getAttribute("contentEditable") is ""
+PASS document.getElementById("div").contentEditable is "true"
+PASS document.getElementById("div").isContentEditable is true
+PASS window.getComputedStyle(div, "").getPropertyValue("-webkit-user-modify") is "read-write"
+
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
+
+
+
diff --git a/LayoutTests/editing/editability/attr-empty-string.html b/LayoutTests/editing/editability/attr-empty-string.html
new file mode 100644
index 0000000..0255336
--- /dev/null
+++ b/LayoutTests/editing/editability/attr-empty-string.html
@@ -0,0 +1,25 @@
+<html>
+<head>
+<link rel="stylesheet" href="../../fast/js/resources/js-test-style.css">
+<script src="../../fast/js/resources/js-test-pre.js"></script>
+</head>
+<body>
+<p id="description"></p>
+<div id="console"></p>
+<div id="result"></div>
+<div id="div" contentEditable=""></div>
+<script>
+description('When contentEditable attribute is empty string, element.contentEditable returns "true" and the element is editable.')
+
+shouldBe('document.getElementById("div").getAttribute("contentEditable")','""');
+shouldBe('document.getElementById("div").contentEditable', '"true"');
+shouldBe('document.getElementById("div").isContentEditable', 'true');
+shouldBe('window.getComputedStyle(div, "").getPropertyValue("-webkit-user-modify")', '"read-write"');
+
+document.getElementById("div").style.display= 'none';
+
+window.successfullyParsed = true;
+</script>
+<script src="../../fast/js/resources/js-test-post.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/editing/editability/attr-false-string-expected.txt b/LayoutTests/editing/editability/attr-false-string-expected.txt
new file mode 100644
index 0000000..11433de
--- /dev/null
+++ b/LayoutTests/editing/editability/attr-false-string-expected.txt
@@ -0,0 +1,20 @@
+When contentEditable attribute is "false" string, element.contentEditable returns "false" and the element is NOT editable.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+
+
+
+PASS document.getElementById("div").getAttribute("contentEditable") is "false"
+PASS document.getElementById("div").contentEditable is "false"
+PASS document.getElementById("div").isContentEditable is false
+PASS window.getComputedStyle(div, "").getPropertyValue("-webkit-user-modify") is "read-only"
+
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
+
+
+
diff --git a/LayoutTests/editing/editability/attr-false-string.html b/LayoutTests/editing/editability/attr-false-string.html
new file mode 100644
index 0000000..8d6710d
--- /dev/null
+++ b/LayoutTests/editing/editability/attr-false-string.html
@@ -0,0 +1,25 @@
+<html>
+<head>
+<link rel="stylesheet" href="../../fast/js/resources/js-test-style.css">
+<script src="../../fast/js/resources/js-test-pre.js"></script>
+</head>
+<body>
+<p id="description"></p>
+<div id="console"></p>
+<div id="result"></div>
+<div id="div" contentEditable="false"></div>
+<script>
+description('When contentEditable attribute is "false" string, element.contentEditable returns "false" and the element is NOT editable.')
+
+shouldBe('document.getElementById("div").getAttribute("contentEditable")','"false"');
+shouldBe('document.getElementById("div").contentEditable', '"false"');
+shouldBe('document.getElementById("div").isContentEditable', 'false');
+shouldBe('window.getComputedStyle(div, "").getPropertyValue("-webkit-user-modify")', '"read-only"');
+
+document.getElementById("div").style.display= 'none';
+
+window.successfullyParsed = true;
+</script>
+<script src="../../fast/js/resources/js-test-post.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/editing/editability/attr-invalid-string-expected.txt b/LayoutTests/editing/editability/attr-invalid-string-expected.txt
new file mode 100644
index 0000000..bfb6d11
--- /dev/null
+++ b/LayoutTests/editing/editability/attr-invalid-string-expected.txt
@@ -0,0 +1,21 @@
+When contentEditable attribute is invalid string, element.contentEditable returns "inherit".
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+
+
+
+PASS document.getElementById("div").getAttribute("contentEditable") is "abc"
+FAIL document.getElementById("div").contentEditable should be inherit. Was false.
+FIXME: contentEditable attribute fails to take invalid value. https://bugs.webkit.org/show_bug.cgi?id=50636
+PASS document.getElementById("div").isContentEditable is false
+PASS window.getComputedStyle(div, "").getPropertyValue("-webkit-user-modify") is "read-only"
+
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
+
+
+
diff --git a/LayoutTests/editing/editability/attr-invalid-string.html b/LayoutTests/editing/editability/attr-invalid-string.html
new file mode 100644
index 0000000..979b4be
--- /dev/null
+++ b/LayoutTests/editing/editability/attr-invalid-string.html
@@ -0,0 +1,26 @@
+<html>
+<head>
+<link rel="stylesheet" href="../../fast/js/resources/js-test-style.css">
+<script src="../../fast/js/resources/js-test-pre.js"></script>
+</head>
+<body>
+<p id="description"></p>
+<div id="console"></p>
+<div id="result"></div>
+<div id="div" contentEditable="abc"></div>
+<script>
+description('When contentEditable attribute is invalid string, element.contentEditable returns "inherit".')
+
+shouldBe('document.getElementById("div").getAttribute("contentEditable")','"abc"');
+shouldBe('document.getElementById("div").contentEditable', '"inherit"');
+debug("FIXME: contentEditable attribute fails to take invalid value. https://bugs.webkit.org/show_bug.cgi?id=50636");
+shouldBe('document.getElementById("div").isContentEditable', 'false');
+shouldBe('window.getComputedStyle(div, "").getPropertyValue("-webkit-user-modify")', '"read-only"');
+
+document.getElementById("div").style.display= 'none';
+
+window.successfullyParsed = true;
+</script>
+<script src="../../fast/js/resources/js-test-post.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/editing/editability/attr-missing-ancestor-false-expected.txt b/LayoutTests/editing/editability/attr-missing-ancestor-false-expected.txt
new file mode 100644
index 0000000..cc864e3
--- /dev/null
+++ b/LayoutTests/editing/editability/attr-missing-ancestor-false-expected.txt
@@ -0,0 +1,21 @@
+When contentEditable is missing, it maps to "inherit" state and the element is NOT editable if its nearest ancestor is NOT.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+
+
+
+PASS document.getElementById("p").hasAttribute("contentEditable") is false
+FAIL document.getElementById("p").contentEditable should be inherit. Was false.
+FIXME: contentEditable attribute should be inherit if missing. https://bugs.webkit.org/show_bug.cgi?id=52056
+PASS document.getElementById("p").isContentEditable is false
+PASS window.getComputedStyle(p, "").getPropertyValue("-webkit-user-modify") is "read-only"
+
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
+
+
+
diff --git a/LayoutTests/editing/editability/attr-missing-ancestor-false.html b/LayoutTests/editing/editability/attr-missing-ancestor-false.html
new file mode 100644
index 0000000..56504ab
--- /dev/null
+++ b/LayoutTests/editing/editability/attr-missing-ancestor-false.html
@@ -0,0 +1,32 @@
+<html>
+<head>
+<link rel="stylesheet" href="../../fast/js/resources/js-test-style.css">
+<script src="../../fast/js/resources/js-test-pre.js"></script>
+</head>
+<body>
+<p id="description"></p>
+<div id="console"></p>
+<div id="result"></div>
+<div id="div" contentEditable="false">
+  <div>
+    <div>
+      <p id="p"></p>
+    </div>
+  </div>
+</div>
+<script>
+description('When contentEditable is missing, it maps to "inherit" state and the element is NOT editable if its nearest ancestor is NOT.')
+
+shouldBe('document.getElementById("p").hasAttribute("contentEditable")', 'false');
+shouldBe('document.getElementById("p").contentEditable', '"inherit"');
+debug("FIXME: contentEditable attribute should be inherit if missing. https://bugs.webkit.org/show_bug.cgi?id=52056");
+shouldBe('document.getElementById("p").isContentEditable', 'false');
+shouldBe('window.getComputedStyle(p, "").getPropertyValue("-webkit-user-modify")', '"read-only"');
+
+document.getElementById("div").style.display= 'none';
+
+window.successfullyParsed = true;
+</script>
+<script src="../../fast/js/resources/js-test-post.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/editing/editability/attr-missing-ancestor-true-expected.txt b/LayoutTests/editing/editability/attr-missing-ancestor-true-expected.txt
new file mode 100644
index 0000000..5b1a037
--- /dev/null
+++ b/LayoutTests/editing/editability/attr-missing-ancestor-true-expected.txt
@@ -0,0 +1,17 @@
+When contentEditable is missing, it maps to "inherit" state and the element is editable if its nearest ancestor is.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+
+
+
+PASS document.getElementById("p").hasAttribute("contentEditable") is false
+FAIL document.getElementById("p").contentEditable should be inherit. Was true.
+FIXME: contentEditable attribute should be inherit if missing. https://bugs.webkit.org/show_bug.cgi?id=52056
+PASS document.getElementById("p").isContentEditable is true
+PASS window.getComputedStyle(p, "").getPropertyValue("-webkit-user-modify") is "read-write"
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/editing/editability/attr-missing-ancestor-true.html b/LayoutTests/editing/editability/attr-missing-ancestor-true.html
new file mode 100644
index 0000000..52dffd7
--- /dev/null
+++ b/LayoutTests/editing/editability/attr-missing-ancestor-true.html
@@ -0,0 +1,33 @@
+<html>
+<head>
+<link rel="stylesheet" href="../../fast/js/resources/js-test-style.css">
+<script src="../../fast/js/resources/js-test-pre.js"></script>
+</head>
+<body>
+<p id="description"></p>
+<div id="console"></p>
+<div id="result"></div>
+<div id="div" contentEditable="true">
+  <div>
+    <div>
+      <p id="p"></p>
+    </div>
+  </div>
+</div>
+</div>
+<script>
+description('When contentEditable is missing, it maps to "inherit" state and the element is editable if its nearest ancestor is.')
+
+shouldBe('document.getElementById("p").hasAttribute("contentEditable")','false');
+shouldBe('document.getElementById("p").contentEditable', '"inherit"');
+debug("FIXME: contentEditable attribute should be inherit if missing. https://bugs.webkit.org/show_bug.cgi?id=52056");
+shouldBe('document.getElementById("p").isContentEditable', 'true');
+shouldBe('window.getComputedStyle(p, "").getPropertyValue("-webkit-user-modify")', '"read-write"');
+
+document.getElementById("div").style.display= 'none';
+
+window.successfullyParsed = true;
+</script>
+<script src="../../fast/js/resources/js-test-post.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/editing/editability/attr-missing-parent-ancestor-missing-expected.txt b/LayoutTests/editing/editability/attr-missing-parent-ancestor-missing-expected.txt
new file mode 100644
index 0000000..0bbfd8a
--- /dev/null
+++ b/LayoutTests/editing/editability/attr-missing-parent-ancestor-missing-expected.txt
@@ -0,0 +1,21 @@
+When contentEditable is missing, it maps to "inherit" state and the element is NOT editable if its parent/ancestor's contentEditable is also missing.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+
+
+
+PASS document.getElementById("p").hasAttribute("contentEditable") is false
+FAIL document.getElementById("p").contentEditable should be inherit. Was false.
+FIXME: contentEditable attribute should be inherit if missing. https://bugs.webkit.org/show_bug.cgi?id=52056
+PASS document.getElementById("p").isContentEditable is false
+PASS window.getComputedStyle(p, "").getPropertyValue("-webkit-user-modify") is "read-only"
+
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
+
+
+
diff --git a/LayoutTests/editing/editability/attr-missing-parent-ancestor-missing.html b/LayoutTests/editing/editability/attr-missing-parent-ancestor-missing.html
new file mode 100644
index 0000000..6f1bafb
--- /dev/null
+++ b/LayoutTests/editing/editability/attr-missing-parent-ancestor-missing.html
@@ -0,0 +1,32 @@
+<html>
+<head>
+<link rel="stylesheet" href="../../fast/js/resources/js-test-style.css">
+<script src="../../fast/js/resources/js-test-pre.js"></script>
+</head>
+<body>
+<p id="description"></p>
+<div id="console"></p>
+<div id="result"></div>
+<div id="div">
+  <div>
+    <div>
+      <p id="p"></p>
+    </div>
+  </div>
+</div>
+<script>
+description('When contentEditable is missing, it maps to "inherit" state and the element is NOT editable if its parent/ancestor\'s contentEditable is also missing.')
+
+shouldBe('document.getElementById("p").hasAttribute("contentEditable")','false');
+shouldBe('document.getElementById("p").contentEditable', '"inherit"');
+debug("FIXME: contentEditable attribute should be inherit if missing. https://bugs.webkit.org/show_bug.cgi?id=52056");
+shouldBe('document.getElementById("p").isContentEditable', 'false');
+shouldBe('window.getComputedStyle(p, "").getPropertyValue("-webkit-user-modify")', '"read-only"');
+
+document.getElementById("div").style.display= 'none';
+
+window.successfullyParsed = true;
+</script>
+<script src="../../fast/js/resources/js-test-post.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/editing/editability/attr-missing-parent-false-expected.txt b/LayoutTests/editing/editability/attr-missing-parent-false-expected.txt
new file mode 100644
index 0000000..5d6de6c
--- /dev/null
+++ b/LayoutTests/editing/editability/attr-missing-parent-false-expected.txt
@@ -0,0 +1,21 @@
+When contentEditable is missing, it maps to "inherit" state and the element is NOT editable if its parent is NOT.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+
+
+
+PASS document.getElementById("p").hasAttribute("contentEditable") is false
+FAIL document.getElementById("p").contentEditable should be inherit. Was false.
+FIXME: contentEditable attribute should be inherit if missing. https://bugs.webkit.org/show_bug.cgi?id=52056
+PASS document.getElementById("p").isContentEditable is false
+PASS window.getComputedStyle(p, "").getPropertyValue("-webkit-user-modify") is "read-only"
+
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
+
+
+
diff --git a/LayoutTests/editing/editability/attr-missing-parent-false.html b/LayoutTests/editing/editability/attr-missing-parent-false.html
new file mode 100644
index 0000000..5db8faf
--- /dev/null
+++ b/LayoutTests/editing/editability/attr-missing-parent-false.html
@@ -0,0 +1,28 @@
+<html>
+<head>
+<link rel="stylesheet" href="../../fast/js/resources/js-test-style.css">
+<script src="../../fast/js/resources/js-test-pre.js"></script>
+</head>
+<body>
+<p id="description"></p>
+<div id="console"></p>
+<div id="result"></div>
+<div id="div" contentEditable="false">
+    <p id="p"></p>
+</div>
+<script>
+description('When contentEditable is missing, it maps to "inherit" state and the element is NOT editable if its parent is NOT.')
+
+shouldBe('document.getElementById("p").hasAttribute("contentEditable")','false');
+shouldBe('document.getElementById("p").contentEditable', '"inherit"');
+debug("FIXME: contentEditable attribute should be inherit if missing. https://bugs.webkit.org/show_bug.cgi?id=52056");
+shouldBe('document.getElementById("p").isContentEditable', 'false');
+shouldBe('window.getComputedStyle(p, "").getPropertyValue("-webkit-user-modify")', '"read-only"');
+
+document.getElementById("div").style.display= 'none';
+
+window.successfullyParsed = true;
+</script>
+<script src="../../fast/js/resources/js-test-post.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/editing/editability/attr-missing-parent-true-expected.txt b/LayoutTests/editing/editability/attr-missing-parent-true-expected.txt
new file mode 100644
index 0000000..b24685f
--- /dev/null
+++ b/LayoutTests/editing/editability/attr-missing-parent-true-expected.txt
@@ -0,0 +1,21 @@
+When contentEditable is missing, it maps to "inherit" state and the element is editable if its parent is.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+
+
+
+PASS document.getElementById("p").hasAttribute("contentEditable") is false
+FAIL document.getElementById("p").contentEditable should be inherit. Was true.
+FIXME: contentEditable attribute should be inherit if missing. https://bugs.webkit.org/show_bug.cgi?id=52056
+PASS document.getElementById("p").isContentEditable is true
+PASS window.getComputedStyle(p, "").getPropertyValue("-webkit-user-modify") is "read-write"
+
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
+
+
+
diff --git a/LayoutTests/editing/editability/attr-missing-parent-true.html b/LayoutTests/editing/editability/attr-missing-parent-true.html
new file mode 100644
index 0000000..96b5308
--- /dev/null
+++ b/LayoutTests/editing/editability/attr-missing-parent-true.html
@@ -0,0 +1,28 @@
+<html>
+<head>
+<link rel="stylesheet" href="../../fast/js/resources/js-test-style.css">
+<script src="../../fast/js/resources/js-test-pre.js"></script>
+</head>
+<body>
+<p id="description"></p>
+<div id="console"></p>
+<div id="result"></div>
+<div id="div" contentEditable="true">
+    <p id="p"></p>
+</div>
+<script>
+description('When contentEditable is missing, it maps to "inherit" state and the element is editable if its parent is.')
+
+shouldBe('document.getElementById("p").hasAttribute("contentEditable")','false');
+shouldBe('document.getElementById("p").contentEditable', '"inherit"');
+debug("FIXME: contentEditable attribute should be inherit if missing. https://bugs.webkit.org/show_bug.cgi?id=52056");
+shouldBe('document.getElementById("p").isContentEditable', 'true');
+shouldBe('window.getComputedStyle(p, "").getPropertyValue("-webkit-user-modify")', '"read-write"');
+
+document.getElementById("div").style.display= 'none';
+
+window.successfullyParsed = true;
+</script>
+<script src="../../fast/js/resources/js-test-post.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/editing/editability/attr-true-string-expected.txt b/LayoutTests/editing/editability/attr-true-string-expected.txt
new file mode 100644
index 0000000..49b09f3
--- /dev/null
+++ b/LayoutTests/editing/editability/attr-true-string-expected.txt
@@ -0,0 +1,20 @@
+When contentEditable attribute is "true" string, element.contentEditable returns "true" and the element is editable.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+
+
+
+PASS document.getElementById("div").getAttribute("contentEditable") is "true"
+PASS document.getElementById("div").contentEditable is "true"
+PASS document.getElementById("div").isContentEditable is true
+PASS window.getComputedStyle(div, "").getPropertyValue("-webkit-user-modify") is "read-write"
+
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
+
+
+
diff --git a/LayoutTests/editing/editability/attr-true-string.html b/LayoutTests/editing/editability/attr-true-string.html
new file mode 100644
index 0000000..fa9521a
--- /dev/null
+++ b/LayoutTests/editing/editability/attr-true-string.html
@@ -0,0 +1,25 @@
+<html>
+<head>
+<link rel="stylesheet" href="../../fast/js/resources/js-test-style.css">
+<script src="../../fast/js/resources/js-test-pre.js"></script>
+</head>
+<body>
+<p id="description"></p>
+<div id="console"></p>
+<div id="result"></div>
+<div id="div" contentEditable="true"></div>
+<script>
+description('When contentEditable attribute is "true" string, element.contentEditable returns "true" and the element is editable.')
+
+shouldBe('document.getElementById("div").getAttribute("contentEditable")','"true"');
+shouldBe('document.getElementById("div").contentEditable', '"true"');
+shouldBe('document.getElementById("div").isContentEditable', 'true');
+shouldBe('window.getComputedStyle(div, "").getPropertyValue("-webkit-user-modify")', '"read-write"');
+
+document.getElementById("div").style.display= 'none';
+
+window.successfullyParsed = true;
+</script>
+<script src="../../fast/js/resources/js-test-post.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/editing/editability/set-false-expected.txt b/LayoutTests/editing/editability/set-false-expected.txt
new file mode 100644
index 0000000..e1bf41e
--- /dev/null
+++ b/LayoutTests/editing/editability/set-false-expected.txt
@@ -0,0 +1,25 @@
+When contentEditable is set to "false" string from "true" or inherit, element.contentEditable returns "false" and the element is NOT editable.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+
+
+
+
+PASS document.getElementById("div1").getAttribute("contentEditable") is "false"
+FAIL document.getElementById("div1").contentEditable should be false. Was true.
+FAIL document.getElementById("div1").isContentEditable should be false. Was true.
+FIXME: setContentEditable with true/false/inherit string is not working properly. https://bugs.webkit.org/show_bug.cgi?id=52058
+PASS window.getComputedStyle(div1, "").getPropertyValue("-webkit-user-modify") is "read-only"
+PASS document.getElementById("p2").contentEditable is "false"
+PASS document.getElementById("p2").isContentEditable is false
+PASS window.getComputedStyle(p2, "").getPropertyValue("-webkit-user-modify") is "read-only"
+
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
+
+
+
diff --git a/LayoutTests/editing/editability/set-false.html b/LayoutTests/editing/editability/set-false.html
new file mode 100644
index 0000000..fcc0084
--- /dev/null
+++ b/LayoutTests/editing/editability/set-false.html
@@ -0,0 +1,37 @@
+<html>
+<head>
+<link rel="stylesheet" href="../../fast/js/resources/js-test-style.css">
+<script src="../../fast/js/resources/js-test-pre.js"></script>
+</head>
+<body>
+<p id="description"></p>
+<div id="console"></p>
+<div id="result"></div>
+<div id="div1" contenteditable="true"></div>
+<div id="div2" contenteditable="true">
+    <p id="p2"></p>
+</div>
+<script>
+description('When contentEditable is set to "false" string from "true" or inherit, element.contentEditable returns "false" and the element is NOT editable.')
+
+document.getElementById("div1").contentEditable = "false";
+document.getElementById("p2").contentEditable = "false";
+
+shouldBe('document.getElementById("div1").getAttribute("contentEditable")','"false"');
+shouldBe('document.getElementById("div1").contentEditable', '"false"');
+shouldBe('document.getElementById("div1").isContentEditable', 'false');
+debug("FIXME: setContentEditable with true/false/inherit string is not working properly. https://bugs.webkit.org/show_bug.cgi?id=52058");
+shouldBe('window.getComputedStyle(div1, "").getPropertyValue("-webkit-user-modify")', '"read-only"');
+
+shouldBe('document.getElementById("p2").contentEditable', '"false"');
+shouldBe('document.getElementById("p2").isContentEditable', 'false');
+shouldBe('window.getComputedStyle(p2, "").getPropertyValue("-webkit-user-modify")', '"read-only"');
+
+document.getElementById("div1").style.display= 'none';
+document.getElementById("div2").style.display= 'none';
+
+window.successfullyParsed = true;
+</script>
+<script src="../../fast/js/resources/js-test-post.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/editing/editability/set-inherit-parent-false-expected.txt b/LayoutTests/editing/editability/set-inherit-parent-false-expected.txt
new file mode 100644
index 0000000..ed4eefd
--- /dev/null
+++ b/LayoutTests/editing/editability/set-inherit-parent-false-expected.txt
@@ -0,0 +1,21 @@
+When contentEditable is set to "inherit", the attribute must be removed and element.contentEditable should return "inherit".
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+
+
+
+PASS document.getElementById("p").hasAttribute("contentEditable") is false
+FAIL document.getElementById("p").contentEditable should be inherit. Was true.
+FAIL document.getElementById("p").isContentEditable should be false. Was true.
+FIXME: setContentEditable with true/false/inherit string is not working properly. https://bugs.webkit.org/show_bug.cgi?id=52058
+PASS window.getComputedStyle(p, "").getPropertyValue("-webkit-user-modify") is "read-only"
+
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
+
+
+
diff --git a/LayoutTests/editing/editability/set-inherit-parent-false.html b/LayoutTests/editing/editability/set-inherit-parent-false.html
new file mode 100644
index 0000000..1f220b5
--- /dev/null
+++ b/LayoutTests/editing/editability/set-inherit-parent-false.html
@@ -0,0 +1,30 @@
+<html>
+<head>
+<link rel="stylesheet" href="../../fast/js/resources/js-test-style.css">
+<script src="../../fast/js/resources/js-test-pre.js"></script>
+</head>
+<body>
+<p id="description"></p>
+<div id="console"></p>
+<div id="result"></div>
+<div id="div" contenteditable="false">
+    <p id="p" contenteditable="true"></p>
+</div>
+<script>
+description('When contentEditable is set to "inherit", the attribute must be removed and element.contentEditable should return "inherit".')
+
+document.getElementById("p").contentEditable = "inherit";
+
+shouldBe('document.getElementById("p").hasAttribute("contentEditable")','false');
+shouldBe('document.getElementById("p").contentEditable', '"inherit"');
+shouldBe('document.getElementById("p").isContentEditable', 'false');
+debug("FIXME: setContentEditable with true/false/inherit string is not working properly. https://bugs.webkit.org/show_bug.cgi?id=52058");
+shouldBe('window.getComputedStyle(p, "").getPropertyValue("-webkit-user-modify")', '"read-only"');
+
+document.getElementById("div").style.display= 'none';
+
+window.successfullyParsed = true;
+</script>
+<script src="../../fast/js/resources/js-test-post.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/editing/editability/set-inherit-parent-true-expected.txt b/LayoutTests/editing/editability/set-inherit-parent-true-expected.txt
new file mode 100644
index 0000000..dbbcb36
--- /dev/null
+++ b/LayoutTests/editing/editability/set-inherit-parent-true-expected.txt
@@ -0,0 +1,21 @@
+When contentEditable is set to "inherit", the attribute must be removed and element.contentEditable should return "inherit".
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+
+
+
+PASS document.getElementById("p").hasAttribute("contentEditable") is false
+FAIL document.getElementById("p").contentEditable should be inherit. Was false.
+FAIL document.getElementById("p").isContentEditable should be true. Was false.
+FIXME: setContentEditable with true/false/inherit string is not working properly. https://bugs.webkit.org/show_bug.cgi?id=52058
+PASS window.getComputedStyle(p, "").getPropertyValue("-webkit-user-modify") is "read-write"
+
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
+
+
+
diff --git a/LayoutTests/editing/editability/set-inherit-parent-true.html b/LayoutTests/editing/editability/set-inherit-parent-true.html
new file mode 100644
index 0000000..98c57f7
--- /dev/null
+++ b/LayoutTests/editing/editability/set-inherit-parent-true.html
@@ -0,0 +1,30 @@
+<html>
+<head>
+<link rel="stylesheet" href="../../fast/js/resources/js-test-style.css">
+<script src="../../fast/js/resources/js-test-pre.js"></script>
+</head>
+<body>
+<p id="description"></p>
+<div id="console"></p>
+<div id="result"></div>
+<div id="div" contenteditable="true">
+    <p id="p" contenteditable="false"></p>
+</div>
+<script>
+description('When contentEditable is set to "inherit", the attribute must be removed and element.contentEditable should return "inherit".')
+
+document.getElementById("p").contentEditable = "inherit";
+
+shouldBe('document.getElementById("p").hasAttribute("contentEditable")','false');
+shouldBe('document.getElementById("p").contentEditable', '"inherit"');
+shouldBe('document.getElementById("p").isContentEditable', 'true');
+debug("FIXME: setContentEditable with true/false/inherit string is not working properly. https://bugs.webkit.org/show_bug.cgi?id=52058");
+shouldBe('window.getComputedStyle(p, "").getPropertyValue("-webkit-user-modify")', '"read-write"');
+
+document.getElementById("div").style.display= 'none';
+
+window.successfullyParsed = true;
+</script>
+<script src="../../fast/js/resources/js-test-post.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/editing/editability/set-invalid-value-expected.txt b/LayoutTests/editing/editability/set-invalid-value-expected.txt
new file mode 100644
index 0000000..73aca30
--- /dev/null
+++ b/LayoutTests/editing/editability/set-invalid-value-expected.txt
@@ -0,0 +1,22 @@
+When contentEditable is set to invalid string, SYNTAX_ERR exception (code: 12) must be raised.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+
+
+
+FAIL exceptionThrown should be true. Was false.
+FIXME: setContentEditable with invalid string should throw exception. https://bugs.webkit.org/show_bug.cgi?id=52057
+PASS document.getElementById("div").getAttribute("contentEditable") is "abc"
+PASS document.getElementById("div").contentEditable is "true"
+PASS document.getElementById("div").isContentEditable is true
+FAIL window.getComputedStyle(div, "").getPropertyValue("-webkit-user-modify") should be read-write. Was read-only.
+
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
+
+
+
diff --git a/LayoutTests/editing/editability/set-invalid-value.html b/LayoutTests/editing/editability/set-invalid-value.html
new file mode 100644
index 0000000..900ac98
--- /dev/null
+++ b/LayoutTests/editing/editability/set-invalid-value.html
@@ -0,0 +1,36 @@
+<html>
+<head>
+<link rel="stylesheet" href="../../fast/js/resources/js-test-style.css">
+<script src="../../fast/js/resources/js-test-pre.js"></script>
+</head>
+<body>
+<p id="description"></p>
+<div id="console"></p>
+<div id="result"></div>
+<div id="div" contenteditable="true"></div>
+<script>
+description('When contentEditable is set to invalid string, SYNTAX_ERR exception (code: 12) must be raised.')
+
+exceptionThrown = false;
+
+try {
+    document.getElementById("div").contentEditable = "abc";
+} catch (e) {
+    if (e.code == 12)
+        exceptionThrown = true;
+}
+
+shouldBe('exceptionThrown', 'true');
+debug("FIXME: setContentEditable with invalid string should throw exception. https://bugs.webkit.org/show_bug.cgi?id=52057");
+shouldBe('document.getElementById("div").getAttribute("contentEditable")','"abc"');
+shouldBe('document.getElementById("div").contentEditable', '"true"');
+shouldBe('document.getElementById("div").isContentEditable', 'true');
+shouldBe('window.getComputedStyle(div, "").getPropertyValue("-webkit-user-modify")', '"read-write"');
+
+document.getElementById("div").style.display= 'none';
+
+window.successfullyParsed = true;
+</script>
+<script src="../../fast/js/resources/js-test-post.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/editing/editability/set-true-expected.txt b/LayoutTests/editing/editability/set-true-expected.txt
new file mode 100644
index 0000000..cf0f2e8
--- /dev/null
+++ b/LayoutTests/editing/editability/set-true-expected.txt
@@ -0,0 +1,26 @@
+When contentEditable is set to "true" string from "false" or inherit, element.contentEditable returns "true" and the element is editable.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+
+
+
+
+PASS document.getElementById("div1").getAttribute("contentEditable") is "true"
+FAIL document.getElementById("div1").contentEditable should be true. Was false.
+FAIL document.getElementById("div1").isContentEditable should be true. Was false.
+FIXME: setContentEditable with true/false/inherit string is not working properly. https://bugs.webkit.org/show_bug.cgi?id=52058
+PASS window.getComputedStyle(div1, "").getPropertyValue("-webkit-user-modify") is "read-write"
+PASS document.getElementById("p2").getAttribute("contentEditable") is "true"
+PASS document.getElementById("p2").contentEditable is "true"
+PASS document.getElementById("p2").isContentEditable is true
+PASS window.getComputedStyle(p2, "").getPropertyValue("-webkit-user-modify") is "read-write"
+
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
+
+
+
diff --git a/LayoutTests/editing/editability/set-true.html b/LayoutTests/editing/editability/set-true.html
new file mode 100644
index 0000000..f11944f
--- /dev/null
+++ b/LayoutTests/editing/editability/set-true.html
@@ -0,0 +1,38 @@
+<html>
+<head>
+<link rel="stylesheet" href="../../fast/js/resources/js-test-style.css">
+<script src="../../fast/js/resources/js-test-pre.js"></script>
+</head>
+<body>
+<p id="description"></p>
+<div id="console"></p>
+<div id="result"></div>
+<div id="div1" contenteditable="false"></div>
+<div id="div2" contenteditable="false">
+    <p id="p2"></p>
+</div>
+<script>
+description('When contentEditable is set to "true" string from "false" or inherit, element.contentEditable returns "true" and the element is editable.')
+
+document.getElementById("div1").contentEditable = "true";
+document.getElementById("p2").contentEditable = "true";
+
+shouldBe('document.getElementById("div1").getAttribute("contentEditable")','"true"');
+shouldBe('document.getElementById("div1").contentEditable', '"true"');
+shouldBe('document.getElementById("div1").isContentEditable', 'true');
+debug("FIXME: setContentEditable with true/false/inherit string is not working properly. https://bugs.webkit.org/show_bug.cgi?id=52058");
+shouldBe('window.getComputedStyle(div1, "").getPropertyValue("-webkit-user-modify")', '"read-write"');
+
+shouldBe('document.getElementById("p2").getAttribute("contentEditable")','"true"');
+shouldBe('document.getElementById("p2").contentEditable', '"true"');
+shouldBe('document.getElementById("p2").isContentEditable', 'true');
+shouldBe('window.getComputedStyle(p2, "").getPropertyValue("-webkit-user-modify")', '"read-write"');
+
+document.getElementById("div1").style.display= 'none';
+document.getElementById("div2").style.display= 'none';
+
+window.successfullyParsed = true;
+</script>
+<script src="../../fast/js/resources/js-test-post.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/editing/editability/set-value-caseinsensitive-expected.txt b/LayoutTests/editing/editability/set-value-caseinsensitive-expected.txt
new file mode 100644
index 0000000..267b24b
--- /dev/null
+++ b/LayoutTests/editing/editability/set-value-caseinsensitive-expected.txt
@@ -0,0 +1,31 @@
+When contentEditable is set to a new value, the new value can be case-insensitive.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+
+
+
+
+
+PASS document.getElementById("div1").getAttribute("contentEditable") is "TRue"
+FAIL document.getElementById("div1").contentEditable should be true. Was false.
+FAIL document.getElementById("div1").isContentEditable should be true. Was false.
+PASS window.getComputedStyle(div1, "").getPropertyValue("-webkit-user-modify") is "read-write"
+PASS document.getElementById("p1").getAttribute("contentEditable") is "faLSE"
+PASS document.getElementById("p1").contentEditable is "false"
+PASS document.getElementById("p1").isContentEditable is false
+PASS window.getComputedStyle(p1, "").getPropertyValue("-webkit-user-modify") is "read-only"
+FAIL document.getElementById("p2").hasAttribute("contentEditable") should be false. Was true.
+FAIL document.getElementById("p2").contentEditable should be inherit. Was false.
+FAIL document.getElementById("p2").isContentEditable should be true. Was false.
+FAIL window.getComputedStyle(p2, "").getPropertyValue("-webkit-user-modify") should be read-write. Was read-only.
+FIXME: setContentEditable should be case insensitive. https://bugs.webkit.org/show_bug.cgi?id=52059
+
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
+
+
+
diff --git a/LayoutTests/editing/editability/set-value-caseinsensitive.html b/LayoutTests/editing/editability/set-value-caseinsensitive.html
new file mode 100644
index 0000000..d7afc86
--- /dev/null
+++ b/LayoutTests/editing/editability/set-value-caseinsensitive.html
@@ -0,0 +1,47 @@
+<html>
+<head>
+<link rel="stylesheet" href="../../fast/js/resources/js-test-style.css">
+<script src="../../fast/js/resources/js-test-pre.js"></script>
+</head>
+<body>
+<p id="description"></p>
+<div id="console"></p>
+<div id="result"></div>
+<div id="div1" contenteditable="false"></div>
+<p id="p1" contenteditable="true"></p>
+<div id="div2" contenteditable="true">
+    <p id="p2" contenteditable="false"></p>
+</div>
+<script>
+description('When contentEditable is set to a new value, the new value can be case-insensitive.')
+
+document.getElementById("div1").contentEditable = "TRue";
+document.getElementById("p1").contentEditable = "faLSE";
+document.getElementById("p2").contentEditable = "inHERIT";
+
+shouldBe('document.getElementById("div1").getAttribute("contentEditable")','"TRue"');
+shouldBe('document.getElementById("div1").contentEditable', '"true"');
+shouldBe('document.getElementById("div1").isContentEditable', 'true');
+shouldBe('window.getComputedStyle(div1, "").getPropertyValue("-webkit-user-modify")', '"read-write"');
+
+shouldBe('document.getElementById("p1").getAttribute("contentEditable")','"faLSE"');
+shouldBe('document.getElementById("p1").contentEditable', '"false"');
+shouldBe('document.getElementById("p1").isContentEditable', 'false');
+shouldBe('window.getComputedStyle(p1, "").getPropertyValue("-webkit-user-modify")', '"read-only"');
+
+shouldBe('document.getElementById("p2").hasAttribute("contentEditable")','false');
+shouldBe('document.getElementById("p2").contentEditable', '"inherit"');
+shouldBe('document.getElementById("p2").isContentEditable', 'true');
+shouldBe('window.getComputedStyle(p2, "").getPropertyValue("-webkit-user-modify")', '"read-write"');
+
+debug("FIXME: setContentEditable should be case insensitive. https://bugs.webkit.org/show_bug.cgi?id=52059");
+
+document.getElementById("div1").style.display= 'none';
+document.getElementById("p1").style.display= 'none';
+document.getElementById("div2").style.display= 'none';
+
+window.successfullyParsed = true;
+</script>
+<script src="../../fast/js/resources/js-test-post.js"></script>
+</body>
+</html>

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list