Chromium Code Reviews| 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> |