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

Unified Diff: ios/web/webui/mojo_facade_unittest.mm

Issue 2847743003: Eliminate InterfaceRegistry (Closed)
Patch Set: . Created 3 years, 8 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
« no previous file with comments | « ios/web/web_state/web_state_impl.mm ('k') | ios/web/webui/web_ui_mojo_inttest.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/web/webui/mojo_facade_unittest.mm
diff --git a/ios/web/webui/mojo_facade_unittest.mm b/ios/web/webui/mojo_facade_unittest.mm
index cf7e5125bff2e7623299bd2eba2ac4a90990a2d9..27f6289235f29b62fcdf4e256dc7b87b532ec80c 100644
--- a/ios/web/webui/mojo_facade_unittest.mm
+++ b/ios/web/webui/mojo_facade_unittest.mm
@@ -12,11 +12,12 @@
#import "base/test/ios/wait_util.h"
#include "ios/web/public/test/web_test.h"
#import "ios/web/public/web_state/js/crw_js_injection_evaluator.h"
+#include "ios/web/public/web_state/web_state_interface_provider.h"
#include "ios/web/test/mojo_test.mojom.h"
+#include "ios/web/web_state/web_state_impl.h"
#include "mojo/public/cpp/bindings/binding_set.h"
#include "services/service_manager/public/cpp/identity.h"
#include "services/service_manager/public/cpp/interface_factory.h"
-#include "services/service_manager/public/cpp/interface_registry.h"
#import "testing/gtest_mac.h"
#import "third_party/ocmock/OCMock/OCMock.h"
@@ -61,13 +62,12 @@ class TestUIHandlerFactory
class MojoFacadeTest : public WebTest {
protected:
MojoFacadeTest() {
- interface_registry_.reset(
- new service_manager::InterfaceRegistry(std::string()));
- interface_registry_->AddInterface(&ui_handler_factory_);
+ interface_provider_ = base::MakeUnique<WebStateInterfaceProvider>();
+ interface_provider_->registry()->AddInterface(&ui_handler_factory_);
evaluator_.reset([[OCMockObject
mockForProtocol:@protocol(CRWJSInjectionEvaluator)] retain]);
facade_.reset(new MojoFacade(
- interface_registry_.get(),
+ interface_provider_.get(),
static_cast<id<CRWJSInjectionEvaluator>>(evaluator_.get())));
}
@@ -76,7 +76,7 @@ class MojoFacadeTest : public WebTest {
private:
TestUIHandlerFactory ui_handler_factory_;
- std::unique_ptr<service_manager::InterfaceRegistry> interface_registry_;
+ std::unique_ptr<WebStateInterfaceProvider> interface_provider_;
base::scoped_nsobject<OCMockObject> evaluator_;
std::unique_ptr<MojoFacade> facade_;
};
« no previous file with comments | « ios/web/web_state/web_state_impl.mm ('k') | ios/web/webui/web_ui_mojo_inttest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698