|
1 /* vim: set ft=javascript ts=2 et sw=2 tw=80: */ |
|
2 /* Any copyright is dedicated to the Public Domain. |
|
3 http://creativecommons.org/publicdomain/zero/1.0/ */ |
|
4 |
|
5 "use strict"; |
|
6 |
|
7 // Test that inherited properties are treated correctly. |
|
8 |
|
9 let test = asyncTest(function*() { |
|
10 yield addTab("data:text/html,selector text test, bug 692400"); |
|
11 |
|
12 content.document.body.innerHTML = '<div style="margin-left:10px; font-size: 5px"><div id="innerdiv">Inner div</div></div>'; |
|
13 content.document.title = "Style Inspector Inheritance Test"; |
|
14 |
|
15 let cssLogic = new CssLogic(); |
|
16 cssLogic.highlight(content.document.getElementById("innerdiv")); |
|
17 |
|
18 let marginProp = cssLogic.getPropertyInfo("margin-left"); |
|
19 is(marginProp.matchedRuleCount, 0, "margin-left should not be included in matched selectors."); |
|
20 |
|
21 let fontSizeProp = cssLogic.getPropertyInfo("font-size"); |
|
22 is(fontSizeProp.matchedRuleCount, 1, "font-size should be included in matched selectors."); |
|
23 }); |