Diff
Modified: trunk/LayoutTests/imported/w3c/ChangeLog (210956 => 210957)
--- trunk/LayoutTests/imported/w3c/ChangeLog 2017-01-20 08:11:40 UTC (rev 210956)
+++ trunk/LayoutTests/imported/w3c/ChangeLog 2017-01-20 09:28:09 UTC (rev 210957)
@@ -1,3 +1,16 @@
+2017-01-20 Chris Dumez <cdu...@apple.com>
+
+ Re-sync innerText web-platform-tests from upstream
+ https://bugs.webkit.org/show_bug.cgi?id=167229
+
+ Reviewed by Alex Christensen.
+
+ Re-sync innerText web-platform-tests from upstream 1a36aa52.
+
+ * web-platform-tests/innerText/setter-expected.txt:
+ * web-platform-tests/innerText/setter-tests.js:
+ * web-platform-tests/innerText/setter.html:
+
2017-01-19 Alex Christensen <achristen...@webkit.org>
Construct URLSearchParams from array or object
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/innerText/setter-expected.txt (210956 => 210957)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/innerText/setter-expected.txt 2017-01-20 08:11:40 UTC (rev 210956)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/innerText/setter-expected.txt 2017-01-20 09:28:09 UTC (rev 210957)
@@ -22,7 +22,7 @@
PASS Leading whitespace preserved
PASS Trailing whitespace preserved
PASS Whitespace not compressed
-PASS Existing text deleted
+FAIL Existing text deleted assert_not_equals: Child should be a *new* text node got disallowed value Text node "abc"
PASS Existing <br> deleted
PASS Assigning the empty string
PASS Assigning null
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/innerText/setter-tests.js (210956 => 210957)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/innerText/setter-tests.js 2017-01-20 08:11:40 UTC (rev 210956)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/innerText/setter-tests.js 2017-01-20 09:28:09 UTC (rev 210957)
@@ -20,8 +20,8 @@
testText("<div>", " abc", " abc", "Leading whitespace preserved");
testText("<div>", "abc ", "abc ", "Trailing whitespace preserved");
testText("<div>", "abc def", "abc def", "Whitespace not compressed");
-testHTML("<div>abc\n\n", "abc", "abc", "Existing text deleted");
-testHTML("<div><br>", "abc", "abc", "Existing <br> deleted");
+testText("<div>abc\n\n", "abc", "abc", "Existing text deleted");
+testText("<div><br>", "abc", "abc", "Existing <br> deleted");
testHTML("<div>", "", "", "Assigning the empty string");
testHTML("<div>", null, "", "Assigning null");
testHTML("<div>", undefined, "undefined", "Assigning undefined");
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/innerText/setter.html (210956 => 210957)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/innerText/setter.html 2017-01-20 08:11:40 UTC (rev 210956)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/innerText/setter.html 2017-01-20 09:28:09 UTC (rev 210957)
@@ -16,21 +16,25 @@
while (e && e.nodeType != Node.ELEMENT_NODE) {
e = e.nextSibling;
}
+ var oldChild = e.firstChild;
e.innerText = plain;
- return e;
+ return [e, oldChild];
}
function testText(context, plain, expectedText, msg) {
test(function(){
- var e = setupTest(context, plain);
+ var arr = setupTest(context, plain);
+ var e = arr[0];
+ var oldChild = arr[1];
assert_not_equals(e.firstChild, null, "Should have a child");
assert_equals(e.firstChild.nodeType, Node.TEXT_NODE, "Child should be a text node");
assert_equals(e.firstChild.nextSibling, null, "Should have only one child");
assert_equals(e.firstChild.data, expectedText);
+ assert_not_equals(e.firstChild, oldChild, "Child should be a *new* text node");
}, msg);
}
function testHTML(context, plain, expectedHTML, msg) {
test(function(){
- var e = setupTest(context, plain);
+ var e = setupTest(context, plain)[0];
assert_equals(e.innerHTML, expectedHTML);
}, msg);
}