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

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

Issue 2737413003: [Presentation API] Remove references to presentation sessions. (Closed)
Patch Set: Update PresentationServiceDelegateImpl unittest Created 3 years, 9 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 src="../resources/mojo-helpers.js"></script> 6 <script src="../resources/mojo-helpers.js"></script>
7 <script src="resources/presentation-service-mock.js"></script> 7 <script src="resources/presentation-service-mock.js"></script>
8 <script> 8 <script>
9 9
10 async_test(t => { 10 async_test(t => {
11 internals.settings.setPresentationReceiver(true); 11 internals.settings.setPresentationReceiver(true);
12 t.add_cleanup(_ => { internals.settings.setPresentationReceiver(false); }); 12 t.add_cleanup(_ => { internals.settings.setPresentationReceiver(false); });
13 13
14 presentationServiceMock.then(mockService => { 14 presentationServiceMock.then(mockService => {
15 const url = 'http://example.com/a.html'; 15 const url = 'http://example.com/a.html';
16 const id = 'fakeSessionId'; 16 const id = 'fakePresentationId';
17 17
18 mockService.onSetClient = () => { 18 mockService.onSetClient = () => {
19 mockService.onReceiverConnectionAvailable(url, id); 19 mockService.onReceiverConnectionAvailable(url, id);
20 }; 20 };
21 21
22 navigator.presentation.receiver.connectionList.then( 22 navigator.presentation.receiver.connectionList.then(
23 t.step_func_done(list => { 23 t.step_func_done(list => {
24 assert_equals(list.connections.length, 1); 24 assert_equals(list.connections.length, 1);
25 assert_equals(list.connections[0].url, url); 25 assert_equals(list.connections[0].url, url);
26 assert_equals(list.connections[0].id, id); 26 assert_equals(list.connections[0].id, id);
27 })); 27 }));
28 }); 28 });
29 }, "Test presentation.receiver.connectionList resolves with incoming connection. "); 29 }, "Test presentation.receiver.connectionList resolves with incoming connection. ");
30 30
31 </script> 31 </script>
32 </body> 32 </body>
33 </html> 33 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698