Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(665)

Side by Side Diff: third_party/WebKit/LayoutTests/presentation/presentationconnectionavailableevent-ctor.html

Issue 2491693003: Add tests for PresentationConnectionAvailable constructor. (Closed)
Patch Set: Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <html>
3 <body>
4 <script src="../resources/testharness.js"></script>
5 <script src="../resources/testharnessreport.js"></script>
6 <script>
7
8 test(function() {
9 assert_true('PresentationConnectionAvailableEvent' in window);
10 }, "Test that the PresentationConnectionAvailableEvent interface is present.")
11
12 test(function() {
13 assert_throws(new TypeError, () => { new PresentationConnectionAvailableEvent( 'type') });
14 assert_throws(new TypeError, () => { new PresentationConnectionAvailableEvent( 'type', {}) });
15 assert_throws(new TypeError, () => { new PresentationConnectionAvailableEvent( 'type', { connection: null }) });
16 }, "Test that the PresentationConnectionAvailableEvent ctor requires connection parameter.")
17
18 // It is not possible to check that passing a valid constructor works in this
19 // test because some mocking is required in order to get a
20 // PresentationConnection.
21
22 </script>
23 </body>
24 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698