1
0
Fork 0
firefox/testing/web-platform/tests/ai/language_detection/availability-detached-crash.https.html
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

20 lines
733 B
HTML

<!DOCTYPE html>
<title>Assures no crash upon call of LanguageDetector.availability() on a detached document</title>
<link rel="author" href="mailto:christinesm@chromium.org">
<link rel="help" href="https://issues.chromium.org/issues/384233287">
<script src="/resources/testdriver.js"></script>
<script src="/resources/testdriver-vendor.js"></script>
<body>
<iframe src="about:blank"></iframe>
<script>
const iframe = frames[0];
await test_driver.bless('Create LanguageDetector', null, iframe);
const factory = iframe.LanguageDetector;
const detectorPromise = await factory.create();
document.getElementsByTagName("iframe")[0].remove();
factory.availability();
detectorPromise.then(detector => detector.detect());
</script>
</body>