OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 <stddef.h> | 5 #include <stddef.h> |
6 | 6 |
7 #include "base/gtest_prod_util.h" | 7 #include "base/gtest_prod_util.h" |
8 #include "base/macros.h" | 8 #include "base/macros.h" |
9 #include "base/memory/scoped_vector.h" | 9 #include "base/memory/scoped_vector.h" |
10 #include "base/metrics/field_trial.h" | 10 #include "base/metrics/field_trial.h" |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
75 class FakeWebContentsObserver : public content::WebContentsObserver { | 75 class FakeWebContentsObserver : public content::WebContentsObserver { |
76 public: | 76 public: |
77 explicit FakeWebContentsObserver(content::WebContents* contents) | 77 explicit FakeWebContentsObserver(content::WebContents* contents) |
78 : WebContentsObserver(contents), | 78 : WebContentsObserver(contents), |
79 contents_(contents), | 79 contents_(contents), |
80 url_(contents->GetURL()), | 80 url_(contents->GetURL()), |
81 num_reloads_(0) {} | 81 num_reloads_(0) {} |
82 | 82 |
83 void DidStartNavigationToPendingEntry( | 83 void DidStartNavigationToPendingEntry( |
84 const GURL& url, | 84 const GURL& url, |
85 content::NavigationController::ReloadType reload_type) override { | 85 content::ReloadType reload_type) override { |
86 if (url_ == url) | 86 if (url_ == url) |
87 num_reloads_++; | 87 num_reloads_++; |
88 current_url_ = url; | 88 current_url_ = url; |
89 } | 89 } |
90 | 90 |
91 const GURL& url() const { return url_; } | 91 const GURL& url() const { return url_; } |
92 | 92 |
93 const GURL& current_url() const { return contents_->GetURL(); } | 93 const GURL& current_url() const { return contents_->GetURL(); } |
94 | 94 |
95 int num_reloads() const { | 95 int num_reloads() const { |
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
220 | 220 |
221 browser.reset(NULL); | 221 browser.reset(NULL); |
222 window.reset(NULL); | 222 window.reset(NULL); |
223 EXPECT_FALSE(IsInstantServiceObserver(bic)) | 223 EXPECT_FALSE(IsInstantServiceObserver(bic)) |
224 << "New BrowserInstantController should register as InstantServiceObserver"; | 224 << "New BrowserInstantController should register as InstantServiceObserver"; |
225 } | 225 } |
226 | 226 |
227 } // namespace | 227 } // namespace |
228 | 228 |
229 } // namespace chrome | 229 } // namespace chrome |
OLD | NEW |