зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1680350 [wpt PR 26727] - FontAccess: Fail concurrent font chooser requests, a=testonly
Automatic update from web-platform-tests FontAccess: Fail concurrent font chooser requests This changes the behavior from concurrent font chooser requests all returning the same data from a single chooser invocation to failing a subsequent request. As implemented, the User Activation check will consume the activation, failing any other in-flight requests. Fixed: 1149621 Change-Id: If14e7e12ff52967e8dc49c383a66da94995c9134 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2568931 Commit-Queue: Olivier Yiptong <oyiptong@chromium.org> Auto-Submit: Olivier Yiptong <oyiptong@chromium.org> Reviewed-by: Joshua Bell <jsbell@chromium.org> Cr-Commit-Position: refs/heads/master@{#833129} -- wpt-commits: 6053b17de25520801d0534efbf3f7d200104ece0 wpt-pr: 26727
This commit is contained in:
Родитель
e4f2b928b2
Коммит
55c643d523
|
@ -0,0 +1,24 @@
|
|||
<!doctype html>
|
||||
<title>Local Font Access: Multiple choosers</title>
|
||||
<meta charset=utf-8>
|
||||
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="/resources/testdriver.js"></script>
|
||||
<script src="/resources/testdriver-vendor.js"></script>
|
||||
|
||||
<script>
|
||||
promise_test(async t => {
|
||||
await new Promise(resolve => {
|
||||
window.addEventListener('DOMContentLoaded', resolve);
|
||||
});
|
||||
// Small delay to give chrome's test automation a chance to actually install
|
||||
// itself.
|
||||
await new Promise(resolve => step_timeout(resolve, 100));
|
||||
|
||||
await window.test_driver.bless('show a font chooser.<br>Please select at least one font.');
|
||||
const promise = navigator.fonts.showFontChooser()
|
||||
promise_rejects_dom(t, 'SecurityError', navigator.fonts.showFontChooser());
|
||||
const fonts = await promise;
|
||||
}, 'showFontChooser multiple choosers');
|
||||
</script>
|
Загрузка…
Ссылка в новой задаче