Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(196)

Unified Diff: LayoutTests/fast/css/image-orientation/image-orientation.html

Issue 1162793003: Add CSS image-orientation: from-image (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Address even more review comments Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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..4e46888351c6098b76f3da6957329d6a573dee4b
--- /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 p = document.createElement('p');
Noel Gordon 2015/06/19 07:41:25 Not following: are you testing that imageOrientati
rwlbuis 2015/06/19 16:03:15 It does not matter for the test from CSSComputedSt
+document.body.appendChild(p);
+for (expected in expectations) {
+ expectations[expected].forEach(function(test) {
+ p.style.imageOrientation = '';
+ p.style.imageOrientation = test;
+ if (expected == '') {
+ shouldBe('p.style.cssText', '""');
+ shouldBe('getComputedStyle(p).imageOrientation', '"0deg"');
+ } else {
+ shouldBe('p.style.cssText', '"image-orientation: ' + test + ';"');
+ shouldBe('getComputedStyle(p).imageOrientation', '"' + expected + '"');
+ }
+ });
+}
+document.body.removeChild(p);
+</script>
+</body>
+</html>

Powered by Google App Engine
This is Rietveld 408576698