summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/html/semantics/permission-element/display-css-property.tentative.html
blob: 7aa22ef4a2bee44968b4a960d49a789778c2868e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
<!DOCTYPE html>
<meta charset=utf-8>
<link rel="help" href="https://github.com/WICG/PEPC/blob/main/explainer.md#locking-the-pepc-style">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<body>
<!--
  'display' should either be 'none' or 'inline-block'
-->
<style>
  #id1 {
    display: inline-block;
  }
  #id2 {
    display: block;
  }
  #id3 {
    display: none;
  }
</style>


<permission id="id1" type="geolocation">
<permission id="id2" type="camera">
<permission id="id3" type="microphone">

<script>
  test(function(){
    assert_equals(getComputedStyle(document.getElementById("id1")).display, "inline-block", "'inline-block' should be kept");
    assert_equals(getComputedStyle(document.getElementById("id2")).display, "inline-block", "'block' should be changed to 'inline-block'");
    assert_equals(getComputedStyle(document.getElementById("id3")).display, "none", "'none' should be kept");
  }, "'display' should be either 'inline-block' or 'none'");
</script>
</body>