diff --git a/browser/base/content/test/test_contextmenu.html b/browser/base/content/test/test_contextmenu.html index ad6d29b5b7f6..87086f1d2ead 100644 --- a/browser/base/content/test/test_contextmenu.html +++ b/browser/base/content/test/test_contextmenu.html @@ -18,9 +18,7 @@ Browser context menu tests. /** Test for Login Manager: multiple login autocomplete. **/ -netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect'); -Components.utils.import("resource://gre/modules/InlineSpellChecker.jsm"); -Components.utils.import("resource://gre/modules/Services.jsm"); +SpecialPowers.wrap(Components).utils.import("resource://gre/modules/InlineSpellChecker.jsm", window); const Cc = Components.classes; const Ci = Components.interfaces; @@ -729,7 +727,7 @@ function runTest(testNum) { case 24: // Context menu for selected text - if (Services.appinfo.OS == "Darwin") { + if (SpecialPowers.Services.appinfo.OS == "Darwin") { // This test is only enabled on Mac due to bug 736399. checkContextMenu(["context-copy", true, "context-selectall", true, @@ -745,7 +743,7 @@ function runTest(testNum) { case 25: // Context menu for selected text which matches valid URL pattern - if (Services.appinfo.OS == "Darwin") { + if (SpecialPowers.Services.appinfo.OS == "Darwin") { // This test is only enabled on Mac due to bug 736399. checkContextMenu(["context-openlinkincurrent", true, "context-openlinkintab", true, @@ -790,8 +788,7 @@ var text, link, mailto, input, img, canvas, video_ok, video_bad, video_bad2, inputspell, pagemenu, dom_full_screen, plainTextItems, audio_in_video; function startTest() { - netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect'); - chromeWin = subwindow + chromeWin = SpecialPowers.wrap(subwindow) .QueryInterface(Ci.nsIInterfaceRequestor) .getInterface(Ci.nsIWebNavigation) .QueryInterface(Ci.nsIDocShellTreeItem) diff --git a/content/base/test/test_bug345339.html b/content/base/test/test_bug345339.html index e31c7a51ce74..ac61781f87d8 100644 --- a/content/base/test/test_bug345339.html +++ b/content/base/test/test_bug345339.html @@ -32,15 +32,14 @@ function afterLoad() { iframeDoc.getElementById("password").value = "123456"; iframeDoc.getElementById("hidden").value = "gecko"; - netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect"); - var file = Components.classes["@mozilla.org/file/directory_service;1"] + var file = SpecialPowers.wrap(Components).classes["@mozilla.org/file/directory_service;1"] .getService(Components.interfaces.nsIProperties) .get("TmpD", Components.interfaces.nsILocalFile); file.append("345339_test.file"); file.createUnique(Components.interfaces.nsIFile.NORMAL_FILE_TYPE, 0666); filePath = file.path; - iframeDoc.getElementById("file").value = filePath; + SpecialPowers.wrap(iframeDoc).getElementById("file").value = filePath; /* Reload the page */ $("testframe").setAttribute("onload", "afterReload()"); @@ -62,8 +61,7 @@ function afterReload() { "password field value forgotten"); is(iframeDoc.getElementById("hidden").value, "gecko", "hidden field value preserved"); - netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect"); - is(iframeDoc.getElementById("file").value, filePath, + is(SpecialPowers.wrap(iframeDoc).getElementById("file").value, filePath, "file field value preserved"); SimpleTest.finish(); diff --git a/content/base/test/test_bug422537.html b/content/base/test/test_bug422537.html index 37ae3cd0e1af..1de938650cf1 100644 --- a/content/base/test/test_bug422537.html +++ b/content/base/test/test_bug422537.html @@ -19,10 +19,9 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=422537