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

Unified Diff: blimp/client/core/contents/blimp_navigation_controller_impl_unittest.cc

Issue 2624903006: Remove all blimp client code. (Closed)
Patch Set: Update buildbot configuration Created 3 years, 11 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
Index: blimp/client/core/contents/blimp_navigation_controller_impl_unittest.cc
diff --git a/blimp/client/core/contents/blimp_navigation_controller_impl_unittest.cc b/blimp/client/core/contents/blimp_navigation_controller_impl_unittest.cc
deleted file mode 100644
index dd3d86da7b404c8a0fe980d565cae7ac13d00de2..0000000000000000000000000000000000000000
--- a/blimp/client/core/contents/blimp_navigation_controller_impl_unittest.cc
+++ /dev/null
@@ -1,87 +0,0 @@
-// Copyright 2016 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.
-
-#include "base/message_loop/message_loop.h"
-#include "base/run_loop.h"
-#include "blimp/client/core/contents/blimp_navigation_controller_delegate.h"
-#include "blimp/client/core/contents/blimp_navigation_controller_impl.h"
-#include "blimp/client/core/contents/fake_navigation_feature.h"
-#include "testing/gmock/include/gmock/gmock.h"
-#include "testing/gtest/include/gtest/gtest.h"
-
-using testing::_;
-
-namespace blimp {
-namespace client {
-namespace {
-
-const int kDummyBlimpContentsId = 0;
-const GURL kExampleURL = GURL("https://www.example.com/");
-
-class MockBlimpNavigationControllerDelegate
- : public BlimpNavigationControllerDelegate {
- public:
- MockBlimpNavigationControllerDelegate() = default;
- ~MockBlimpNavigationControllerDelegate() override = default;
-
- MOCK_METHOD0(OnNavigationStateChanged, void());
- MOCK_METHOD1(OnLoadingStateChanged, void(bool loading));
- MOCK_METHOD1(OnPageLoadingStateChanged, void(bool loading));
-
- private:
- DISALLOW_COPY_AND_ASSIGN(MockBlimpNavigationControllerDelegate);
-};
-
-TEST(BlimpNavigationControllerImplTest, BackForwardNavigation) {
- base::MessageLoop loop;
-
- testing::StrictMock<MockBlimpNavigationControllerDelegate> delegate;
- testing::StrictMock<FakeNavigationFeature> feature;
- BlimpNavigationControllerImpl navigation_controller(kDummyBlimpContentsId,
- &delegate, &feature);
- feature.SetDelegate(1, &navigation_controller);
-
- EXPECT_CALL(delegate, OnNavigationStateChanged());
-
- navigation_controller.LoadURL(kExampleURL);
- base::RunLoop().RunUntilIdle();
- EXPECT_EQ(kExampleURL, navigation_controller.GetURL());
-
- EXPECT_CALL(feature, GoBack(_));
- EXPECT_CALL(feature, GoForward(_));
- EXPECT_CALL(feature, Reload(_));
-
- navigation_controller.GoBack();
- navigation_controller.GoForward();
- navigation_controller.Reload();
-
- base::RunLoop().RunUntilIdle();
-}
-
-TEST(BlimpNavigationControllerImplTest, Loading) {
- testing::InSequence s;
- base::MessageLoop loop;
-
- testing::StrictMock<MockBlimpNavigationControllerDelegate> delegate;
- testing::StrictMock<FakeNavigationFeature> feature;
- BlimpNavigationControllerImpl navigation_controller(kDummyBlimpContentsId,
- &delegate, &feature);
- feature.SetDelegate(1, &navigation_controller);
-
- EXPECT_CALL(delegate, OnNavigationStateChanged());
- EXPECT_CALL(delegate, OnLoadingStateChanged(true));
- EXPECT_CALL(delegate, OnNavigationStateChanged());
- EXPECT_CALL(delegate, OnLoadingStateChanged(false));
-
- NavigationFeature::NavigationFeatureDelegate* feature_delegate =
- static_cast<NavigationFeature::NavigationFeatureDelegate*>(
- &navigation_controller);
-
- feature_delegate->OnLoadingChanged(1, true);
- feature_delegate->OnLoadingChanged(1, false);
-}
-
-} // namespace
-} // namespace client
-} // namespace blimp
« no previous file with comments | « blimp/client/core/contents/blimp_navigation_controller_impl.cc ('k') | blimp/client/core/contents/fake_navigation_feature.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698