1
0
Fork 0
firefox/dom/security/test/general/browser_test_clobbered_property.js
Daniel Baumann 5e9a113729
Adding upstream version 140.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
2025-06-25 09:37:52 +02:00

27 lines
685 B
JavaScript

"use strict";
const TEST_PATH =
getRootDirectory(gTestPath).replace(
"chrome://mochitests/content/",
"https://example.com/"
) + "file_clobbered_property.html";
add_task(async function test_clobbered_properties() {
Services.fog.testResetFOG();
const tab = await BrowserTestUtils.openNewForegroundTab(gBrowser, TEST_PATH);
BrowserTestUtils.removeTab(tab);
ok(true, "before wait");
let result = await TestUtils.waitForCondition(() =>
Glean.security.shadowedHtmlDocumentPropertyAccess.testGetValue()
);
is(result.length, 1, "Got one metric");
is(
result[0].extra.name,
"currentScript",
"Clobbering of currentScript was collected"
);
});