browser/devtools/styleinspector/test/browser_styleinspector_csslogic-inherited-properties.js

Thu, 22 Jan 2015 13:21:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 22 Jan 2015 13:21:57 +0100
branch
TOR_BUG_9701
changeset 15
b8a032363ba2
permissions
-rw-r--r--

Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6

     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/ */
     5 "use strict";
     7 // Test that inherited properties are treated correctly.
     9 let test = asyncTest(function*() {
    10   yield addTab("data:text/html,selector text test, bug 692400");
    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";
    15   let cssLogic = new CssLogic();
    16   cssLogic.highlight(content.document.getElementById("innerdiv"));
    18   let marginProp = cssLogic.getPropertyInfo("margin-left");
    19   is(marginProp.matchedRuleCount, 0, "margin-left should not be included in matched selectors.");
    21   let fontSizeProp = cssLogic.getPropertyInfo("font-size");
    22   is(fontSizeProp.matchedRuleCount, 1, "font-size should be included in matched selectors.");
    23 });

mercurial