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 function onLoadedImage() { | |
esprehn
2014/06/26 09:32:55
onload = function(),
you don't need to wait for t
oystein (OOO til 10th of July)
2014/06/26 23:13:42
Done.
| |
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 <body style="background:white;margin-height:0px;margin-width:0px;"> | |
31 | |
32 <div style="background:gray;padding-top:13px;padding-bottom:8px;padding-right:20 px;padding-left:30px; | |
33 border-style:solid;border-width:5px;width:400px; | |
34 margin-top:44px;margin-bottom:13px;margin-right:2px;margin-left:30px ;"> | |
35 <div id="transitionElement" style="padding-bottom:0px;">This text should app ear twice.</div> | |
36 | |
37 <div id="boxTransitionElement" style="background:red;padding-left:18px;paddi ng-top:8px;padding-bottom:50x;padding-right:50px; | |
esprehn
2014/06/26 09:32:55
Can we use a <style> block instead of inline style
oystein (OOO til 10th of July)
2014/06/26 23:13:42
Done.
| |
38 border-style:solid;border-width:30px; | |
39 margin-top:55px;margin-bottom:25px;mar gin-right:15px;margin-left:135px;"> | |
40 <img id="blueBox" src="resources/images/blue.png" onload="onLoadedImage( );" style="padding-top:25px;padding-bottom:50px; | |
41 padding-right:75px;padding-left:100px;"> | |
42 </div> | |
43 </div> | |
44 | |
45 <iframe id="testiframe" style="width:100%;height:600px;background:gray;border-wi dth:0px"> | |
46 <div>This should NOT be displayed.</div> | |
esprehn
2014/06/26 09:32:55
iframe will never show it's children, I'm not sure
oystein (OOO til 10th of July)
2014/06/26 23:13:42
Done.
| |
47 </iframe> | |
48 </body> | |
OLD | NEW |