Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / presentation / presentationrequest.html
blobb255c3e9003facd4caee89527948ca572d02731b
1 <!DOCTYPE html>
2 <html>
3 <body>
4 <script src="../resources/testharness.js"></script>
5 <script src="../resources/testharnessreport.js"></script>
6 <script src="../resources/gc.js"></script>
7 <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.");
15 t.done();
16 }));
17 }, "Test that the PresentationRequest.start() requires user gesture.")
19 test(function() {
20 navigator.presentation.defaultRequest = new PresentationRequest("http://example.com");
21 navigator.presentation.defaultRequest.onsessionconnect = function() { };
22 gc();
23 assert_not_equals(navigator.presentation.defaultRequest.onsessionconnect, undefined);
24 }, "Test that navigator.presentation.defaultRequest.onsessionconnect isn't reset after gc()");
26 </script>
27 </body>
28 </html>