Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(267)

Unified Diff: third_party/WebKit/LayoutTests/imported/wpt/innerText/setter.html

Issue 2634323002: Import wpt@aae3e1b6ffb8b24acb777450933ceeafd97e3655 (Closed)
Patch Set: Modify TestExpectations or download new baselines for tests. Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/LayoutTests/imported/wpt/innerText/setter.html
diff --git a/third_party/WebKit/LayoutTests/imported/wpt/innerText/setter.html b/third_party/WebKit/LayoutTests/imported/wpt/innerText/setter.html
index 7fc198a79ce21a4638cb71ac8498aafbc4aa1c91..c2ffb37df13d44eecf93c102960fd5dc3aa34e14 100644
--- a/third_party/WebKit/LayoutTests/imported/wpt/innerText/setter.html
+++ b/third_party/WebKit/LayoutTests/imported/wpt/innerText/setter.html
@@ -16,21 +16,25 @@ function setupTest(context, plain) {
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);
}

Powered by Google App Engine
This is Rietveld 408576698