summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/presentation-api/controlling-ua/startNewPresentation_sandboxing_success-manual.https.html
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 17:32:43 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 17:32:43 +0000
commit6bf0a5cb5034a7e684dcc3500e841785237ce2dd (patch)
treea68f146d7fa01f0134297619fbe7e33db084e0aa /testing/web-platform/tests/presentation-api/controlling-ua/startNewPresentation_sandboxing_success-manual.https.html
parentInitial commit. (diff)
downloadthunderbird-6bf0a5cb5034a7e684dcc3500e841785237ce2dd.tar.xz
thunderbird-6bf0a5cb5034a7e684dcc3500e841785237ce2dd.zip
Adding upstream version 1:115.7.0.upstream/1%115.7.0upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'testing/web-platform/tests/presentation-api/controlling-ua/startNewPresentation_sandboxing_success-manual.https.html')
-rw-r--r--testing/web-platform/tests/presentation-api/controlling-ua/startNewPresentation_sandboxing_success-manual.https.html31
1 files changed, 31 insertions, 0 deletions
diff --git a/testing/web-platform/tests/presentation-api/controlling-ua/startNewPresentation_sandboxing_success-manual.https.html b/testing/web-platform/tests/presentation-api/controlling-ua/startNewPresentation_sandboxing_success-manual.https.html
new file mode 100644
index 0000000000..68e037a5c0
--- /dev/null
+++ b/testing/web-platform/tests/presentation-api/controlling-ua/startNewPresentation_sandboxing_success-manual.https.html
@@ -0,0 +1,31 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>Sandboxing: starting a presentation from a nested context succeeds when allow-presentation is set</title>
+<link rel="author" title="Francois Daoust" href="https://www.w3.org/People/#fd">
+<link rel="help" href="http://w3c.github.io/presentation-api/#dom-presentationrequest-start">
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+
+<iframe id="childFrame" sandbox="allow-scripts allow-presentation" style="display:none" src="support/iframe.html"></iframe>
+<p>Click the button below to start the manual test. If prompted to select a device, please dismiss the dialog box. The test passes if a "PASS" result appears.</p>
+<button id="presentBtn" onclick="startPresentationTest()">Start Presentation Test</button>
+
+<script>
+ setup({explicit_timeout: true});
+
+ var presentBtn = document.getElementById('presentBtn');
+ var childFrame = document.getElementById('childFrame');
+
+ function startPresentationTest() {
+ presentBtn.disabled = true;
+ async_test(function (t) {
+ childFrame.contentWindow.postMessage('start', '*');
+ window.addEventListener('message', t.step_func(function (ev) {
+ assert_equals(ev.data, 'success',
+ 'Presentation could not be started from nested frame.');
+ t.done();
+ }));
+ });
+ }
+</script>
+