OLD | NEW |
---|---|
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <script src="../../resources/testharness.js"></script> | 2 <script src="../../resources/testharness.js"></script> |
3 <script src="../../resources/testharnessreport.js"></script> | 3 <script src="../../resources/testharnessreport.js"></script> |
4 | 4 |
5 <div id="target"></div> | 5 <div id="target"></div> |
6 | 6 |
7 <script> | 7 <script> |
8 target.style.backgroundImage = "-webkit-cross-fade(url(images1.jpg), url(image s2.jpg), 0.5)"; | 8 target.style.backgroundImage = "-webkit-cross-fade(url(images1.jpg), url(image s2.jpg), 0.5)"; |
9 test(function() { | 9 test(function() { |
10 var expected = "-webkit-cross-fade(url(" + location.href.replace('getCompute dStyle-relativeURL.html', 'images1.jpg') + "), url(" + location.href.replace('ge tComputedStyle-relativeURL.html', 'images2.jpg') + "), 0.5)"; | 10 var expected = "-webkit-cross-fade(url(\"" + location.href.replace('getCompu tedStyle-relativeURL.html', 'images1.jpg') + "\"), url(\"" + location.href.repla ce('getComputedStyle-relativeURL.html', 'images2.jpg') + "\"), 0.5)"; |
Timothy Loh
2015/09/25 14:22:05
single quotes for this file too
nainar
2015/09/28 01:19:17
Done.
| |
11 assert_equals(getComputedStyle(target).backgroundImage, expected); | 11 assert_equals(getComputedStyle(target).backgroundImage, expected); |
12 assert_equals(target.style.backgroundImage, "-webkit-cross-fade(url(images1. jpg), url(images2.jpg), 0.5)"); | 12 assert_equals(target.style.backgroundImage, "-webkit-cross-fade(url(\"images 1.jpg\"), url(\"images2.jpg\"), 0.5)"); |
13 }, 'Testing that getComputedStyle.backgroundImage returns absolute URLs and st yle.backgroundImage returns relative URLs'); | 13 }, 'Testing that getComputedStyle.backgroundImage returns absolute URLs and st yle.backgroundImage returns relative URLs'); |
14 </script> | 14 </script> |
OLD | NEW |