зеркало из https://github.com/mozilla/gecko-dev.git
Bug 834187 - [Computed view] Restore processing of namespaced type selectors e.g. :not(svg|a) test fix r=me
This commit is contained in:
Родитель
0e2b321e11
Коммит
af91da33fb
|
@ -6,6 +6,8 @@
|
||||||
|
|
||||||
let tempScope = {};
|
let tempScope = {};
|
||||||
Cu.import("resource:///modules/devtools/CssLogic.jsm", tempScope);
|
Cu.import("resource:///modules/devtools/CssLogic.jsm", tempScope);
|
||||||
|
const DOMUtils = Cc["@mozilla.org/inspector/dom-utils;1"]
|
||||||
|
.getService(Ci.inIDOMUtils);
|
||||||
let CssLogic = tempScope.CssLogic;
|
let CssLogic = tempScope.CssLogic;
|
||||||
let CssSelector = tempScope.CssSelector;
|
let CssSelector = tempScope.CssSelector;
|
||||||
|
|
||||||
|
@ -30,8 +32,8 @@ function runTests(doc) {
|
||||||
let selectorText = selectors[i];
|
let selectorText = selectors[i];
|
||||||
let selector = new CssSelector(cssRule, selectorText, i);
|
let selector = new CssSelector(cssRule, selectorText, i);
|
||||||
let expected = getExpectedSpecificity(selectorText);
|
let expected = getExpectedSpecificity(selectorText);
|
||||||
let specificity = selector.domUtils.getSpecificity(selector._cssRule,
|
let specificity = DOMUtils.getSpecificity(selector._cssRule,
|
||||||
selector.selectorIndex)
|
selector.selectorIndex)
|
||||||
is(specificity, expected,
|
is(specificity, expected,
|
||||||
'selector "' + selectorText + '" has a specificity of ' + expected);
|
'selector "' + selectorText + '" has a specificity of ' + expected);
|
||||||
}
|
}
|
||||||
|
|
Загрузка…
Ссылка в новой задаче