Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / dom / xhtml-fragment-parsing-exceptions.xhtml
blob1559bb9a1d6279b6f39df645ebd907c5c837181d
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">
5 <body>
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">
12 <![CDATA[
14 var div = document.createElement('div');
15 document.body.appendChild(div);
17 var range = document.createRange();
18 range.selectNode(div);
19 try {
20 range.createContextualFragment('<b>a<');
21 } catch (exception) {
22 document.getElementById('createContextualFragment').textContent = 'PASS - ' + exception.name;
25 try {
26 div.insertAdjacentHTML('afterBegin', '<b>a<')
27 } catch (exception) {
28 document.getElementById('insertAdjacentHTML').textContent = 'PASS - ' + exception.name;
31 try {
32 div.innerHTML = '<b>a<';
33 } catch (exception) {
34 document.getElementById('innerHTML').textContent = 'PASS - ' + exception.name;
37 try {
38 div.outerHTML = '<b>a<';
39 } catch (exception) {
40 document.getElementById('outerHTML').textContent = 'PASS - ' + exception.name;
43 if (window.testRunner)
44 testRunner.dumpAsText();
46 ]]>
47 </script>
48 </body>
49 </html>