Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(133)

Unified Diff: third_party/WebKit/LayoutTests/printing/printing-resize-starts-transition.html

Issue 2355303002: Replace Manual test with a LayoutTest (Closed)
Patch Set: Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | third_party/WebKit/ManualTests/printing-resize-starts-transition.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/printing/printing-resize-starts-transition.html
diff --git a/third_party/WebKit/LayoutTests/printing/printing-resize-starts-transition.html b/third_party/WebKit/LayoutTests/printing/printing-resize-starts-transition.html
new file mode 100644
index 0000000000000000000000000000000000000000..c2158dbcb9282884dad3b114dda4acdc0b5be96b
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/printing/printing-resize-starts-transition.html
@@ -0,0 +1,40 @@
+<!DOCTYPE html>
+<script src="../resources/testharness.js"></script>
+<script src="../resources/testharnessreport.js"></script>
+
+<style>
+#target {
+ padding-top: 1000px;
+}
+
+@media screen and (max-width: 600px) {
+ #target {
+ padding: 0;
+ transition: 10s all;
+ }
+}
+
+@media print {
+ #target {
+ padding: 0 !important;
+ }
+}
+</style>
+
+<div id="target">
sashab 2016/09/22 00:20:24 Not needed, you can delete all this text :)
+To run this test as a ManualTest:</br>
+1. Open this file in Chrome</br>
+2. Note that there is a large padding (1000px) at the top of the text</br>
+3. Open in Print Preview</br>
+4. The test passes if there is no padding at the top.</br>
+</div>
+
+<script>
+test(function() {
+ if (window.internals) {
+ assert_equals(getComputedStyle(target).paddingTop, "1000px");
+ assert_equals(internals.numberOfPages(200, 200), 1);
+ assert_equals(getComputedStyle(target).paddingTop, "1000px");
+ }
+}, "This test checks that transition are ignored when in @media print");
+</script>
« no previous file with comments | « no previous file | third_party/WebKit/ManualTests/printing-resize-starts-transition.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698