зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1439153 - try to fix ESlint failures, CLOSED TREE, r=bustage
This commit is contained in:
Родитель
de99e4460b
Коммит
5adedd4945
|
@ -6,6 +6,7 @@
|
|||
<body>
|
||||
<div id="host">host</div>
|
||||
<script>
|
||||
"use strict";
|
||||
document.getElementById("host").attachShadow({mode: "closed"});
|
||||
</script>
|
||||
</body>
|
||||
|
|
|
@ -14,7 +14,7 @@ const BASE_URL = `http://localhost:${server.identity.primaryPort}/data`;
|
|||
|
||||
add_task(async function test_contentscript_shadowDOM() {
|
||||
const PREFS = {
|
||||
"dom.webcomponents.shadowdom.enabled": true
|
||||
"dom.webcomponents.shadowdom.enabled": true,
|
||||
};
|
||||
|
||||
// Set prefs to our initial values.
|
||||
|
@ -35,9 +35,9 @@ add_task(async function test_contentscript_shadowDOM() {
|
|||
}
|
||||
|
||||
function contentScript() {
|
||||
var host = document.getElementById("host");
|
||||
let host = document.getElementById("host");
|
||||
browser.test.assertTrue("openOrClosedShadowRoot" in host, "Should have openOrClosedShadowRoot in Element.");
|
||||
var shadowRoot = host.openOrClosedShadowRoot;
|
||||
let shadowRoot = host.openOrClosedShadowRoot;
|
||||
browser.test.assertEq(shadowRoot.mode, "closed", "Should have closed ShadowRoot.");
|
||||
browser.test.sendMessage("contentScript");
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче