Bug 396367. Make the tests reset the textzoom after changing it.

--HG--
extra : rebase_source : 5afddd159099314576ad6623d11649266a7b4e77
This commit is contained in:
Timothy Nikkel 2009-12-26 21:36:12 -06:00
Родитель b0273ee72c
Коммит 2de0f3ddf5
2 изменённых файлов: 22 добавлений и 8 удалений

Просмотреть файл

@ -13,8 +13,18 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=396367
function finish() {
ok(true, "didn't crash");
var docviewer = getdocviewer();
docviewer.textZoom = 1;
SimpleTest.finish();
}
function getdocviewer() {
//netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
var navigator1 = top.QueryInterface(Components.interfaces.nsIInterfaceRequestor).getInterface(Components.interfaces.nsIWebNavigation);
var docShell = navigator1.QueryInterface(Components.interfaces.nsIDocShell);
var docviewer = docShell.contentViewer.QueryInterface(Components.interfaces.nsIMarkupDocumentViewer);
return docviewer;
}
</script>
</head>
<body>
@ -29,10 +39,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=396367
<input>
<script>document.body.setAttribute('style', 'display: -moz-box; overflow: scroll;');</script>
<script>
//netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
var navigator1 = top.QueryInterface(Components.interfaces.nsIInterfaceRequestor).getInterface(Components.interfaces.nsIWebNavigation);
var docShell = navigator1.QueryInterface(Components.interfaces.nsIDocShell);
var docviewer = docShell.contentViewer.QueryInterface(Components.interfaces.nsIMarkupDocumentViewer);
var docviewer = getdocviewer();
docviewer.textZoom=Math.floor(10*Math.random())/4+0.2;
document.documentElement.offsetHeight;
setTimeout(finish,10);

Просмотреть файл

@ -14,8 +14,18 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=396367
function finish() {
ok(true, "didn't crash");
var docviewer = getdocviewer();
docviewer.textZoom = 1;
SimpleTest.finish();
}
function getdocviewer() {
//netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
var navigator1 = top.QueryInterface(Components.interfaces.nsIInterfaceRequestor).getInterface(Components.interfaces.nsIWebNavigation);
var docShell = navigator1.QueryInterface(Components.interfaces.nsIDocShell);
var docviewer = docShell.contentViewer.QueryInterface(Components.interfaces.nsIMarkupDocumentViewer);
return docviewer;
}
</script>
</head>
<body>
@ -34,10 +44,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=396367
<li style="display: table-cell;">
<script>
//netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
var navigator1 = top.QueryInterface(Components.interfaces.nsIInterfaceRequestor).getInterface(Components.interfaces.nsIWebNavigation);
var docShell = navigator1.QueryInterface(Components.interfaces.nsIDocShell);
var docviewer = docShell.contentViewer.QueryInterface(Components.interfaces.nsIMarkupDocumentViewer);
var docviewer = getdocviewer();
docviewer.textZoom=Math.floor(10*Math.random())/4+0.2;
document.documentElement.offsetHeight;
setTimeout(finish,10);