cdumez@apple.com | e05427e | 2014-10-31 23:46:20 +0000 | [diff] [blame] | 1 | <!DOCTYPE html> |
| 2 | <script src="../../resources/js-test-pre.js"></script> |
| 3 | <marquee id="myMarquee"></marquee> |
| 4 | |
| 5 | <script> |
| 6 | description("Makes sure we don't crash in the StyleBuilder if bad values are used for -webkit-marquee-increment property."); |
| 7 | |
| 8 | var badValues = [ |
| 9 | "1px 2px", // a list. |
| 10 | "url(\"resources/border-image.png\")", // an image url. |
| 11 | "copy", // a cursor. |
| 12 | ]; |
| 13 | |
| 14 | var testElement = document.getElementById("myMarquee"); |
| 15 | for (var i = 0; i < badValues.length; ++i) { |
| 16 | testElement.style["-webkit-marquee-increment"] = badValues[i]; |
| 17 | document.defaultView.getComputedStyle(testElement)["-webkit-marquee-increment"]; |
| 18 | testPassed("No crash for " + badValues[i] + " value"); |
| 19 | } |
| 20 | </script> |
| 21 | <script src="../../resources/js-test-post.js"></script> |