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

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

     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