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

Unified Diff: third_party/WebKit/LayoutTests/animations/transition-zoomed-length.html

Issue 2562643002: Avoid visually transitioning on length CSS properties when zoom changes (Closed)
Patch Set: Rebased Created 4 years 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/animation/css/CSSAnimatableValueFactory.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/animations/transition-zoomed-length.html
diff --git a/third_party/WebKit/LayoutTests/animations/transition-zoomed-length.html b/third_party/WebKit/LayoutTests/animations/transition-zoomed-length.html
new file mode 100644
index 0000000000000000000000000000000000000000..721a7c907391168b32b0d442be032ff18ec66686
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/animations/transition-zoomed-length.html
@@ -0,0 +1,84 @@
+<!DOCTYPE html>
+<script src="../resources/testharness.js"></script>
+<script src="../resources/testharnessreport.js"></script>
+<style>
+#target {
+ transition: 1s;
+ border-style: solid;
+ outline-style: solid;
+ column-rule-style: solid;
+}
+</style>
+<div id="target"></div>
+<script>
+var lengthProperties = [
+ 'baselineShift',
+ 'borderBottomWidth',
+ 'borderLeftWidth',
+ 'borderRightWidth',
+ 'borderTopWidth',
+ 'bottom',
+ 'cx',
+ 'cy',
+ 'flexBasis',
+ 'height',
+ 'left',
+ 'letterSpacing',
+ 'marginBottom',
+ 'marginLeft',
+ 'marginRight',
+ 'marginTop',
+ 'maxHeight',
+ 'maxWidth',
+ 'minHeight',
+ 'minWidth',
+ 'offsetDistance',
+ 'outlineOffset',
+ 'outlineWidth',
+ 'paddingBottom',
+ 'paddingLeft',
+ 'paddingRight',
+ 'paddingTop',
+ 'perspective',
+ 'r',
+ 'right',
+ 'rx',
+ 'ry',
+ 'shapeMargin',
+ 'strokeDashoffset',
+ 'strokeWidth',
+ 'top',
+ 'verticalAlign',
+ 'webkitBorderHorizontalSpacing',
+ 'webkitBorderVerticalSpacing',
+ 'columnGap',
+ 'columnRuleWidth',
+ 'columnWidth',
+ 'webkitPerspectiveOriginX',
+ 'webkitPerspectiveOriginY',
+ 'webkitTransformOriginX',
+ 'webkitTransformOriginY',
+ 'webkitTransformOriginZ',
+ 'width',
+ 'wordSpacing',
+ 'x',
+ 'y',
+ 'lineHeight',
+];
+var expected = {};
+
+// The test setup is wrapped in a test() call to make sure we fail if an error is thrown.
suzyh_UTC10 (ex-contributor) 2016/12/14 05:53:30 It's just occurred to me that we need to be sure t
alancutter (OOO until 2018) 2016/12/14 05:59:28 That's exactly what I should be using, thanks!
+test(() => {
+ for (var property of lengthProperties) {
+ target.style[property] = '10px';
+ expected[property] = getComputedStyle(target)[property];
+ }
+ internals.setZoomFactor(2);
+}, 'Test setup');
+
+for (var property of lengthProperties) {
+ test(() => {
+ assert_equals(getComputedStyle(target)[property], expected[property]);
+ }, 'Computed value of transitionable ' + property + ' should not change when zoom changes');
+}
+</script>
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/animation/css/CSSAnimatableValueFactory.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698