Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / css / css-fontface-rule-crash.html
blobaf4da579adc3926ab8308aeb6abb8cea4a743c95
1 <html>
2 <head>
3 <script src="../../resources/gc.js"></script>
4 <script>
5 if (window.testRunner) {
6 testRunner.dumpAsText();
7 testRunner.waitUntilDone();
10 function load()
12 style = document.createElement('style');
13 style.textContent = '@font-face { font-family: "A"; }';
14 document.head.appendChild(style);
15 rulestyle = document.styleSheets[0].cssRules[0].style;
16 document.head.removeChild(style);
17 style = null;
18 setTimeout(crash, 0);
21 function crash()
23 gc();
24 obj = rulestyle.parentRule;
25 // If the gc() actually successfully reaps everything it can, then obj
26 // will end up null (post-fix). gc() is not guaranteed to reap the font-face
27 // rule, however, particularly in the browser context.
28 if (obj)
29 obj = obj.foo;
30 document.body.innerText = 'PASS';
31 if (window.testRunner)
32 testRunner.notifyDone()
34 </script>
35 </head>
36 <body onload="load()"></body>
37 </html>