blob: 7550379ad17ee0aebfdebfefc1310da894f10dab (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
/* Check proper media data retrieval in case of iframe */
const TEST_PATH = getRootDirectory(gTestPath).replace(
"chrome://mochitests/content",
// eslint-disable-next-line @microsoft/sdl/no-insecure-url
"http://example.com"
);
add_task(async function test_all_images_mentioned() {
await BrowserTestUtils.withNewTab(
TEST_PATH + "iframes.html",
async function () {
let pageInfo = BrowserPageInfo(
gBrowser.selectedBrowser.currentURI.spec,
"mediaTab"
);
await BrowserTestUtils.waitForEvent(pageInfo, "page-info-init");
let imageTree = pageInfo.document.getElementById("imagetree");
let imageRowsNum = imageTree.view.rowCount;
ok(imageTree, "Image tree is null (media tab is broken)");
Assert.equal(
imageRowsNum,
2,
"Number of media items listed: " + imageRowsNum + ", should be 2"
);
pageInfo.close();
}
);
});
|