Bug 917061 - Fix the last 2 crashtests that use enablePrivilege. r=dholbert

This commit is contained in:
Martijn Wargers 2013-09-25 20:03:38 +02:00
parent 5c059ffc57
commit e49d1bf33b
4 changed files with 24 additions and 20 deletions

View File

@ -9,10 +9,8 @@
<![CDATA[
function doTest()
{
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
var accRetrieval = Components.classes["@mozilla.org/accessibleRetrieval;1"].
getService(Components.interfaces.nsIAccessibleRetrieval);
var accRetrieval = SpecialPowers.Cc["@mozilla.org/accessibleRetrieval;1"].
getService(SpecialPowers.Ci.nsIAccessibleRetrieval);
var treecol = document.getElementById("col");
var x = treecol.boxObject.screenX;

View File

@ -1 +1,2 @@
load 471493.xul
# Disabled because it causes assertions/crashes in later crashtests, see bug 918246
skip load 471493.xul

View File

@ -1,31 +1,34 @@
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:mathml="http://www.w3.org/1998/Math/MathML">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:mathml="http://www.w3.org/1998/Math/MathML" class="reftest-wait">
<mathml:mfenced/>
<script><![CDATA[
var docviewer;
function do_onload() {
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
var navigator1 = parent.QueryInterface(Components.interfaces.nsIInterfaceRequestor).getInterface(Components.interfaces.nsIWebNavigation);
var docShell = navigator1.QueryInterface(Components.interfaces.nsIDocShell);
docviewer = docShell.contentViewer.QueryInterface(Components.interfaces.nsIMarkupDocumentViewer);
var navigator1 = SpecialPowers.wrap(parent).QueryInterface(SpecialPowers.Ci.nsIInterfaceRequestor).getInterface(SpecialPowers.Ci.nsIWebNavigation);
var docShell = navigator1.QueryInterface(SpecialPowers.Ci.nsIDocShell);
docviewer = docShell.contentViewer.QueryInterface(SpecialPowers.Ci.nsIMarkupDocumentViewer);
setTimeout(function() {window.location.reload()}, 500);
setTimeout(doe,50, 0.2);
setTimeout(function() {
clearTimeout(timer);
docviewer.textZoom = 1;
document.documentElement.removeAttribute("class");
}, 500);
setTimeout(doe,50, 0.2);
}
do_onload();
var timer;
function doe(i) {
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
docviewer.textZoom += i;
docviewer.textZoom += i;
if (docviewer.textZoom >=4)
i = -0.2;
if (docviewer.textZoom >=4)
i = -0.2;
if (docviewer.textZoom <=0)
i = 0.2;
window.status = docviewer.textZoom;
setTimeout(doe, 50, i);
if (docviewer.textZoom <=0)
i = 0.2;
window.status = docviewer.textZoom;
timer = setTimeout(doe, 50, i);
}
]]></script>
</html>

View File

@ -3,6 +3,8 @@
include ../../testing/crashtest/sanity/crashtests.list
include ../../accessible/tests/crashtests/crashtests.list
include ../../content/base/crashtests/crashtests.list
include ../../content/canvas/crashtests/crashtests.list
include ../../content/events/crashtests/crashtests.list