6 gBrowser.selectedTab = gBrowser.addTab();
8 gBrowser.selectedBrowser.addEventListener(
"load",
function () {
9 gBrowser.selectedBrowser.removeEventListener(
"load",
arguments.callee,
true);
11 var
doc = gBrowser.contentDocument;
12 var testImg = doc.getElementById(
"test-image");
15 pageInfo.addEventListener(
"load",
function () {
16 pageInfo.onFinished.push(
function () {
17 executeSoon(
function () {
18 var pageInfoImg = pageInfo.document.getElementById(
"thepreviewimage");
20 is(pageInfoImg.src, testImg.src,
"selected image has the correct source");
21 is(pageInfoImg.width, testImg.width,
"selected image has the correct width");
22 is(pageInfoImg.height, testImg.height,
"selected image has the correct height");
25 gBrowser.removeCurrentTab();
34 "<style type='text/css'>#test-image,#not-test-image {background-image: url('about:logo?c');}</style>" +
35 "<img src='about:logo?b' height=300 width=350 alt=2 id='not-test-image'>" +
36 "<img src='about:logo?b' height=300 width=350 alt=2>" +
37 "<img src='about:logo?a' height=200 width=250>" +
38 "<img src='about:logo?b' height=200 width=250 alt=1>" +
39 "<img src='about:logo?b' height=100 width=150 alt=2 id='test-image'>";
function doc() browser.contentDocument
function BrowserPageInfo(doc, initialTab, imageElement)
return!aWindow arguments!aWindow arguments[0]