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

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

Issue 2265363002: [Presentation API] make PresentationReceiver API consistent with latest spec (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: resolve code review comments from haraken Created 4 years, 4 months 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
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html> 2 <html>
3 <body> 3 <body>
4 <script src="../resources/testharness.js"></script> 4 <script src="../resources/testharness.js"></script>
5 <script src="../resources/testharnessreport.js"></script> 5 <script src="../resources/testharnessreport.js"></script>
6 <script> 6 <script>
7 7
8 test(function() { 8 test(function() {
9 assert_true('receiver' in navigator.presentation); 9 assert_true('receiver' in navigator.presentation);
10 assert_true('getConnection' in navigator.presentation.receiver); 10 assert_true('connectionList' in navigator.presentation.receiver);
11 assert_true('getConnections' in navigator.presentation.receiver);
12 assert_true('onconnectionavailable' in navigator.presentation.receiver);
13
14 assert_true('PresentationReceiver' in window);
15 }, "Test that the Presentation Receiver API is present.") 11 }, "Test that the Presentation Receiver API is present.")
16 12
17 test(function() { 13 test(function() {
18 assert_equals(typeof(navigator.presentation.receiver), "object"); 14 assert_equals(typeof(navigator.presentation.receiver), "object");
19 assert_equals(typeof(navigator.presentation.receiver.getConnection), "function "); 15 assert_equals(typeof(navigator.presentation.receiver.connectionList), "object" );
mlamouri (slow - plz ping) 2016/08/23 13:04:50 Shouldn't you test the connectionList object?
zhaobin 2016/08/23 20:43:53 Yes. connectionList is a promise and hasn't been i
20 assert_equals(typeof(navigator.presentation.receiver.getConnections), "functio n");
21 assert_equals(typeof(navigator.presentation.receiver.onconnectionavailable), " object");
22 }, "Test the Presentation Receiver API property types."); 16 }, "Test the Presentation Receiver API property types.");
23 17
24 test(function() {
25 assert_true(navigator.presentation.receiver instanceof EventTarget);
26 }, "Test that navigator.presentation.receiver is an EventTarget.");
27
28 </script> 18 </script>
29 </body> 19 </body>
30 </html> 20 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698