1 <?xml version=
"1.0" encoding=
"UTF-8"?>
2 <!DOCTYPE html PUBLIC
"-//W3C//DTD XHTML 1.0 Strict//EN"
3 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
4 <html xmlns=
"http://www.w3.org/1999/xhtml" xml:
lang=
"en" lang=
"en">
6 <p>This tests parsing invalid XHTML content in innerHTML. You should see PASS below:
</p>
7 <p>createContextualFragment:
<span id=
"createContextualFragment">FAIL
</span></p>
8 <p>insertAdjacentHTML:
<span id=
"insertAdjacentHTML">FAIL
</span></p>
9 <p>innerHTML:
<span id=
"innerHTML">FAIL
</span></p>
10 <p>outerHTML:
<span id=
"outerHTML">FAIL
</span></p>
11 <script type=
"text/javascript">
14 var div = document.createElement('div');
15 document.body.appendChild(div);
17 var range = document.createRange();
18 range.selectNode(div);
20 range.createContextualFragment('
<b>a<');
22 document.getElementById('createContextualFragment').textContent = 'PASS - ' + exception.name;
26 div.insertAdjacentHTML('afterBegin', '
<b>a<')
28 document.getElementById('insertAdjacentHTML').textContent = 'PASS - ' + exception.name;
32 div.innerHTML = '
<b>a<';
34 document.getElementById('innerHTML').textContent = 'PASS - ' + exception.name;
38 div.outerHTML = '
<b>a<';
40 document.getElementById('outerHTML').textContent = 'PASS - ' + exception.name;
43 if (window.testRunner)
44 testRunner.dumpAsText();