summaryrefslogtreecommitdiffstats
path: root/devtools/server/tests/chrome/inactive-property-helper/text-overflow.mjs
blob: ada2211b3a5038a32a78149386abaa5a344691d9 (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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */

// InactivePropertyHelper `text-overflow` test cases.
export default [
  {
    info: "text-overflow is inactive when overflow is not set",
    property: "text-overflow",
    tagName: "div",
    rules: ["div { text-overflow: ellipsis; }"],
    isActive: false,
  },
  {
    info: "text-overflow is active when overflow is set to hidden",
    property: "text-overflow",
    tagName: "div",
    rules: ["div { text-overflow: ellipsis; overflow: hidden; }"],
    isActive: true,
  },
  {
    info: "text-overflow is active when overflow is set to auto",
    property: "text-overflow",
    tagName: "div",
    rules: ["div { text-overflow: ellipsis; overflow: auto; }"],
    isActive: true,
  },
  {
    info: "text-overflow is active when overflow is set to scroll",
    property: "text-overflow",
    tagName: "div",
    rules: ["div { text-overflow: ellipsis; overflow: scroll; }"],
    isActive: true,
  },
  {
    info: "text-overflow is inactive when overflow is set to visible",
    property: "text-overflow",
    tagName: "div",
    rules: ["div { text-overflow: ellipsis; overflow: visible; }"],
    isActive: false,
  },
  {
    info: "text-overflow is active when overflow-x is set to hidden on horizontal writing mode",
    property: "text-overflow",
    tagName: "div",
    rules: [
      "div { writing-mode: lr; text-overflow: ellipsis; overflow-x: hidden; }",
    ],
    isActive: true,
  },
  {
    info: "text-overflow is inactive when overflow-x is set to visible on horizontal writing mode",
    property: "text-overflow",
    tagName: "div",
    rules: [
      "div { writing-mode: lr; text-overflow: ellipsis; overflow-x: visible; }",
    ],
    isActive: false,
  },
  {
    info: "text-overflow is active when overflow-y is set to hidden on vertical writing mode",
    property: "text-overflow",
    tagName: "div",
    rules: [
      "div { writing-mode: vertical-lr; text-overflow: ellipsis; overflow-y: hidden; }",
    ],
    isActive: true,
  },
  {
    info: "text-overflow is inactive when overflow-y is set to visible on vertical writing mode",
    property: "text-overflow",
    tagName: "div",
    rules: [
      "div { writing-mode: vertical-lr; text-overflow: ellipsis; overflow-y: visible; }",
    ],
    isActive: false,
  },
  {
    info: "as soon as overflow:hidden is set, text-overflow is active whatever the box type",
    property: "text-overflow",
    tagName: "span",
    rules: ["span { text-overflow: ellipsis; overflow: hidden; }"],
    isActive: true,
  },
  {
    info: "as soon as overflow:hidden is set, text-overflow is active whatever the box type",
    property: "text-overflow",
    tagName: "legend",
    rules: ["legend { text-overflow: ellipsis; overflow: hidden; }"],
    isActive: true,
  },
];