зеркало из https://github.com/mozilla/gecko-dev.git
Convert use of DOMWindowUtils in style system mochitests to SpecialPowers. (Bug 653461, patch 2) r=bzbarsky
This commit is contained in:
Родитель
1f7739e466
Коммит
3f21fee119
|
@ -27,10 +27,7 @@ SimpleTest.waitForExplicitFinish();
|
|||
var iframe;
|
||||
|
||||
function getZoomRatio() {
|
||||
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
|
||||
var utils = window.QueryInterface(Components.interfaces.nsIInterfaceRequestor)
|
||||
.getInterface(Components.interfaces.nsIDOMWindowUtils);
|
||||
return utils.screenPixelsPerCSSPixel;
|
||||
return SpecialPowers.DOMWindowUtils.screenPixelsPerCSSPixel;
|
||||
}
|
||||
|
||||
function run() {
|
||||
|
|
|
@ -49,10 +49,7 @@ function run() {
|
|||
}
|
||||
|
||||
function getZoomRatio() {
|
||||
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
|
||||
var utils = window.QueryInterface(Components.interfaces.nsIInterfaceRequestor)
|
||||
.getInterface(Components.interfaces.nsIDOMWindowUtils);
|
||||
return utils.screenPixelsPerCSSPixel;
|
||||
return SpecialPowers.DOMWindowUtils.screenPixelsPerCSSPixel;
|
||||
}
|
||||
|
||||
var screenPixelsPerCSSPixel = getZoomRatio();
|
||||
|
|
|
@ -70,12 +70,8 @@ function synthesizeMouseEvent(type, // string
|
|||
modifiers, // long
|
||||
ignoreWindowBounds) // boolean
|
||||
{
|
||||
netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect');
|
||||
|
||||
var utils = window.QueryInterface(Components.interfaces.nsIInterfaceRequestor).
|
||||
getInterface(Components.interfaces.nsIDOMWindowUtils);
|
||||
|
||||
utils.sendMouseEvent(type, x, y, button, clickCount, modifiers, ignoreWindowBounds);
|
||||
SpecialPowers.DOMWindowUtils.sendMouseEvent(type, x, y, button, clickCount,
|
||||
modifiers, ignoreWindowBounds);
|
||||
}
|
||||
|
||||
function run_test()
|
||||
|
|
|
@ -278,10 +278,8 @@ div.style.removeProperty("-moz-transition");
|
|||
|
||||
function get_distance(prop, v1, v2)
|
||||
{
|
||||
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
|
||||
var utils = window.QueryInterface(Components.interfaces.nsIInterfaceRequestor)
|
||||
.getInterface(Components.interfaces.nsIDOMWindowUtils);
|
||||
return utils.computeAnimationDistance(div, prop, v1, v2);
|
||||
return SpecialPowers.DOMWindowUtils
|
||||
.computeAnimationDistance(div, prop, v1, v2);
|
||||
}
|
||||
|
||||
function check_distance(prop, start, quarter, end)
|
||||
|
|
|
@ -33,10 +33,8 @@ function run()
|
|||
}
|
||||
|
||||
function visitedDependentComputedStyle(win, elem, property) {
|
||||
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
|
||||
var utils = win.QueryInterface(Components.interfaces.nsIInterfaceRequestor).
|
||||
getInterface(Components.interfaces.nsIDOMWindowUtils);
|
||||
return utils.getVisitedDependentComputedStyle(elem, "", property);
|
||||
return SpecialPowers.DOMWindowUtils
|
||||
.getVisitedDependentComputedStyle(elem, "", property);
|
||||
}
|
||||
|
||||
function check_link_styled()
|
||||
|
|
|
@ -33,10 +33,8 @@ function run()
|
|||
}
|
||||
|
||||
function visitedDependentComputedStyle(win, elem, property) {
|
||||
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
|
||||
var utils = win.QueryInterface(Components.interfaces.nsIInterfaceRequestor).
|
||||
getInterface(Components.interfaces.nsIDOMWindowUtils);
|
||||
return utils.getVisitedDependentComputedStyle(elem, "", property);
|
||||
return SpecialPowers.DOMWindowUtils
|
||||
.getVisitedDependentComputedStyle(elem, "", property);
|
||||
}
|
||||
|
||||
function check_link_styled()
|
||||
|
|
Загрузка…
Ссылка в новой задаче