Index: third_party/WebKit/LayoutTests/media/mediasession/mojo/resources/mediasessionservice-mock.js |
diff --git a/third_party/WebKit/LayoutTests/media/mediasession/mojo/resources/mediasessionservice-mock.js b/third_party/WebKit/LayoutTests/media/mediasession/mojo/resources/mediasessionservice-mock.js |
index 833db371d64361a2c46db7508c08f616902aad6b..da5c96a6b5857f6334cafa13fc40e200bb31c9dc 100644 |
--- a/third_party/WebKit/LayoutTests/media/mediasession/mojo/resources/mediasessionservice-mock.js |
+++ b/third_party/WebKit/LayoutTests/media/mediasession/mojo/resources/mediasessionservice-mock.js |
@@ -66,6 +66,34 @@ let mediaSessionServiceMock = loadMojoModules( |
setMetadataCallback(callback) { |
this.metadataCallback_ = callback; |
} |
+ |
+ enableAction(action) { |
+ if (!!this.enableDisableActionCallback_) |
+ this.enableDisableActionCallback_(action, true); |
+ } |
+ |
+ disableAction(action) { |
+ if (!!this.enableDisableActionCallback_) |
+ this.enableDisableActionCallback_(action, false); |
+ } |
+ |
+ setEnableDisableActionCallback(callback) { |
+ this.enableDisableActionCallback_ = callback; |
+ } |
+ |
+ setClient(client) { |
+ this.client_ = client; |
+ if (!!this.clientCallback_) |
+ this.clientCallback_(); |
+ } |
+ |
+ setClientCallback(callback) { |
+ this.clientCallback_ = callback; |
+ } |
+ |
+ getClient() { |
+ return this.client_; |
+ } |
} |
return new MediaSessionServiceMock(mojo.frameInterfaces); |