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

Unified Diff: third_party/WebKit/LayoutTests/presentation/resources/presentation-service-mock.js

Issue 2655073007: Revert of [Presentation API] Allow PresentationConnection state change to "Connecting" (Closed)
Patch Set: 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 side-by-side diff with in-line comments
Download patch
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();

Powered by Google App Engine
This is Rietveld 408576698