Index: LayoutTests/fast/html/navigation-transition.html |
diff --git a/LayoutTests/fast/html/navigation-transition.html b/LayoutTests/fast/html/navigation-transition.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..1220df12e44cb3023bfc459edce70d1d574c4e6c |
--- /dev/null |
+++ b/LayoutTests/fast/html/navigation-transition.html |
@@ -0,0 +1,80 @@ |
+<!DOCTYPE html> |
+ |
+<meta name="transition-elements" content="#transitionElement,#boxTransitionElement;*"> |
+<script src="../../resources/js-test.js"></script> |
+<script> |
+ |
+description('Tests for the HTML markup serializer used for transition elements'); |
+jsTestIsAsync = true; |
+ |
+window.onload = function() { |
+ if (window.internals) { |
+ var serializedHTML = internals.serializeNavigationMarkup(document); |
+ var testiframe = document.getElementById('testiframe'); |
+ testiframe.contentDocument.write(serializedHTML); |
+ |
+ sourceElement = document.getElementById('boxTransitionElement'); |
+ destElement = testiframe.contentDocument.getElementById('boxTransitionElement'); |
+ |
+ sourceElementRect = sourceElement.getBoundingClientRect(); |
+ shouldBe('sourceElementRect.top', 'destElement.offsetTop'); |
+ shouldBe('sourceElementRect.left', 'destElement.offsetLeft'); |
+ shouldBe('sourceElementRect.height', 'destElement.offsetHeight'); |
+ shouldBe('sourceElementRect.width', 'destElement.offsetWidth'); |
+ |
+ finishJSTest(); |
+ } |
+} |
+</script> |
+ |
+<style> |
+ |
+body { |
+ background: white; |
+ margin-height: 0px; |
+ margin-width: 0px; |
+} |
+ |
+#wrappingElement { |
+ background: gray; |
+ padding: 13px 20px 8px 30px; |
+ border-style: solid; |
+ border-width: 5px; |
+ width: 400px; |
+ margin: 44px 2px 13px 30px; |
+} |
+ |
+#transitionElement { |
+ padding-bottom: 0px; |
+} |
+ |
+#boxTransitionElement { |
+ background: red; |
+ padding: 8px 50px 50px 18px; |
+ border-style: solid; |
+ border-width: 30px; |
+ margin: 55px 15px 25px 135px; |
+} |
+ |
+#blueBox { |
+ padding: 25px 75px 50px 100px; |
+} |
+ |
+#testiframe { |
+ width: 100%; |
+ height: 600px; |
+ background: gray; |
+ border-width: 0px; |
+} |
+ |
+</style> |
+ |
+<div id="wrappingElement"> |
+ <div id="transitionElement">This text should appear twice.</div> |
+ |
+ <div id="boxTransitionElement"> |
+ <img id="blueBox" src="resources/images/blue.png"> |
+ </div> |
+</div> |
+ |
+<iframe id="testiframe"></iframe> |