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 | |
| 7 description('Tests for the HTML markup serializer used for transition elements') ; | |
| 8 jsTestIsAsync = true; | |
| 9 | |
| 10 window.onload = function() { | |
| 11 if (window.internals) { | |
| 12 var serializedHTML = internals.serializeNavigationMarkup(document); | |
| 13 var testiframe = document.getElementById('testiframe'); | |
| 14 testiframe.contentDocument.write(serializedHTML); | |
| 15 | |
| 16 sourceElement = document.getElementById('boxTransitionElement'); | |
| 17 destElement = testiframe.contentDocument.getElementById('boxTransitionEl ement'); | |
| 18 | |
| 19 sourceElementRect = sourceElement.getBoundingClientRect(); | |
| 20 shouldBe('sourceElementRect.top', 'destElement.offsetTop'); | |
| 21 shouldBe('sourceElementRect.left', 'destElement.offsetLeft'); | |
| 22 shouldBe('sourceElementRect.height', 'destElement.offsetHeight'); | |
| 23 shouldBe('sourceElementRect.width', 'destElement.offsetWidth'); | |
| 24 | |
| 25 finishJSTest(); | |
| 26 } | |
| 27 } | |
| 28 </script> | |
| 29 | |
| 30 <style> | |
| 31 | |
| 32 body { | |
| 33 background: white; | |
| 34 margin-height: 0px; | |
| 35 margin-width: 0px; | |
| 36 } | |
| 37 | |
| 38 #wrappingElement { | |
| 39 background: gray; | |
| 40 padding-top: 13px; | |
| 41 padding-bottom: 8px; | |
| 42 padding-right: 20px; | |
| 43 padding-left: 30px; | |
|
esprehn
2014/07/17 19:10:43
You can combine all these as padding: 13px 20px 8p
oystein (OOO til 10th of July)
2014/07/17 21:15:06
Done.
| |
| 44 border-style: solid; | |
| 45 border-width: 5px; | |
| 46 width: 400px; | |
| 47 margin-top: 44px; | |
| 48 margin-bottom: 13px; | |
| 49 margin-right: 2px; | |
| 50 margin-left: 30px; | |
|
esprehn
2014/07/17 19:10:43
ditto
oystein (OOO til 10th of July)
2014/07/17 21:15:06
Done.
| |
| 51 } | |
| 52 | |
| 53 #transitionElement { | |
| 54 padding-bottom: 0px; | |
| 55 } | |
| 56 | |
| 57 #boxTransitionElement { | |
| 58 background: red; | |
| 59 padding-left: 18px; | |
| 60 padding-top: 8px; | |
| 61 padding-bottom: 50x; | |
| 62 padding-right: 50px; | |
| 63 border-style: solid; | |
| 64 border-width: 30px; | |
| 65 margin-top: 55px; | |
| 66 margin-bottom: 25px; | |
| 67 margin-right: 15px; | |
| 68 margin-left: 135px; | |
|
esprehn
2014/07/17 19:10:43
ditto
oystein (OOO til 10th of July)
2014/07/17 21:15:06
Done.
| |
| 69 } | |
| 70 | |
| 71 #blueBox { | |
| 72 padding-top: 25px; | |
| 73 padding-bottom: 50px; | |
| 74 padding-right: 75px; | |
| 75 padding-left: 100px; | |
|
esprehn
2014/07/17 19:10:43
ditto
oystein (OOO til 10th of July)
2014/07/17 21:15:05
Done.
| |
| 76 } | |
| 77 | |
| 78 #testiframe { | |
| 79 width: 100%; | |
| 80 height: 600px; | |
| 81 background: gray; | |
| 82 border-width: 0px; | |
| 83 } | |
| 84 | |
| 85 </style> | |
| 86 | |
| 87 <div id="wrappingElement"> | |
| 88 <div id="transitionElement">This text should appear twice.</div> | |
| 89 | |
| 90 <div id="boxTransitionElement"> | |
| 91 <img id="blueBox" src="resources/images/blue.png"> | |
| 92 </div> | |
| 93 </div> | |
| 94 | |
| 95 <iframe id="testiframe"></iframe> | |
| OLD | NEW |