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

Side by Side Diff: chrome/browser/tab_contents/navigation_controller_unittest.cc

Issue 6369003: New extension API: "tab.socketAddress" (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 9 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 "base/file_util.h" 5 #include "base/file_util.h"
6 #include "base/path_service.h" 6 #include "base/path_service.h"
7 #include "base/scoped_ptr.h" 7 #include "base/scoped_ptr.h"
8 #include "base/stl_util-inl.h" 8 #include "base/stl_util-inl.h"
9 #include "base/string_util.h" 9 #include "base/string_util.h"
10 #include "base/utf_string_conversions.h" 10 #include "base/utf_string_conversions.h"
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 184
185 rvh()->SendNavigate(0, url1); 185 rvh()->SendNavigate(0, url1);
186 EXPECT_TRUE(notifications.Check1AndReset( 186 EXPECT_TRUE(notifications.Check1AndReset(
187 NotificationType::NAV_ENTRY_COMMITTED)); 187 NotificationType::NAV_ENTRY_COMMITTED));
188 188
189 // The load should now be committed. 189 // The load should now be committed.
190 EXPECT_EQ(controller().entry_count(), 1); 190 EXPECT_EQ(controller().entry_count(), 1);
191 EXPECT_EQ(controller().last_committed_entry_index(), 0); 191 EXPECT_EQ(controller().last_committed_entry_index(), 0);
192 EXPECT_EQ(controller().pending_entry_index(), -1); 192 EXPECT_EQ(controller().pending_entry_index(), -1);
193 EXPECT_TRUE(controller().GetLastCommittedEntry()); 193 EXPECT_TRUE(controller().GetLastCommittedEntry());
194 EXPECT_EQ("[2001:db8::1]:80",
195 controller().GetLastCommittedEntry()->socket_address());
194 EXPECT_FALSE(controller().pending_entry()); 196 EXPECT_FALSE(controller().pending_entry());
195 EXPECT_FALSE(controller().CanGoBack()); 197 EXPECT_FALSE(controller().CanGoBack());
196 EXPECT_FALSE(controller().CanGoForward()); 198 EXPECT_FALSE(controller().CanGoForward());
197 EXPECT_EQ(contents()->GetMaxPageID(), 0); 199 EXPECT_EQ(contents()->GetMaxPageID(), 0);
198 200
199 // Load another... 201 // Load another...
200 controller().LoadURL(url2, GURL(), PageTransition::TYPED); 202 controller().LoadURL(url2, GURL(), PageTransition::TYPED);
201 203
202 // The load should now be pending. 204 // The load should now be pending.
203 EXPECT_EQ(controller().entry_count(), 1); 205 EXPECT_EQ(controller().entry_count(), 1);
(...skipping 1821 matching lines...) Expand 10 before | Expand all | Expand 10 after
2025 PageTransition::LINK); 2027 PageTransition::LINK);
2026 session_helper_.AssertNavigationEquals(nav, 2028 session_helper_.AssertNavigationEquals(nav,
2027 windows_[0]->tabs[0]->navigations[0]); 2029 windows_[0]->tabs[0]->navigations[0]);
2028 nav.set_url(url2); 2030 nav.set_url(url2);
2029 session_helper_.AssertNavigationEquals(nav, 2031 session_helper_.AssertNavigationEquals(nav,
2030 windows_[0]->tabs[0]->navigations[1]); 2032 windows_[0]->tabs[0]->navigations[1]);
2031 } 2033 }
2032 */ 2034 */
2033 2035
2034 } // namespace 2036 } // namespace
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698