OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE html> |
| 2 <script src="../../../resources/testharness.js"></script> |
| 3 <script src="../../../resources/testharnessreport.js"></script> |
| 4 |
| 5 <style> |
| 6 #target1::before { |
| 7 content: 'test'; |
| 8 } |
| 9 #target1::after { |
| 10 content: normal; |
| 11 } |
| 12 #target2 { |
| 13 content: 'test'; |
| 14 } |
| 15 #target2::before { |
| 16 content: normal; |
| 17 } |
| 18 #target2::after { |
| 19 content: 'test'; |
| 20 } |
| 21 #target3 { |
| 22 content: none; |
| 23 } |
| 24 #target3::before { |
| 25 content: none; |
| 26 } |
| 27 #target3::after { |
| 28 content: 'test'; |
| 29 } |
| 30 </style> |
| 31 |
| 32 <div id="target1"></div> |
| 33 <div id="target2"></div> |
| 34 <div id="target3"></div> |
| 35 |
| 36 <script> |
| 37 test(function() { |
| 38 assert_equals(getComputedStyle(target1).content, 'normal'); |
| 39 assert_equals(getComputedStyle(target1, '::before').content, '"test"'); |
| 40 assert_equals(getComputedStyle(target1, '::after').content, 'none'); |
| 41 assert_equals(getComputedStyle(target2).content, 'normal'); |
| 42 assert_equals(getComputedStyle(target2, '::before').content, 'none'); |
| 43 assert_equals(getComputedStyle(target2, '::after').content, '"test"'); |
| 44 assert_equals(getComputedStyle(target3).content, 'normal'); |
| 45 assert_equals(getComputedStyle(target3, '::before').content, 'none'); |
| 46 assert_equals(getComputedStyle(target3, '::after').content, '"test"'); |
| 47 }, 'Test that content computes to "normal" for elements (not pseudo elements) an
d to "none" if the specified value of pseudo elements is "normal"'); |
| 48 </script> |
OLD | NEW |