| Index: LayoutTests/fast/css/image-orientation/image-orientation.html
|
| diff --git a/LayoutTests/fast/css/image-orientation/image-orientation.html b/LayoutTests/fast/css/image-orientation/image-orientation.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..dc4688cf08e840fa9261744806167cea436bcdf7
|
| --- /dev/null
|
| +++ b/LayoutTests/fast/css/image-orientation/image-orientation.html
|
| @@ -0,0 +1,35 @@
|
| +<!DOCTYPE html>
|
| +<html>
|
| +<head>
|
| +<script src="../../../resources/js-test.js"></script>
|
| +</head>
|
| +<body>
|
| +<script>
|
| +description('Apply image-orientation property and check computed style.');
|
| +
|
| +var expectations = {
|
| + 'from-image': ['from-image'],
|
| + '0deg': ['0deg'],
|
| + '': ['-360deg', '-315deg', '315deg', '360deg', '90deg', '-270deg', '-225deg', '45deg',
|
| + '180deg', '-180deg', '-135deg', '135deg', '270deg', '-90deg', '-45deg', '225deg', '0']
|
| +};
|
| +
|
| +var img = document.createElement('img');
|
| +document.body.appendChild(img);
|
| +for (expected in expectations) {
|
| + expectations[expected].forEach(function(test) {
|
| + img.style.imageOrientation = '';
|
| + img.style.imageOrientation = test;
|
| + if (expected == '') {
|
| + shouldBe('img.style.cssText', '""');
|
| + shouldBe('getComputedStyle(img).imageOrientation', '"0deg"');
|
| + } else {
|
| + shouldBe('img.style.cssText', '"image-orientation: ' + test + ';"');
|
| + shouldBe('getComputedStyle(img).imageOrientation', '"' + expected + '"');
|
| + }
|
| + });
|
| +}
|
| +document.body.removeChild(img);
|
| +</script>
|
| +</body>
|
| +</html>
|
|
|