summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/css/css-scoping
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-12 05:43:14 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-12 05:43:14 +0000
commit8dd16259287f58f9273002717ec4d27e97127719 (patch)
tree3863e62a53829a84037444beab3abd4ed9dfc7d0 /testing/web-platform/tests/css/css-scoping
parentReleasing progress-linux version 126.0.1-1~progress7.99u1. (diff)
downloadfirefox-8dd16259287f58f9273002717ec4d27e97127719.tar.xz
firefox-8dd16259287f58f9273002717ec4d27e97127719.zip
Merging upstream version 127.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'testing/web-platform/tests/css/css-scoping')
-rw-r--r--testing/web-platform/tests/css/css-scoping/font-face-001.html4
-rw-r--r--testing/web-platform/tests/css/css-scoping/font-face-002.html4
-rw-r--r--testing/web-platform/tests/css/css-scoping/font-face-003.html3
-rw-r--r--testing/web-platform/tests/css/css-scoping/font-face-004.html3
-rw-r--r--testing/web-platform/tests/css/css-scoping/font-face-005.html4
-rw-r--r--testing/web-platform/tests/css/css-scoping/font-face-006.html2
-rw-r--r--testing/web-platform/tests/css/css-scoping/font-face-007.html4
-rw-r--r--testing/web-platform/tests/css/css-scoping/font-face-008.html4
-rw-r--r--testing/web-platform/tests/css/css-scoping/font-face-009.html4
9 files changed, 23 insertions, 9 deletions
diff --git a/testing/web-platform/tests/css/css-scoping/font-face-001.html b/testing/web-platform/tests/css/css-scoping/font-face-001.html
index 7e47d18cba..4496786449 100644
--- a/testing/web-platform/tests/css/css-scoping/font-face-001.html
+++ b/testing/web-platform/tests/css/css-scoping/font-face-001.html
@@ -12,7 +12,7 @@
</style>
<div id="host"><span id="in-document">1234567890</span></div>
<script>
-test(function() {
+promise_test(async () => {
host.attachShadow({ mode: "open" }).innerHTML = `
<style>
@font-face {
@@ -27,6 +27,8 @@ test(function() {
<span id="in-shadow">0123456789</span>
`;
+ await document.fonts.ready;
+
assert_not_equals(document.getElementById('in-document').offsetWidth, 160);
assert_equals(host.shadowRoot.getElementById('in-shadow').offsetWidth, 160);
}, "@font-face applies in the shadow tree")
diff --git a/testing/web-platform/tests/css/css-scoping/font-face-002.html b/testing/web-platform/tests/css/css-scoping/font-face-002.html
index 2e3272c44f..3a20d0b808 100644
--- a/testing/web-platform/tests/css/css-scoping/font-face-002.html
+++ b/testing/web-platform/tests/css/css-scoping/font-face-002.html
@@ -13,7 +13,7 @@
</style>
<div id="host"><span id="in-document">1234567890</span></div>
<script>
-test(function() {
+promise_test(async () => {
host.attachShadow({ mode: "open" }).innerHTML = `
<style>
#in-shadow {
@@ -24,6 +24,8 @@ test(function() {
<span id="in-shadow">0123456789</span>
`;
+ await document.fonts.ready;
+
assert_not_equals(document.getElementById('in-document').offsetWidth, 160);
assert_equals(host.shadowRoot.getElementById('in-shadow').offsetWidth, 160);
}, "@font-face from the document applies in the shadow tree");
diff --git a/testing/web-platform/tests/css/css-scoping/font-face-003.html b/testing/web-platform/tests/css/css-scoping/font-face-003.html
index d3f83e4ec3..4e8d8ff482 100644
--- a/testing/web-platform/tests/css/css-scoping/font-face-003.html
+++ b/testing/web-platform/tests/css/css-scoping/font-face-003.html
@@ -13,7 +13,7 @@
</style>
<div id="host"><span id="in-document">1234567890</span></div>
<script>
-test(function() {
+ promise_test(async function () {
host.attachShadow({ mode: "open" }).innerHTML = `
<style>
:host {
@@ -24,6 +24,7 @@ test(function() {
<span id="in-shadow">0123456789</span>
`;
+ await document.fonts.ready;
assert_equals(document.getElementById('in-document').offsetWidth, 160);
assert_equals(host.shadowRoot.getElementById('in-shadow').offsetWidth, 160);
}, "@font-face from document applies to :host");
diff --git a/testing/web-platform/tests/css/css-scoping/font-face-004.html b/testing/web-platform/tests/css/css-scoping/font-face-004.html
index 6ac50bd432..f68e70994f 100644
--- a/testing/web-platform/tests/css/css-scoping/font-face-004.html
+++ b/testing/web-platform/tests/css/css-scoping/font-face-004.html
@@ -14,7 +14,7 @@
</style>
<div id="host"><span id="in-document">1234567890</span></div>
<script>
-test(function() {
+promise_test(async function() {
host.attachShadow({ mode: "open" }).innerHTML = `
<style>
::slotted(#in-document) {
@@ -25,6 +25,7 @@ test(function() {
<span id="in-shadow">0123456789</span>
`;
+ await document.fonts.ready;
assert_equals(document.getElementById('in-document').offsetWidth, 160);
assert_not_equals(host.shadowRoot.getElementById('in-shadow').offsetWidth, 160);
}, "@font-face from document applies to a slotted element");
diff --git a/testing/web-platform/tests/css/css-scoping/font-face-005.html b/testing/web-platform/tests/css/css-scoping/font-face-005.html
index fdf86fb56e..de102f253e 100644
--- a/testing/web-platform/tests/css/css-scoping/font-face-005.html
+++ b/testing/web-platform/tests/css/css-scoping/font-face-005.html
@@ -12,7 +12,7 @@
</style>
<div id="host"><span id="in-document">1234567890</span></div>
<script>
-test(function() {
+promise_test(async () => {
host.attachShadow({ mode: "open" }).innerHTML = `
<style>
@font-face {
@@ -27,6 +27,8 @@ test(function() {
<span id="in-shadow">0123456789</span>
`;
+ await document.fonts.ready;
+
assert_not_equals(document.getElementById('in-document').offsetWidth, 160);
assert_equals(host.shadowRoot.getElementById('in-shadow').offsetWidth, 160);
}, "@font-face should not leak out of shadow tree.");
diff --git a/testing/web-platform/tests/css/css-scoping/font-face-006.html b/testing/web-platform/tests/css/css-scoping/font-face-006.html
index 8c6e341713..e72d4ec2aa 100644
--- a/testing/web-platform/tests/css/css-scoping/font-face-006.html
+++ b/testing/web-platform/tests/css/css-scoping/font-face-006.html
@@ -16,7 +16,7 @@
</style>
<div id="host"></div>
<script>
-promise_test(async function() {
+promise_test(async () => {
host.attachShadow({ mode: "open" }).innerHTML = `
<style>
:host::before, :host::after {
diff --git a/testing/web-platform/tests/css/css-scoping/font-face-007.html b/testing/web-platform/tests/css/css-scoping/font-face-007.html
index ae669f638f..c644a54986 100644
--- a/testing/web-platform/tests/css/css-scoping/font-face-007.html
+++ b/testing/web-platform/tests/css/css-scoping/font-face-007.html
@@ -7,7 +7,7 @@
<div id="host"><span id="in-document">1234567890</span></div>
<script>
-test(function() {
+promise_test(async () => {
host.attachShadow({ mode: "open" }).innerHTML = `
<style>
@font-face {
@@ -22,6 +22,8 @@ test(function() {
<span id="in-shadow">0123456789</span>
`;
+ await document.fonts.ready;
+
assert_equals(document.getElementById('in-document').offsetWidth, 160);
assert_equals(host.shadowRoot.getElementById('in-shadow').offsetWidth, 160);
}, "@font-face from shadow applies to :host");
diff --git a/testing/web-platform/tests/css/css-scoping/font-face-008.html b/testing/web-platform/tests/css/css-scoping/font-face-008.html
index a40b0247d1..52c7869f9f 100644
--- a/testing/web-platform/tests/css/css-scoping/font-face-008.html
+++ b/testing/web-platform/tests/css/css-scoping/font-face-008.html
@@ -8,7 +8,7 @@
<div id="host"><span id="in-document">1234567890</span></div>
<script>
-test(function() {
+promise_test(async () => {
host.attachShadow({ mode: "open" }).innerHTML = `
<style>
@font-face {
@@ -23,6 +23,8 @@ test(function() {
<span id="in-shadow">0123456789</span>
`;
+ await document.fonts.ready;
+
assert_equals(document.getElementById('in-document').offsetWidth, 160);
assert_not_equals(host.shadowRoot.getElementById('in-shadow').offsetWidth, 160);
}, "@font-face from shadow applies to a slotted element");
diff --git a/testing/web-platform/tests/css/css-scoping/font-face-009.html b/testing/web-platform/tests/css/css-scoping/font-face-009.html
index 5d770929ca..4e08162dcd 100644
--- a/testing/web-platform/tests/css/css-scoping/font-face-009.html
+++ b/testing/web-platform/tests/css/css-scoping/font-face-009.html
@@ -12,7 +12,7 @@
</style>
<div id="host"></div>
<script>
-test(function() {
+promise_test(async () => {
host.attachShadow({ mode: "open" }).innerHTML = `
<style>
@font-face {
@@ -27,6 +27,8 @@ test(function() {
<slot></slot>
`;
+ await document.fonts.ready;
+
//shrinkwrapped size for a default font will be a bit more than 80-90
//if the font is applied, it will be a bit more than 160
assert_greater_than(document.getElementById('host').offsetWidth, 160);