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

Unified Diff: ios/clean/chrome/browser/ui/find_in_page/find_in_page_mediator_unittest.mm

Issue 2812133004: Unit test FindInPageMediator. (Closed)
Patch Set: Rebased 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/clean/chrome/browser/ui/find_in_page/find_in_page_mediator.mm ('k') | ios/clean/chrome/test/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/clean/chrome/browser/ui/find_in_page/find_in_page_mediator_unittest.mm
diff --git a/ios/clean/chrome/browser/ui/find_in_page/find_in_page_mediator_unittest.mm b/ios/clean/chrome/browser/ui/find_in_page/find_in_page_mediator_unittest.mm
new file mode 100644
index 0000000000000000000000000000000000000000..a147a2bb4c75ea88765338b4fdbb0445a2379d5a
--- /dev/null
+++ b/ios/clean/chrome/browser/ui/find_in_page/find_in_page_mediator_unittest.mm
@@ -0,0 +1,42 @@
+// Copyright 2017 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#import "ios/clean/chrome/browser/ui/find_in_page/find_in_page_mediator.h"
+
+#include "base/memory/ptr_util.h"
+#include "ios/chrome/browser/web_state_list/fake_web_state_list_delegate.h"
+#include "ios/chrome/browser/web_state_list/web_state_list.h"
+#include "testing/gtest/include/gtest/gtest.h"
+#include "testing/platform_test.h"
+#import "third_party/ocmock/OCMock/OCMock.h"
+
+#if !defined(__has_feature) || !__has_feature(objc_arc)
+#error "This file requires ARC support."
+#endif
+
+namespace {
+
+class FindInPageMediatorTest : public PlatformTest {
+ public:
+ FindInPageMediatorTest() {
+ web_state_list_ = base::MakeUnique<WebStateList>(&web_state_list_delegate_);
+ provider_ = [OCMockObject
+ niceMockForProtocol:@protocol(FindInPageConsumerProvider)];
+ }
+
+ protected:
+ std::unique_ptr<WebStateList> web_state_list_;
+ FakeWebStateListDelegate web_state_list_delegate_;
+ id provider_;
+};
+
+} // namespace
+
+TEST_F(FindInPageMediatorTest, Init) {
+ FindInPageMediator* mediator =
+ [[FindInPageMediator alloc] initWithWebStateList:web_state_list_.get()
+ provider:provider_
+ dispatcher:nil];
+ [mediator self];
+}
« no previous file with comments | « ios/clean/chrome/browser/ui/find_in_page/find_in_page_mediator.mm ('k') | ios/clean/chrome/test/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698