Bug 1447898 [wpt PR 10138] - Check BackgroundEdgeOrigin when check BackgroundPosition., a=testonly
authorZhuoyu Qian <zhuoyu.qian@samsung.com>
Mon, 09 Apr 2018 18:27:32 +0000
changeset 467217 bad9ac026d7c2217104baa32a6616b2752f14c9e
parent 467216 e44e57545797d584b5d6bc4f634ac2ba59fa4241
child 467218 401a409dbc6b6ec3162295ec2f386a3dba07feb2
push id9165
push userasasaki@mozilla.com
push dateThu, 26 Apr 2018 21:04:54 +0000
treeherdermozilla-beta@064c3804de2e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstestonly
bugs1447898, 10138, 823046, 967912, 546679
milestone61.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1447898 [wpt PR 10138] - Check BackgroundEdgeOrigin when check BackgroundPosition., a=testonly Automatic update from web-platform-testsCheck BackgroundEdgeOrigin when check BackgroundPosition. We should check Background{X/Y}Origin when check BackgroundPosition{X/Y}. BackgroundPosition same but BackgroundEdgeOrigin different is not the same position, we should return false when FillLayersEqual(). Bug: 823046 Signed-off-by: Zhuoyu Qian <zhuoyu.qian@samsung.com> Change-Id: Ia7d0c5af33e1ee5986420dc054c2ce1b1f65e9b0 Reviewed-on: https://chromium-review.googlesource.com/967912 Reviewed-by: Rune Lillesveen <futhark@chromium.org> Cr-Commit-Position: refs/heads/master@{#546679} wpt-commits: 55846d56d8eed33606cdc1beaa7add98e694c824 wpt-pr: 10138 wpt-commits: 55846d56d8eed33606cdc1beaa7add98e694c824 wpt-pr: 10138
testing/web-platform/meta/MANIFEST.json
testing/web-platform/tests/css/css-transitions/transition-background-position-with-edge-offset.html
--- a/testing/web-platform/meta/MANIFEST.json
+++ b/testing/web-platform/meta/MANIFEST.json
@@ -317265,16 +317265,22 @@
     ]
    ],
    "css/css-transitions/transition-001.html": [
     [
      "/css/css-transitions/transition-001.html",
      {}
     ]
    ],
+   "css/css-transitions/transition-background-position-with-edge-offset.html": [
+    [
+     "/css/css-transitions/transition-background-position-with-edge-offset.html",
+     {}
+    ]
+   ],
    "css/css-transitions/transition-delay-001.html": [
     [
      "/css/css-transitions/transition-delay-001.html",
      {}
     ]
    ],
    "css/css-transitions/transition-duration-001.html": [
     [
@@ -523078,16 +523084,20 @@
   "css/css-transitions/support/vendorPrefix.js": [
    "2bbfe4ce7d8ca16f3438fccadfa2996136ddf813",
    "support"
   ],
   "css/css-transitions/transition-001.html": [
    "2068fe442683e6242633527409c89940d4e04bda",
    "testharness"
   ],
+  "css/css-transitions/transition-background-position-with-edge-offset.html": [
+   "00d397eb8f6eba4e3f34c03d7af23e056953e2ef",
+   "testharness"
+  ],
   "css/css-transitions/transition-delay-000.html": [
    "ad61ec6800863b60d7d392fc0666332673319209",
    "manual"
   ],
   "css/css-transitions/transition-delay-001.html": [
    "8da706562352ef5aa455be87a1a35246513976d5",
    "testharness"
   ],
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/css/css-transitions/transition-background-position-with-edge-offset.html
@@ -0,0 +1,49 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>CSS Transitions Test: transition-property - background-position</title>
+<link rel="author" title="Zhuoyu Qian" href="mailto:zhuoyu.qian@samsung.com">
+<link rel="help" title="7.1. Properties from CSS" href="http://www.w3.org/TR/css3-transitions/#animatable-css">
+<link rel="help" title="5.3.6 background-position" href="https://www.w3.org/TR/CSS1/#background-position">
+<meta name="assert" content="Test checks that the 'background-position' property with edge offset is animatable.">
+<script src="/resources/testharness.js" type="text/javascript"></script>
+<script src="/resources/testharnessreport.js" type="text/javascript"></script>
+<style>
+  #test {
+    border: 1px solid;
+    background-image: url("support/cat.png");
+    background-repeat: no-repeat;
+    height: 200px;
+    transition-duration: 100s;
+    transition-property: background-position;
+    transition-timing-function: step-end;
+  }
+</style>
+<body>
+  <div id="test"></div>
+</body>
+<script>
+var startValue = "left 10px top 10px";
+var endValue = "right 10px bottom 10px";
+var div = document.getElementById("test");
+
+// getComputedStyle helper
+function gCS(aProperty) {
+  return document.defaultView
+         .getComputedStyle(div, "")
+         .getPropertyValue(aProperty);
+}
+
+(function() {
+  div.style.backgroundPosition = startValue;
+
+  // flush styles
+  gCS("background-position");
+
+  // set property to endValue
+  div.setAttribute("style", "background-position: " + endValue);
+
+  test(function() {
+    assert_true(gCS("background-position") != endValue);
+  }, "background-position not equals to end value");
+})();
+</script>