Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 <!DOCTYPE html> | |
| 2 | |
| 3 <meta name="transition-elements" content="#transitionElement,#boxTransitionEleme nt;*"> | |
| 4 <script src="../../resources/js-test.js"></script> | |
| 5 <script> | |
| 6 function onLoadedImage() { | |
| 7 if (window.internals) { | |
| 8 var serializedHTML = internals.serializeNavigationMarkup(document); | |
| 9 var testiframe = document.getElementById('testiframe'); | |
| 10 testiframe.contentDocument.write(serializedHTML); | |
| 11 | |
| 12 sourceElement = document.getElementById('boxTransitionElement'); | |
| 13 destElement = testiframe.contentDocument.getElementById('boxTransitionEl ement'); | |
| 14 | |
| 15 sourceElementRect = sourceElement.getBoundingClientRect(); | |
| 16 shouldBe('sourceElementRect.top', 'destElement.offsetTop'); | |
| 17 shouldBe('sourceElementRect.left', 'destElement.offsetLeft'); | |
| 18 shouldBe('sourceElementRect.height', 'destElement.offsetHeight'); | |
| 19 shouldBe('sourceElementRect.width', 'destElement.offsetWidth'); | |
| 20 } | |
| 21 } | |
| 22 </script> | |
| 23 | |
| 24 <body bgcolor="#ffffff" marginheight="0" marginwidth="0"> | |
|
esprehn
2014/06/13 08:47:05
Using presentational markup is really weird. Can w
oystein (OOO til 10th of July)
2014/06/17 21:07:06
Done.
| |
| 25 | |
| 26 <div style="background:gray;padding-top:13px;padding-bottom:8px;padding-right:20 px;padding-left:30px; | |
| 27 border-style:solid;border-width:5px;width:400px; | |
| 28 margin-top:44px;margin-bottom:13px;margin-right:2px;margin-left:30px ;"> | |
| 29 <div id="transitionElement" style="padding-bottom:0px;">This text should app ear twice.</div> | |
| 30 | |
| 31 <div id="boxTransitionElement" style="background:red;padding-left:18px;paddi ng-top:8px;padding-bottom:50x;padding-right:50px; | |
| 32 border-style:solid;border-width:30px; | |
| 33 margin-top:55px;margin-bottom:25px;mar gin-right:15px;margin-left:135px;"> | |
| 34 <img id="blueBox" src="resources/images/blue.png" onload="onLoadedImage( );" style="padding-top:25px;padding-bottom:50px; | |
| 35 padding-right:75px;padding-left:100px;"> | |
| 36 </div> | |
| 37 </div> | |
| 38 | |
| 39 <iframe id="testiframe" frameBorder="0" style="width:100%;height:600px;backgroun d:gray"> | |
|
esprehn
2014/06/13 08:47:05
border: none; lets not use presentational markup u
oystein (OOO til 10th of July)
2014/06/17 21:07:06
Done.
| |
| 40 <div>This should NOT be displayed.</div> | |
| 41 </iframe> | |
| 42 | |
| 43 <script> | |
| 44 description('Tests for the HTML markup serializer used for transition elemen ts'); | |
| 45 </script> | |
| 46 </body> | |
| OLD | NEW |