Chromium Code Reviews

Unified Diff: LayoutTests/fast/html/navigation-transition.html

Issue 281383006: Navigation transitions: Added createStyledMarkupForNavigationTransition (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Missing NULL check Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
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..36a7602885055ce842f238ca4e75e6b100b724ca
--- /dev/null
+++ b/LayoutTests/fast/html/navigation-transition.html
@@ -0,0 +1,46 @@
+<!DOCTYPE html>
+
+<meta name="transition-elements" content="#transitionElement,#boxTransitionElement;*">
+<script src="../../resources/js-test.js"></script>
+<script>
+function onLoadedImage() {
+ 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');
+ }
+}
+</script>
+
+<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.
+
+<div style="background:gray;padding-top:13px;padding-bottom:8px;padding-right:20px;padding-left:30px;
+ border-style:solid;border-width:5px;width:400px;
+ margin-top:44px;margin-bottom:13px;margin-right:2px;margin-left:30px;">
+ <div id="transitionElement" style="padding-bottom:0px;">This text should appear twice.</div>
+
+ <div id="boxTransitionElement" style="background:red;padding-left:18px;padding-top:8px;padding-bottom:50x;padding-right:50px;
+ border-style:solid;border-width:30px;
+ margin-top:55px;margin-bottom:25px;margin-right:15px;margin-left:135px;">
+ <img id="blueBox" src="resources/images/blue.png" onload="onLoadedImage();" style="padding-top:25px;padding-bottom:50px;
+ padding-right:75px;padding-left:100px;">
+ </div>
+</div>
+
+<iframe id="testiframe" frameBorder="0" style="width:100%;height:600px;background: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.
+ <div>This should NOT be displayed.</div>
+</iframe>
+
+<script>
+ description('Tests for the HTML markup serializer used for transition elements');
+</script>
+</body>
« no previous file with comments | « no previous file | LayoutTests/fast/html/navigation-transition-expected.txt » ('j') | Source/core/dom/Document.cpp » ('J')

Powered by Google App Engine