blob: f6776b47c4a66cf9d3cb2f49f81f1bf9fcb9193a (
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
|
/* Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/ */
"use strict";
// Test that an invalid property still lets us display the rule view
// Bug 1235603.
const TEST_URI = `
<style>
div {
background: #fff;
font-family: sans-serif;
url(display-table.min.htc);
}
</style>
<body>
<div id="testid" class="testclass">Styled Node</div>
</body>
`;
add_task(async function () {
await addTab("data:text/html;charset=utf-8," + encodeURIComponent(TEST_URI));
const { inspector, view } = await openRuleView();
await selectNode("#testid", inspector);
is(view._elementStyle.rules.length, 2, "Should have 2 rules.");
// Have to actually get the rule in order to ensure that the
// elements were created.
ok(getRuleViewRule(view, "div"), "Rule with div selector exists");
});
|