summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/fast/css/first-letter-inline-flow-split-crash.html
blob: 2f106970489bf93df47a78c2c37f6041e675e2f2 (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
30
31
32
33
34
35
36
37
38
39
40
41
<style>
.spanStyle { float: inherit; }
.inlineFL::first-letter { visibility: visible; }
.floatFL { float: right; }
.floatFL::first-letter { position: absolute; content: 'A'; }
</style>
PASS, if no exception or crash observed
<script>
parentDiv = document.createElement('div');
childSpan = document.createElement('span');
childDiv = document.createElement('div');
textNode =  document.createTextNode('bcd');

function removeTextNode() {
    parentDiv.removeChild(textNode);
    delete textNode;
    if (window.testRunner)
        testRunner.notifyDone();
}

function changeClass() {
    parentDiv.setAttribute('class', 'inlineFL');
    setTimeout("removeTextNode()", 10);
}

function runTest() {
    parentDiv.setAttribute('class', 'floatFL');
    document.documentElement.appendChild(parentDiv);
    childSpan = document.createElement('span');
    childSpan.setAttribute('class', 'spanStyle');
    parentDiv.appendChild(childSpan);
    parentDiv.appendChild(textNode);
    childSpan.appendChild(childDiv);
    setTimeout("changeClass()", 10);
    if (window.testRunner) {
        testRunner.waitUntilDone();
        testRunner.dumpAsText();
    }
}
window.onload = runTest;
</script>