OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "blimp/client/session/navigation_feature.h" | 5 #include "blimp/client/session/navigation_feature.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
9 #include "blimp/common/create_blimp_message.h" | 9 #include "blimp/common/create_blimp_message.h" |
10 #include "blimp/common/proto/blimp_message.pb.h" | 10 #include "blimp/common/proto/blimp_message.pb.h" |
11 #include "blimp/net/test_common.h" | 11 #include "blimp/net/test_common.h" |
12 #include "net/base/net_errors.h" | 12 #include "net/base/net_errors.h" |
13 #include "testing/gmock/include/gmock/gmock.h" | 13 #include "testing/gmock/include/gmock/gmock.h" |
14 #include "testing/gtest/include/gtest/gtest.h" | 14 #include "testing/gtest/include/gtest/gtest.h" |
15 #include "third_party/skia/include/core/SkBitmap.h" | 15 #include "third_party/skia/include/core/SkBitmap.h" |
16 #include "url/gurl.h" | 16 #include "url/gurl.h" |
17 | 17 |
18 using testing::_; | 18 using testing::_; |
19 | 19 |
20 namespace blimp { | 20 namespace blimp { |
| 21 namespace client { |
21 | 22 |
22 class MockNavigationFeatureDelegate | 23 class MockNavigationFeatureDelegate |
23 : public NavigationFeature::NavigationFeatureDelegate { | 24 : public NavigationFeature::NavigationFeatureDelegate { |
24 public: | 25 public: |
25 // NavigationFeatureDelegate implementation. | 26 // NavigationFeatureDelegate implementation. |
26 MOCK_METHOD2(OnUrlChanged, void(int tab_id, const GURL& url)); | 27 MOCK_METHOD2(OnUrlChanged, void(int tab_id, const GURL& url)); |
27 MOCK_METHOD2(OnFaviconChanged, void(int tab_id, const SkBitmap& favicon)); | 28 MOCK_METHOD2(OnFaviconChanged, void(int tab_id, const SkBitmap& favicon)); |
28 MOCK_METHOD2(OnTitleChanged, void(int tab_id, const std::string& title)); | 29 MOCK_METHOD2(OnTitleChanged, void(int tab_id, const std::string& title)); |
29 MOCK_METHOD2(OnLoadingChanged, void(int tab_id, bool loading)); | 30 MOCK_METHOD2(OnLoadingChanged, void(int tab_id, bool loading)); |
30 }; | 31 }; |
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
148 feature_.GoBack(1); | 149 feature_.GoBack(1); |
149 } | 150 } |
150 | 151 |
151 TEST_F(NavigationFeatureTest, TestNavigateReloadMessage) { | 152 TEST_F(NavigationFeatureTest, TestNavigateReloadMessage) { |
152 EXPECT_CALL(*out_processor_, | 153 EXPECT_CALL(*out_processor_, |
153 MockableProcessMessage(EqualsNavigateReload(1), _)) | 154 MockableProcessMessage(EqualsNavigateReload(1), _)) |
154 .Times(1); | 155 .Times(1); |
155 feature_.Reload(1); | 156 feature_.Reload(1); |
156 } | 157 } |
157 | 158 |
| 159 } // namespace client |
158 } // namespace blimp | 160 } // namespace blimp |
OLD | NEW |