Commit a1b49bd8 authored by Michael Hansen's avatar Michael Hansen Committed by Chromium LUCI CQ

[Nearby] Update FakeReceiveManager to match mojo definition.

This just updates the return value of registerForegroundReceiveSurface()
to return an enum. The result is not currently used in any tests, but
this change brings FakeReceiveManager inline with the mojo definition.

Fixed: 1159672
Change-Id: I3e9e8925f7dd497e5590b75e4cdf308c4fb88838
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2601645Reviewed-by: default avatarKyle Horimoto <khorimoto@chromium.org>
Commit-Queue: Michael Hansen <hansenmichael@google.com>
Cr-Commit-Position: refs/heads/master@{#839044}
parent 74b799da
......@@ -78,7 +78,8 @@ cr.define('nearby_share', function() {
}
/**
* @return {!Promise<{success: !boolean}>}
* @return {!Promise<{result:
* !nearbyShare.mojom.RegisterReceiveSurfaceResult}>}
*/
async registerForegroundReceiveSurface() {
this.inHighVisibility_ = true;
......@@ -86,7 +87,10 @@ cr.define('nearby_share', function() {
this.observer_.onHighVisibilityChanged(this.inHighVisibility_);
}
this.methodCalled('registerForegroundReceiveSurface');
return {success: this.nextResult_};
const result = this.nextResult_ ?
nearbyShare.mojom.RegisterReceiveSurfaceResult.kSuccess :
nearbyShare.mojom.RegisterReceiveSurfaceResult.kFailure;
return {result: result};
}
/**
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment