Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / css-generated-content / crash-selection-editing-removes-pseudo.html
blob18e3374f396e969e1d29e421a017fdc5f7e479db
1 <!DOCTYPE html>
3 <style>
4 #before:before {
5 /* must be an inline-block */
6 display: inline-block;
7 content: 'before';
9 #start:after {
10 /* must be an inline-block */
11 display: inline-block;
12 content: 'after';
14 </style>
17 <p>Passes if it doesn't crash.</p>
19 <div id="test">
20 <span id="before"><!-- no content can be here --></span>
21 <span>text</span>
22 <span id="start"><!-- no content can be here --></span>
23 </div>
25 <script>
26 if (window.testRunner)
27 testRunner.dumpAsText();
29 var before = document.getElementById('before');
30 var start = document.getElementById('start');
31 var test = document.getElementById('test');
33 // Select from the #start backwards to the start of the line.
34 window.getSelection().setBaseAndExtent(document.getElementById('start'));
35 window.getSelection().modify('extend', 'backward', 'lineBoundary')
37 // Replace the selection with a break. This replaces #before, text,
38 // #start with two <br>'s.
39 document.designMode = 'on';
40 document.execCommand('InsertLineBreak');
42 // Crash during tear down.
43 test.innerHTML = "Both pseudos have been removed: " + (before.offsetHeight == 0 && start.offsetHeight == 0);
44 </script>