summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/fast/parser/xhtml-scripts.xhtml
blob: df39210304e48dda54c43451bdd676538d8681ed (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
<html xmlns="http://www.w3.org/1999/xhtml">
<body>
    <script>
    if (window.testRunner)
        testRunner.dumpAsText();
        
    var failure = false;

    // This shouldn't be known since we haven't parsed that far yet.
    var d = document.getElementById('div1');

    if (d)
        failure = true;
    </script>
    
    <div id="div1"/>
    
    <script src="resources/xhtml-scripts.js"/>
    <div id="div2"/>
    
    This tests that parsing stops when a script is encountered in an XML document. Parsing resumes when the script has finished executing.
    <div id="result">FAILURE</div>
    
    <script>
        if (!failure)
            document.getElementById('result').firstChild.nodeValue = 'SUCCESS';
    </script>
</body>
</html>