| Index: third_party/WebKit/LayoutTests/presentation/presentation-onreceiverconnection.html
|
| diff --git a/third_party/WebKit/LayoutTests/presentation/presentation-onreceiverconnection.html b/third_party/WebKit/LayoutTests/presentation/presentation-onreceiverconnection.html
|
| index b7f550a9b016586af14c4091a2598c89b0e2d2bd..f018fb2efa4775b8e96d3336e002a7d95c524bf0 100644
|
| --- a/third_party/WebKit/LayoutTests/presentation/presentation-onreceiverconnection.html
|
| +++ b/third_party/WebKit/LayoutTests/presentation/presentation-onreceiverconnection.html
|
| @@ -12,22 +12,19 @@ async_test(t => {
|
| t.add_cleanup(_ => { internals.settings.setPresentationReceiver(false); });
|
|
|
| presentationServiceMock.then(mockService => {
|
| - // Invoke mockService.setClient().
|
| - const receiver = navigator.presentation.receiver;
|
| + const url = 'http://example.com/a.html';
|
| + const id = 'fakeSessionId';
|
|
|
| - // Make sure it is invoked after calling setClient().
|
| - setTimeout(() => {
|
| - const url = 'http://example.com/a.html';
|
| - const id = 'fakeSessionId';
|
| + mockService.onSetClient = () => {
|
| mockService.onReceiverConnectionAvailable(url, id);
|
| + };
|
|
|
| - receiver.connectionList.then(
|
| - t.step_func_done(list => {
|
| - assert_equals(list.connections.length, 1);
|
| - assert_equals(list.connections[0].url, url);
|
| - assert_equals(list.connections[0].id, id);
|
| + navigator.presentation.receiver.connectionList.then(
|
| + t.step_func_done(list => {
|
| + assert_equals(list.connections.length, 1);
|
| + assert_equals(list.connections[0].url, url);
|
| + assert_equals(list.connections[0].id, id);
|
| }));
|
| - });
|
| });
|
| }, "Test presentation.receiver.connectionList resolves with incoming connection.");
|
|
|
|
|