| Index: third_party/WebKit/LayoutTests/presentation/resources/presentation-service-mock.js
|
| diff --git a/third_party/WebKit/LayoutTests/presentation/resources/presentation-service-mock.js b/third_party/WebKit/LayoutTests/presentation/resources/presentation-service-mock.js
|
| index eee573bdd50411abd5d3bfece1382dd3f850e1b0..3db3d1ea3ca4bddcb83bb9f1701627cd94f5f5a6 100644
|
| --- a/third_party/WebKit/LayoutTests/presentation/resources/presentation-service-mock.js
|
| +++ b/third_party/WebKit/LayoutTests/presentation/resources/presentation-service-mock.js
|
| @@ -4,12 +4,13 @@
|
|
|
| "use strict";
|
|
|
| -const presentationServiceMock =
|
| - loadMojoModules('presentationServiceMock', [
|
| +let presentationServiceMock = loadMojoModules(
|
| + 'presentationServiceMock',
|
| + [
|
| 'third_party/WebKit/public/platform/modules/presentation/presentation.mojom',
|
| 'mojo/public/js/bindings',
|
| ]).then(mojo => {
|
| - const [presentationService, bindings] = mojo.modules;
|
| + let [ presentationService, bindings ] = mojo.modules;
|
|
|
| class PresentationServiceMock {
|
| constructor(interfaceProvider) {
|
| @@ -21,8 +22,6 @@
|
| this.bindingSet_ = new bindings.BindingSet(
|
| presentationService.PresentationService);
|
| }
|
| -
|
| - setClient(client) { this.client_ = client; }
|
|
|
| startSession(urls) {
|
| return Promise.resolve({
|
| @@ -37,12 +36,6 @@
|
| error: null,
|
| });
|
| }
|
| -
|
| - closeConnection(url, id) {
|
| - this.client_.onConnectionClosed(
|
| - {url: url, id: id},
|
| - presentationService.PresentationConnectionCloseReason.CLOSED, '');
|
| - }
|
| }
|
|
|
| return new PresentationServiceMock(mojo.frameInterfaces);
|
| @@ -54,9 +47,9 @@
|
| if (!('eventSender' in window))
|
| return;
|
|
|
| - const boundingRect = button.getBoundingClientRect();
|
| - const x = boundingRect.left + boundingRect.width / 2;
|
| - const y = boundingRect.top + boundingRect.height / 2;
|
| + var boundingRect = button.getBoundingClientRect();
|
| + var x = boundingRect.left + boundingRect.width / 2;
|
| + var y = boundingRect.top + boundingRect.height / 2;
|
|
|
| eventSender.mouseMoveTo(x, y);
|
| eventSender.mouseDown();
|
|
|