Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 <!DOCTYPE html> | |
| 2 <script src="../resources/testharness.js"></script> | |
| 3 <script src="../resources/testharnessreport.js"></script> | |
| 4 | |
| 5 <style> | |
| 6 #target { | |
| 7 padding-top: 1000px; | |
| 8 } | |
| 9 | |
| 10 @media screen and (max-width: 600px) { | |
| 11 #target { | |
| 12 padding: 0; | |
| 13 transition: 10s all; | |
| 14 } | |
| 15 } | |
| 16 | |
| 17 @media print { | |
| 18 #target { | |
| 19 padding: 0 !important; | |
| 20 } | |
| 21 } | |
| 22 </style> | |
| 23 | |
| 24 <div id="target"> | |
|
sashab
2016/09/22 00:20:24
Not needed, you can delete all this text :)
| |
| 25 To run this test as a ManualTest:</br> | |
| 26 1. Open this file in Chrome</br> | |
| 27 2. Note that there is a large padding (1000px) at the top of the text</br> | |
| 28 3. Open in Print Preview</br> | |
| 29 4. The test passes if there is no padding at the top.</br> | |
| 30 </div> | |
| 31 | |
| 32 <script> | |
| 33 test(function() { | |
| 34 if (window.internals) { | |
| 35 assert_equals(getComputedStyle(target).paddingTop, "1000px"); | |
| 36 assert_equals(internals.numberOfPages(200, 200), 1); | |
| 37 assert_equals(getComputedStyle(target).paddingTop, "1000px"); | |
| 38 } | |
| 39 }, "This test checks that transition are ignored when in @media print"); | |
| 40 </script> | |
| OLD | NEW |