Skip to content

Commit

Permalink
[mojo] Add testing support to BrowserInterfaceBrokerProxy
Browse files Browse the repository at this point in the history
This change adds a SetBinderForTesting() method to
BrowserInterfaceBrokerProxy and modifies MojoInterfaceInterceptor to
call this new method if a script passes a new "useBrowserInterfaceBroker"
parameter.
Also converts IdleManager to use BrowserInterfaceBrokerProxy as a use
case for overriding interface handlers in web tests.

Bug: 985118
Change-Id: I8dc3fc1c4beb2ae375a2534b03cd890ce1e3b52c
  • Loading branch information
Oksana Zhuravlova authored and chromium-wpt-export-bot committed Aug 16, 2019
1 parent a669334 commit e7c91b1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion idle-detection/mock.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ function intercept() {
let result = new FakeIdleMonitor();

let binding = new mojo.Binding(blink.mojom.IdleManager, result);
let interceptor = new MojoInterfaceInterceptor(blink.mojom.IdleManager.name);
let interceptor = new MojoInterfaceInterceptor(blink.mojom.IdleManager.name, "context", true);
interceptor.oninterfacerequest = (e) => {
binding.bind(e.handle);
}
Expand Down

0 comments on commit e7c91b1

Please sign in to comment.