Commit 1adc4765 authored by Yoshifumi Inoue's avatar Yoshifumi Inoue Committed by Commit Bot

Utilize w3c test harness in fast/dom/inner-text-with-no-renderer.html

This patch changes "inner-text-with-no-renderer.html" to utilize w3c test
harness for ease of maintenance.

This patch is a preparation of the patch[1].

[1] http://crrev.com/c/1114673 Make Element#innerText specification compliant

Bug: 859410
Change-Id: I108b1225a72517d1afa7402f2c184d7b3e5b1043
Reviewed-on: https://chromium-review.googlesource.com/1122035Reviewed-by: default avatarYoichi Osato <yoichio@chromium.org>
Commit-Queue: Yoshifumi Inoue <yosin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#571849}
parent 6fdf89d4
This tests that innerText works on an element that has no renderer associated. If the test is successful the text "SUCCESS" should be shown below.
SUCCESS
<html> <!doctype>
<head> <script src="../../resources/testharness.js"></script>
<script> <script src="../../resources/testharnessreport.js"></script>
function debug(str) { <script>
pre = document.getElementById('console'); test(() => {
txt = document.createTextNode(str + '\n') const div = document.createElement('div');
pre.appendChild(txt) div.innerHTML = '&quot;Text&quot;<br>new line';
} assert_equals('"Text"\nnew line', div.innerText);
function runTests() { },
if (window.testRunner) 'innerText for an element without layout object');
testRunner.dumpAsText() </script>
var div = document.createElement("div")
div.innerHTML = "&quot;Text&quot;<br>new line"
if (div.innerText != '"Text"\nnew line')
debug("FAILURE: innerText was \"" + div.innerText + "\"")
else
debug("SUCCESS")
}
</script>
</head>
<body onload="runTests()">
This tests that innerText works on an element that has no renderer associated. If the test is successful the text "SUCCESS" should be shown below.
<pre id="console">
</body>
</html>
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment