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

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

Issue 2491693003: Add tests for PresentationConnectionAvailable constructor. (Closed)
Patch Set: review comments 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/presentation/presentationconnectionavailableevent-ctor-mock.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/presentation/presentationconnectionavailableevent-ctor.html
diff --git a/third_party/WebKit/LayoutTests/presentation/presentationconnectionavailableevent-ctor.html b/third_party/WebKit/LayoutTests/presentation/presentationconnectionavailableevent-ctor.html
new file mode 100644
index 0000000000000000000000000000000000000000..848f53d9a2725a8ec23d2be6ee0f7687ff45554d
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/presentation/presentationconnectionavailableevent-ctor.html
@@ -0,0 +1,30 @@
+<!DOCTYPE html>
+<html>
+<body>
+<script src="../resources/testharness.js"></script>
+<script src="../resources/testharnessreport.js"></script>
+<script>
+
+test(function() {
+ assert_true('PresentationConnectionAvailableEvent' in window);
+}, "Test that the PresentationConnectionAvailableEvent interface is present.")
+
+test(function() {
+ assert_throws(new TypeError, () => {
+ new PresentationConnectionAvailableEvent('connectionavailable')
+ });
+ assert_throws(new TypeError, () => {
+ new PresentationConnectionAvailableEvent('connectionavailable', {})
+ });
+ assert_throws(new TypeError, () => {
+ new PresentationConnectionAvailableEvent('connectionavailable', { connection: null })
+ });
+}, "Test that the PresentationConnectionAvailableEvent ctor requires connection parameter.")
+
+// It is not possible to check that passing a valid constructor works in this
+// test because some mocking is required in order to get a
+// PresentationConnection.
+
+</script>
+</body>
+</html>
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/presentation/presentationconnectionavailableevent-ctor-mock.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698