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

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

Issue 2643473002: [Presentation API] Allow PresentationConnection state change to "Connecting" (Closed)
Patch Set: Address Mark and Bin's comments Created 3 years, 11 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
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/presentation/presentation-close-reconnect.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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('presentation' in navigator); 9 assert_true('presentation' in navigator);
10 assert_true('defaultRequest' in navigator.presentation); 10 assert_true('defaultRequest' in navigator.presentation);
11 11
12 assert_true('PresentationRequest' in window); 12 assert_true('PresentationRequest' in window);
13 }, "Test that the Presentation API is present.") 13 }, "Test that the Presentation API is present.")
14 14
15 test(function() { 15 test(function() {
16 assert_equals(typeof(navigator.presentation), "object"); 16 assert_equals(typeof(navigator.presentation), "object");
17 assert_equals(typeof(navigator.presentation.defaultRequest), "object"); 17 assert_equals(typeof(navigator.presentation.defaultRequest), "object");
18 }, "Test the Presentation API property types."); 18 }, "Test the Presentation API property types.");
19 19
20 test(function() { 20 test(function() {
21 assert_false(navigator.presentation instanceof EventTarget); 21 assert_false(navigator.presentation instanceof EventTarget);
22 }, "Test that navigator.presentation is not an EventTarget."); 22 }, "Test that navigator.presentation is not an EventTarget.");
23 23
24 test(function() { 24 test(function() {
25 var request = new PresentationRequest('http://foo.html'); 25 const request = new PresentationRequest('http://foo.html');
26 assert_equals(typeof(request.start), "function"); 26 assert_equals(typeof(request.start), "function");
27 assert_equals(typeof(request.reconnect), "function"); 27 assert_equals(typeof(request.reconnect), "function");
28 assert_equals(typeof(request.getAvailability), "function"); 28 assert_equals(typeof(request.getAvailability), "function");
29 assert_equals(typeof(request.onconnectionavailable), "object"); 29 assert_equals(typeof(request.onconnectionavailable), "object");
30 30
31 assert_true(request instanceof EventTarget); 31 assert_true(request instanceof EventTarget);
32 }, "Test PresentationRequest API types for a single URL."); 32 }, "Test PresentationRequest API types for a single URL.");
33 33
34 test(function() { 34 test(function() {
35 var request = new PresentationRequest(["http://example.com", "cast://google.co m/app_id=deadbeef"]); 35 const request = new PresentationRequest(
36 ["http://example.com", "cast://google.com/app_id=deadbeef"]);
36 assert_equals(typeof(request.start), "function"); 37 assert_equals(typeof(request.start), "function");
37 assert_equals(typeof(request.reconnect), "function"); 38 assert_equals(typeof(request.reconnect), "function");
38 assert_equals(typeof(request.getAvailability), "function"); 39 assert_equals(typeof(request.getAvailability), "function");
39 assert_equals(typeof(request.onconnectionavailable), "object"); 40 assert_equals(typeof(request.onconnectionavailable), "object");
40 41
41 assert_true(request instanceof EventTarget); 42 assert_true(request instanceof EventTarget);
42 }, "Test PresentationRequest API types for multiple URLs."); 43 }, "Test PresentationRequest API types for multiple URLs.");
43 44
44 </script> 45 </script>
45 </body> 46 </body>
46 </html> 47 </html>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/presentation/presentation-close-reconnect.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698