4 <script src=
"../../../resources/js-test.js"></script>
8 description('Apply image-orientation property and check computed style.');
11 'from-image': ['from-image'],
13 '': ['-360deg', '-315deg', '315deg', '360deg', '90deg', '-270deg', '-225deg', '45deg',
14 '180deg', '-180deg', '-135deg', '135deg', '270deg', '-90deg', '-45deg', '225deg', '0']
17 var img
= document
.createElement('img');
18 document
.body
.appendChild(img
);
19 for (expected
in expectations
) {
20 expectations
[expected
].forEach(function(test
) {
21 img
.style
.imageOrientation
= '';
22 img
.style
.imageOrientation
= test
;
24 shouldBe('img.style.cssText', '""');
25 shouldBe('getComputedStyle(img).imageOrientation', '"0deg"');
27 shouldBe('img.style.cssText', '"image-orientation: ' + test
+ ';"');
28 shouldBe('getComputedStyle(img).imageOrientation', '"' + expected
+ '"');
32 document
.body
.removeChild(img
);