Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / dynamic / jQuery-animation-crash.html
blob474d044089e3f4321a961c73eedd48c24c6cb08e
1 <p>Test for <a href="https://bugs.webkit.org/show_bug.cgi?id=25381">bug 25381</a>:
2 jQuery animation crashing Safari.</p>
3 <p>PASS if didn't crash.</p>
4 <div style="position:fixed; top:0px; width:100px; background:red;">
5 <div id="i" style="position:fixed; display:none; top:0px; width:100px; height:100px; overflow:hidden; background:green;"><div>ABC</div></div>
6 </div>
8 <script>
9 if (window.testRunner) {
10 testRunner.dumpAsText();
11 testRunner.waitUntilDone();
14 function swap( elem, options, callback ) {
15 var old = {};
16 // Remember the old values, and insert the new ones
17 for ( var name in options ) {
18 old[ name ] = elem.style[ name ];
19 elem.style[ name ] = options[ name ];
22 callback.call( elem );
24 // Revert the old values
25 for ( var name in options ) {
26 elem.style[ name ] = old[ name ];
30 function forceLayout()
32 document.body.offsetTop;
35 setTimeout(function() {
36 var elem = document.getElementById('i');
37 elem.style['display']='block';
39 var val, props = { position: "absolute", visibility: "hidden", display:"block" };
40 function getWH() {
41 val = elem.offsetHeight;
43 swap( elem, props, getWH );
45 forceLayout();
46 elem.style['height']=2;
47 forceLayout();
48 elem.style['height']=3;
49 forceLayout();
50 elem.style['display']='none';
51 forceLayout();
52 if (window.testRunner)
53 testRunner.notifyDone();
54 return;
55 }, 0);
57 </script>