Bug 1442501 [wpt PR 9740] - Upstream css-display-3/display-contents-set-get.html to WPT, a=testonly
authorChris Nardi <cnardi@chromium.org>
Mon, 26 Mar 2018 15:13:07 +0000
changeset 411222 2369101276f0b11cc6b1c520bf8f0b324890e163
parent 411221 c7d2294b89497e04a63e06cf5781ad6f5a1de045
child 411223 825426053dab04135b3f1154ad0d6b788012edeb
push id33749
push usercsabou@mozilla.com
push dateMon, 02 Apr 2018 10:18:51 +0000
treeherdermozilla-central@c44f60c43432 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstestonly
bugs1442501, 945147, 540984
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 1442501 [wpt PR 9740] - Upstream css-display-3/display-contents-set-get.html to WPT, a=testonly Automatic update from web-platform-testsUpstream css-display-3/display-contents-set-get.html to WPT Change-Id: I071484497d2126171928191c66985e2e055e3f8b Reviewed-on: https://chromium-review.googlesource.com/945147 Reviewed-by: Manuel Rego Casasnovas <rego@igalia.com> Commit-Queue: Manuel Rego Casasnovas <rego@igalia.com> Cr-Commit-Position: refs/heads/master@{#540984} wpt-commits: b22c01d6ea0aca29ae9812058d4d3aad04869340 wpt-pr: 9740 wpt-commits: b22c01d6ea0aca29ae9812058d4d3aad04869340 wpt-pr: 9740
testing/web-platform/meta/MANIFEST.json
testing/web-platform/tests/css/css-display/display-contents-parsing-001.html
--- a/testing/web-platform/meta/MANIFEST.json
+++ b/testing/web-platform/meta/MANIFEST.json
@@ -311235,16 +311235,22 @@
     ]
    ],
    "css/css-display/display-contents-computed-style.html": [
     [
      "/css/css-display/display-contents-computed-style.html",
      {}
     ]
    ],
+   "css/css-display/display-contents-parsing-001.html": [
+    [
+     "/css/css-display/display-contents-parsing-001.html",
+     {}
+    ]
+   ],
    "css/css-display/display-contents-svg-anchor-child.html": [
     [
      "/css/css-display/display-contents-svg-anchor-child.html",
      {}
     ]
    ],
    "css/css-display/display-contents-svg-switch-child.html": [
     [
@@ -486358,16 +486364,20 @@
   "css/css-display/display-contents-oof-001.html": [
    "9d0ab5493554a2dc924989b7a2d48d896556189c",
    "reftest"
   ],
   "css/css-display/display-contents-oof-002.html": [
    "a0114c40f3919ed615525495b8504925dbbc6cc7",
    "reftest"
   ],
+  "css/css-display/display-contents-parsing-001.html": [
+   "a058037193f51ef4cfdf6870d5e09e24901cbe9c",
+   "testharness"
+  ],
   "css/css-display/display-contents-pass-green-no-red-ref.html": [
    "6c4a6b62d0ea48e8a7778ea20b1d2a26ff8e68aa",
    "support"
   ],
   "css/css-display/display-contents-pass-no-red-ref.html": [
    "8c4bf0927318a7612471fe09d91e80b37b1ab56c",
    "support"
   ],
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/css/css-display/display-contents-parsing-001.html
@@ -0,0 +1,43 @@
+<!doctype html>
+<meta charset="utf-8">
+<title>Tests that the 'contents' value for the 'display' property is correctly parsed</title>
+<link rel="help" href="https://drafts.csswg.org/css-display/#box-generation">
+<link rel="author" href="mailto:ecobos@igalia.com" title="Emilio Cobos Álvarez">
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<style>
+  .contents {
+    display: contents;
+  }
+
+  .contents-then-block {
+    display: contents;
+    display: block;
+  }
+
+  .content {
+    display: content;
+  }
+</style>
+<div class="contents" id="contentsElement"></div>
+<div class="content" id="bogusContentsElement"></div>
+<div class="contents-then-block" id="contentsThenBlockElement"></div>
+<script>
+test(function() {
+  var contentsElement = document.getElementById("contentsElement");
+  var bogusContentsElement = document.getElementById("bogusContentsElement");
+  var contentsThenBlockElement = document.getElementById("contentsThenBlockElement");
+
+  assert_equals(getComputedStyle(contentsElement).getPropertyValue("display"), "contents");
+  assert_equals(getComputedStyle(bogusContentsElement).getPropertyValue("display"), "block");
+  assert_equals(getComputedStyle(contentsThenBlockElement).getPropertyValue("display"), "block");
+
+  var element = document.createElement("div");
+  document.body.appendChild(element);
+  assert_equals(getComputedStyle(element).getPropertyValue("display"), "block");
+  element.style.display = "contents";
+  assert_equals(getComputedStyle(element).getPropertyValue("display"), "contents");
+  element.style.display = "block";
+  assert_equals(getComputedStyle(element).getPropertyValue("display"), "block");
+});
+</script>