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

Side by Side Diff: blimp/client/feature/navigation_feature_unittest.cc

Issue 1869783005: [Blimp Client] Fixes up URL before sending it to Engine. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 unified diff | Download patch
OLDNEW
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/feature/navigation_feature.h" 5 #include "blimp/client/feature/navigation_feature.h"
6 6
7 #include <memory> 7 #include <memory>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/memory/ptr_util.h" 10 #include "base/memory/ptr_util.h"
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 bool loading = true; 127 bool loading = true;
128 128
129 EXPECT_CALL(delegate1_, OnUrlChanged(_, _)).Times(0); 129 EXPECT_CALL(delegate1_, OnUrlChanged(_, _)).Times(0);
130 EXPECT_CALL(delegate1_, OnTitleChanged(1, title)).Times(1); 130 EXPECT_CALL(delegate1_, OnTitleChanged(1, title)).Times(1);
131 EXPECT_CALL(delegate1_, OnLoadingChanged(1, loading)).Times(1); 131 EXPECT_CALL(delegate1_, OnLoadingChanged(1, loading)).Times(1);
132 SendMockNavigationStateChangedMessage(&feature_, 1, nullptr, &title, 132 SendMockNavigationStateChangedMessage(&feature_, 1, nullptr, &title,
133 &loading); 133 &loading);
134 } 134 }
135 135
136 TEST_F(NavigationFeatureTest, TestNavigateToUrlMessage) { 136 TEST_F(NavigationFeatureTest, TestNavigateToUrlMessage) {
137 std::string text = "text"; 137 std::string text = "http://google.com/";
138 138
139 EXPECT_CALL(*out_processor_, 139 EXPECT_CALL(*out_processor_,
140 MockableProcessMessage(EqualsNavigateToUrlText(1, text), _)) 140 MockableProcessMessage(EqualsNavigateToUrlText(1, text), _))
141 .Times(1); 141 .Times(1);
142 feature_.NavigateToUrlText(1, text); 142 feature_.NavigateToUrlText(1, text);
143 } 143 }
144 144
145 TEST_F(NavigationFeatureTest, TestNavigateForwardMessage) { 145 TEST_F(NavigationFeatureTest, TestNavigateForwardMessage) {
146 EXPECT_CALL(*out_processor_, 146 EXPECT_CALL(*out_processor_,
147 MockableProcessMessage(EqualsNavigateForward(1), _)) 147 MockableProcessMessage(EqualsNavigateForward(1), _))
148 .Times(1); 148 .Times(1);
149 feature_.GoForward(1); 149 feature_.GoForward(1);
150 } 150 }
151 151
152 TEST_F(NavigationFeatureTest, TestNavigateBackMessage) { 152 TEST_F(NavigationFeatureTest, TestNavigateBackMessage) {
153 EXPECT_CALL(*out_processor_, MockableProcessMessage(EqualsNavigateBack(1), _)) 153 EXPECT_CALL(*out_processor_, MockableProcessMessage(EqualsNavigateBack(1), _))
154 .Times(1); 154 .Times(1);
155 feature_.GoBack(1); 155 feature_.GoBack(1);
156 } 156 }
157 157
158 TEST_F(NavigationFeatureTest, TestNavigateReloadMessage) { 158 TEST_F(NavigationFeatureTest, TestNavigateReloadMessage) {
159 EXPECT_CALL(*out_processor_, 159 EXPECT_CALL(*out_processor_,
160 MockableProcessMessage(EqualsNavigateReload(1), _)) 160 MockableProcessMessage(EqualsNavigateReload(1), _))
161 .Times(1); 161 .Times(1);
162 feature_.Reload(1); 162 feature_.Reload(1);
163 } 163 }
164 164
165 } // namespace client 165 } // namespace client
166 } // namespace blimp 166 } // namespace blimp
OLDNEW
« no previous file with comments | « blimp/client/feature/navigation_feature.cc ('k') | blimp/engine/session/blimp_engine_session.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698