| Index: third_party/WebKit/LayoutTests/presentation/presentationconnectionavailableevent-ctor-mock.html
|
| diff --git a/third_party/WebKit/LayoutTests/presentation/presentationconnectionavailableevent-ctor-mock.html b/third_party/WebKit/LayoutTests/presentation/presentationconnectionavailableevent-ctor-mock.html
|
| index a9fc9430506dcffda53431778149e3977e613a72..85b752dd7921a02eece7b5f54efb9f16e7e951b8 100644
|
| --- a/third_party/WebKit/LayoutTests/presentation/presentationconnectionavailableevent-ctor-mock.html
|
| +++ b/third_party/WebKit/LayoutTests/presentation/presentationconnectionavailableevent-ctor-mock.html
|
| @@ -8,24 +8,9 @@
|
| <button>click me</button>
|
| <script>
|
|
|
| -function waitForClick(callback) {
|
| - var button = document.querySelector('button');
|
| - button.addEventListener('click', callback, { once: true });
|
| -
|
| - if (!('eventSender' in window))
|
| - return;
|
| -
|
| - var boundingRect = button.getBoundingClientRect();
|
| - var x = boundingRect.left + boundingRect.width / 2;
|
| - var y = boundingRect.top + boundingRect.height / 2;
|
| -
|
| - eventSender.mouseMoveTo(x, y);
|
| - eventSender.mouseDown();
|
| - eventSender.mouseUp();
|
| -}
|
| -
|
| async_test(t => {
|
| presentationServiceMock.then(t.step_func(mockService => {
|
| + var button = document.querySelector('button');
|
| // This is receiving the user gesture and runs the callback.
|
| waitForClick(t.step_func(_ => {
|
| new PresentationRequest('https://example.com').start().then(
|
| @@ -35,7 +20,7 @@ async_test(t => {
|
| assert_not_equals(e, null);
|
| assert_equals(e.connection, result);
|
| }));
|
| - }));
|
| + }), button);
|
| }));
|
| }, "Test that the PresentationConnectionAvailableEvent ctor can take a valid PresentationConnection.")
|
|
|
|
|