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 d2f6bb8c206ad2b957a443373f7c25eb111add7a..7fc198a79ce21a4638cb71ac8498aafbc4aa1c91 100644 |
--- a/third_party/WebKit/LayoutTests/imported/wpt/innerText/setter.html |
+++ b/third_party/WebKit/LayoutTests/imported/wpt/innerText/setter.html |
@@ -5,7 +5,13 @@ |
<div id="container"></div> |
<script> |
function setupTest(context, plain) { |
- container.innerHTML = context; |
+ // context is either a string or an element node |
+ if (typeof context === "string") { |
+ container.innerHTML = context; |
+ } else { |
+ container.innerHTML = ""; |
+ container.appendChild(context); |
+ } |
var e = container.firstChild; |
while (e && e.nodeType != Node.ELEMENT_NODE) { |
e = e.nextSibling; |