Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>Calling "getAvailability" with an a priori unauthenticated URL in an HTTPS context throws a SecurityError exception.</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-getavailability">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script>
function getAvailability() {
var request = new PresentationRequest('http://example.org/presentation.html');
return request.getAvailability();
}

promise_test(function (t) {
return promise_rejects(t, 'SecurityError', getAvailability());
});
</script>

Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>Calling "reconnect" with an a priori unauthenticated URL in an HTTPS context throws a SecurityError exception.</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-reconnect">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script>
function reconnectToPresentation() {
var request = new PresentationRequest('http://example.org/presentation.html');
return request.reconnect('someid');
}

promise_test(function (t) {
return promise_rejects(t, 'SecurityError', reconnectToPresentation());
});
</script>

Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>Calling "start" with an a priori unauthenticated URL in an HTTPS context throws a SecurityError exception.</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>

<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");

function startPresentation() {
var request = new PresentationRequest('http://example.org/presentation.html');
return request.start();
};

function startPresentationTest() {
presentBtn.disabled = true;
promise_test(function (t) {
return promise_rejects(t, 'SecurityError', startPresentation());
});
}
</script>

Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>Calling "start" with a set of URLs containing an a priori unauthenticated URL in an HTTPS context throws a SecurityError exception.</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>

<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");

function startPresentation() {
var request = new PresentationRequest([
'presentation.html',
'http://example.org/presentation.html'
]);
return request.start();
};

function startPresentationTest() {
presentBtn.disabled = true;
promise_test(function (t) {
return promise_rejects(t, 'SecurityError', startPresentation());
});
}
</script>