Skip to content

Commit

Permalink
Import wpt@2178efcc8f37b35a2f40f5e91f3ec278289e7b04
Browse files Browse the repository at this point in the history
Using wpt-import in Chromium 141a1b9.
With Chromium commits locally applied on WPT:
8ee2fbf "[WPT] Add WPT for BFCache eviction after version change event"
459de11 "[CompositeClipPathAnimations] Fix behavior for custom timing functions"


Note to sheriffs: This CL imports external tests and adds
expectations for those tests; if this CL is large and causes
a few new failures, please fix the failures by adding new
lines to TestExpectations rather than reverting. See:
https://chromium.googlesource.com/chromium/src/+/main/docs/testing/web_platform_tests.md

NOAUTOREVERT=true
R=rubber-stamper@appspot.gserviceaccount.com

No-Export: true
Cq-Include-Trybots: luci.chromium.try:linux-wpt-identity-fyi-rel,linux-wpt-input-fyi-rel,linux-blink-rel
Change-Id: Iecb617434e89faf4a37ec61d5c6c6a70762a967d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4116409
Auto-Submit: WPT Autoroller <wpt-autoroller@chops-service-accounts.iam.gserviceaccount.com>
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#1084956}
  • Loading branch information
Chromium WPT Sync authored and Chromium LUCI CQ committed Dec 19, 2022
1 parent 24d6236 commit e1ffbc3
Show file tree
Hide file tree
Showing 3 changed files with 57 additions and 5 deletions.
Expand Up @@ -557184,7 +557184,7 @@
],
"writing-mode": {
"force-horizontal-tb.html": [
"f867cffa2284293d95d0261eb344691bd417bb98",
"e239cdca5ab1761de3b916d49a119da882b5403f",
[
null,
{}
Expand Down Expand Up @@ -569392,6 +569392,13 @@
}
]
],
"midi-permission.html": [
"1d75e1c883191761b0b678500c1a647cc2136d73",
[
null,
{}
]
],
"non-fully-active.https.html": [
"1c11afa3d94936ce8691a82dda052942f81b1cc2",
[
Expand Down
Expand Up @@ -12,6 +12,10 @@
/* selector defined in mathml-fragments.js */
.element {
writing-mode: vertical-lr;
padding-block-start: 10px;
padding-block-end: 15px;
padding-inline-start: 20px;
padding-inline-end: 25px;
}
</style>
</head>
Expand All @@ -21,7 +25,6 @@
<math class="element"></math>
</div>
<script>
test(function () {
var container = document.getElementById("container");
for (tag in MathMLFragments) {
container.insertAdjacentHTML("beforeend", `<math>${MathMLFragments[tag]}</math>`);
Expand All @@ -32,9 +35,16 @@
Array.from(document.getElementsByClassName("element")).forEach(element => {
var tag = element.tagName;
var style = window.getComputedStyle(element);
assert_equals(style["writing-mode"], "horizontal-tb", `writing-mode on ${tag}`);
}, `writing-mode is forced to horizontal-tb on all MathML elements`);
});
test(function () {
assert_equals(style["writing-mode"], "horizontal-tb");
}, `writing-mode is forced to horizontal-tb on <${tag}> element`);
test(function () {
assert_equals(style["padding-block-start"], style["padding-top"]);
assert_equals(style["padding-block-end"], style["padding-bottom"]);
assert_equals(style["padding-inline-start"], style["padding-left"]);
assert_equals(style["padding-inline-end"], style["padding-right"]);
}, `logical properties interpreted in horizontal-tb on <${tag}> element`);
});
</script>
</body>
</html>
@@ -0,0 +1,35 @@
<!doctype html>
<meta charset=utf-8>
<title>Test WebIDL conversion when querying the "midi" permission</title>
<script src=/resources/testharness.js></script>
<script src=/resources/testharnessreport.js></script>
<div id="log"></div>

<script>
promise_test(async (test) => {
let calledCount = 0;
const status = await navigator.permissions.query({
get name() {
calledCount++;
return "midi";
},
});
assert_true(status instanceof PermissionStatus);
assert_equals(status.name, "midi", `permission's name should be "midi"`);
//
// First call should be from:
//
// Let rootDesc be the object permissionDesc refers to, converted to an
// IDL value of type PermissionDescriptor.
//
// Second from:
//
// Let typedDescriptor be the object permissionDesc refers to,
// converted to an IDL value of rootDesc's name's permission descriptor
// type.
//
// See: https://w3c.github.io/permissions/#query-method
//
assert_equals(calledCount, 2, "midi permission should be converted twice");
}, `querying the "midi" permission requires two WebIDL conversions`);
</script>

0 comments on commit e1ffbc3

Please sign in to comment.