Bug 825527 - Part 1: Look through an Xray wrapper at our images in tests so that we always see the QueryInterface method on them; r=bzbarsky

This commit is contained in:
Ehsan Akhgari 2013-01-02 21:26:43 -05:00
Родитель e2bc56a552
Коммит 87bbd55993
2 изменённых файлов: 2 добавлений и 2 удалений

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

@ -36,7 +36,7 @@ function getImageStatus(id)
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
// Get the image
var img = document.getElementById(id);
var img = SpecialPowers.wrap(document.getElementById(id));
// QI the image to nsImageLoadingContent
img.QueryInterface(SpecialPowers.Ci.nsIImageLoadingContent);

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

@ -22,7 +22,7 @@ SimpleTest.waitForExplicitFinish();
window.onload = function() {
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
var img = document.getElementsByTagName("img")[0];
var img = SpecialPowers.wrap(document.getElementsByTagName("img")[0]);
var container = img
.QueryInterface(Components.interfaces.nsIImageLoadingContent)
.getRequest(Components.interfaces.nsIImageLoadingContent.CURRENT_REQUEST)