diff --git a/layout/style/test/test_media_queries.html b/layout/style/test/test_media_queries.html index 94a4e0cd0b92..b1a62baa3fe1 100644 --- a/layout/style/test/test_media_queries.html +++ b/layout/style/test/test_media_queries.html @@ -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() { diff --git a/layout/style/test/test_moz_device_pixel_ratio.html b/layout/style/test/test_moz_device_pixel_ratio.html index e27b0c6beb72..ae07230e9f81 100644 --- a/layout/style/test/test_moz_device_pixel_ratio.html +++ b/layout/style/test/test_moz_device_pixel_ratio.html @@ -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(); diff --git a/layout/style/test/test_pointer-events.html b/layout/style/test/test_pointer-events.html index c12ddf19d2f1..893e102a0483 100644 --- a/layout/style/test/test_pointer-events.html +++ b/layout/style/test/test_pointer-events.html @@ -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() diff --git a/layout/style/test/test_transitions_per_property.html b/layout/style/test/test_transitions_per_property.html index 544e15215d67..ec1a4408177f 100644 --- a/layout/style/test/test_transitions_per_property.html +++ b/layout/style/test/test_transitions_per_property.html @@ -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) diff --git a/layout/style/test/test_visited_image_loading.html b/layout/style/test/test_visited_image_loading.html index f3d170848946..496c9730be70 100644 --- a/layout/style/test/test_visited_image_loading.html +++ b/layout/style/test/test_visited_image_loading.html @@ -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() diff --git a/layout/style/test/test_visited_image_loading_empty.html b/layout/style/test/test_visited_image_loading_empty.html index 945293dbc624..fe0de8a74d6f 100644 --- a/layout/style/test/test_visited_image_loading_empty.html +++ b/layout/style/test/test_visited_image_loading_empty.html @@ -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()