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

Side by Side Diff: content/browser/web_contents/navigation_controller_impl_unittest.cc

Issue 12210030: Linux/ChromeOS Chromium style checker cleanup, content/ edition. (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: Created 7 years, 10 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/basictypes.h" 5 #include "base/basictypes.h"
6 #include "base/bind.h" 6 #include "base/bind.h"
7 #include "base/file_util.h" 7 #include "base/file_util.h"
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/path_service.h" 9 #include "base/path_service.h"
10 #include "base/stl_util.h" 10 #include "base/stl_util.h"
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 public: 159 public:
160 explicit TestWebContentsDelegate() : 160 explicit TestWebContentsDelegate() :
161 navigation_state_change_count_(0) {} 161 navigation_state_change_count_(0) {}
162 162
163 int navigation_state_change_count() { 163 int navigation_state_change_count() {
164 return navigation_state_change_count_; 164 return navigation_state_change_count_;
165 } 165 }
166 166
167 // Keep track of whether the tab has notified us of a navigation state change. 167 // Keep track of whether the tab has notified us of a navigation state change.
168 virtual void NavigationStateChanged(const WebContents* source, 168 virtual void NavigationStateChanged(const WebContents* source,
169 unsigned changed_flags) { 169 unsigned changed_flags) OVERRIDE {
170 navigation_state_change_count_++; 170 navigation_state_change_count_++;
171 } 171 }
172 172
173 private: 173 private:
174 // The number of times NavigationStateChanged has been called. 174 // The number of times NavigationStateChanged has been called.
175 int navigation_state_change_count_; 175 int navigation_state_change_count_;
176 }; 176 };
177 177
178 // ----------------------------------------------------------------------------- 178 // -----------------------------------------------------------------------------
179 179
(...skipping 1663 matching lines...) Expand 10 before | Expand all | Expand 10 after
1843 class PrunedListener : public NotificationObserver { 1843 class PrunedListener : public NotificationObserver {
1844 public: 1844 public:
1845 explicit PrunedListener(NavigationControllerImpl* controller) 1845 explicit PrunedListener(NavigationControllerImpl* controller)
1846 : notification_count_(0) { 1846 : notification_count_(0) {
1847 registrar_.Add(this, NOTIFICATION_NAV_LIST_PRUNED, 1847 registrar_.Add(this, NOTIFICATION_NAV_LIST_PRUNED,
1848 Source<NavigationController>(controller)); 1848 Source<NavigationController>(controller));
1849 } 1849 }
1850 1850
1851 virtual void Observe(int type, 1851 virtual void Observe(int type,
1852 const NotificationSource& source, 1852 const NotificationSource& source,
1853 const NotificationDetails& details) { 1853 const NotificationDetails& details) OVERRIDE {
1854 if (type == NOTIFICATION_NAV_LIST_PRUNED) { 1854 if (type == NOTIFICATION_NAV_LIST_PRUNED) {
1855 notification_count_++; 1855 notification_count_++;
1856 details_ = *(Details<PrunedDetails>(details).ptr()); 1856 details_ = *(Details<PrunedDetails>(details).ptr());
1857 } 1857 }
1858 } 1858 }
1859 1859
1860 // Number of times NAV_LIST_PRUNED has been observed. 1860 // Number of times NAV_LIST_PRUNED has been observed.
1861 int notification_count_; 1861 int notification_count_;
1862 1862
1863 // Details from the last NAV_LIST_PRUNED. 1863 // Details from the last NAV_LIST_PRUNED.
(...skipping 1418 matching lines...) Expand 10 before | Expand all | Expand 10 after
3282 PAGE_TRANSITION_LINK); 3282 PAGE_TRANSITION_LINK);
3283 session_helper_.AssertNavigationEquals(nav, 3283 session_helper_.AssertNavigationEquals(nav,
3284 windows_[0]->tabs[0]->navigations[0]); 3284 windows_[0]->tabs[0]->navigations[0]);
3285 nav.set_url(url2); 3285 nav.set_url(url2);
3286 session_helper_.AssertNavigationEquals(nav, 3286 session_helper_.AssertNavigationEquals(nav,
3287 windows_[0]->tabs[0]->navigations[1]); 3287 windows_[0]->tabs[0]->navigations[1]);
3288 } 3288 }
3289 */ 3289 */
3290 3290
3291 } // namespace content 3291 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/tracing/tracing_ui.cc ('k') | content/browser/web_contents/web_contents_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698