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

Unified Diff: ios/web/test/crw_fake_web_controller_observer_unittest.mm

Issue 2567303003: [ios] Removed unused CRWWebControllerObserver methods. (Closed)
Patch Set: Self review Created 4 years 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
Index: ios/web/test/crw_fake_web_controller_observer_unittest.mm
diff --git a/ios/web/test/crw_fake_web_controller_observer_unittest.mm b/ios/web/test/crw_fake_web_controller_observer_unittest.mm
deleted file mode 100644
index 3777cb325773c35ded37482a79d39cf069a325b4..0000000000000000000000000000000000000000
--- a/ios/web/test/crw_fake_web_controller_observer_unittest.mm
+++ /dev/null
@@ -1,54 +0,0 @@
-// Copyright 2014 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/web/test/crw_fake_web_controller_observer.h"
-
-#import "base/mac/scoped_nsobject.h"
-#include "base/memory/scoped_vector.h"
-#include "base/values.h"
-#include "testing/gtest/include/gtest/gtest.h"
-#include "testing/gtest_mac.h"
-#include "testing/platform_test.h"
-#include "url/gurl.h"
-
-namespace web {
-namespace {
-class CRWFakeWebControllerObserverTest : public PlatformTest {
- public:
- void SetUp() override {
- fake_web_controller_observer_.reset([[CRWFakeWebControllerObserver alloc]
- initWithCommandPrefix:@"test"]);
- }
- protected:
- base::scoped_nsobject<CRWFakeWebControllerObserver>
- fake_web_controller_observer_;
-};
-
-// Tests that a CRWFakeWebControllerObserver can be correctly initialized with
-// a command prefix.
-TEST_F(CRWFakeWebControllerObserverTest, CommandPrefix) {
- EXPECT_NSEQ(@"test", [fake_web_controller_observer_ commandPrefix]);
-}
-
-// Tests that the CRWFakeWebControllerObserver correctly stores a command
-// received.
-TEST_F(CRWFakeWebControllerObserverTest, Command) {
- // Arbitrary values.
- base::DictionaryValue command;
- command.SetBoolean("samp", true);
- [fake_web_controller_observer_ handleCommand:command
- webController:nil
- userIsInteracting:NO
- originURL:GURL("http://google.com")];
-
- ScopedVector<base::DictionaryValue>& commands_received =
- [fake_web_controller_observer_ commandsReceived];
- EXPECT_EQ(1U, commands_received.size());
- bool samp = false;
- commands_received[0]->GetBoolean("samp", &samp);
- EXPECT_TRUE(samp);
-}
-
-} // namespace
-} // namespace web
« no previous file with comments | « ios/web/test/crw_fake_web_controller_observer.mm ('k') | ios/web/web_state/ui/crw_web_controller_observer_unittest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698