4 <script src=
"../resources/testharness.js"></script>
5 <script src=
"../resources/testharnessreport.js"></script>
6 <script src=
"../resources/gc.js"></script>
9 async_test(function(t
) {
10 var request
= new PresentationRequest("http://example.com");
11 request
.start().catch(t
.step_func(function(e
) {
12 assert_true(e
instanceof DOMException
);
13 assert_equals(e
.name
, "InvalidAccessError");
14 assert_equals(e
.message
, "PresentationRequest::start() requires user gesture.");
17 }, "Test that the PresentationRequest.start() requires user gesture.")
20 navigator
.presentation
.defaultRequest
= new PresentationRequest("http://example.com");
21 navigator
.presentation
.defaultRequest
.onsessionconnect = function() { };
23 assert_not_equals(navigator
.presentation
.defaultRequest
.onsessionconnect
, undefined);
24 }, "Test that navigator.presentation.defaultRequest.onsessionconnect isn't reset after gc()");