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

Side by Side Diff: chrome/browser/ui/browser_instant_controller_unittest.cc

Issue 2225343002: Navigation: move RestoreType and ReloadType into a separate file (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: [rebase] Created 4 years, 3 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
« no previous file with comments | « chrome/browser/ui/browser_browsertest.cc ('k') | chrome/browser/ui/browser_tabrestore.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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"
11 #include "base/run_loop.h" 11 #include "base/run_loop.h"
12 #include "chrome/browser/chrome_notification_types.h" 12 #include "chrome/browser/chrome_notification_types.h"
13 #include "chrome/browser/search/instant_service.h" 13 #include "chrome/browser/search/instant_service.h"
14 #include "chrome/browser/search/instant_service_observer.h" 14 #include "chrome/browser/search/instant_service_observer.h"
15 #include "chrome/browser/search/instant_unittest_base.h" 15 #include "chrome/browser/search/instant_unittest_base.h"
16 #include "chrome/browser/search/search.h" 16 #include "chrome/browser/search/search.h"
17 #include "chrome/browser/ui/browser_instant_controller.h" 17 #include "chrome/browser/ui/browser_instant_controller.h"
18 #include "chrome/browser/ui/tabs/tab_strip_model.h" 18 #include "chrome/browser/ui/tabs/tab_strip_model.h"
19 #include "chrome/common/url_constants.h" 19 #include "chrome/common/url_constants.h"
20 #include "content/public/browser/navigation_controller.h" 20 #include "content/public/browser/reload_type.h"
21 #include "content/public/browser/render_process_host.h" 21 #include "content/public/browser/render_process_host.h"
22 #include "content/public/browser/web_contents.h" 22 #include "content/public/browser/web_contents.h"
23 #include "content/public/browser/web_contents_observer.h" 23 #include "content/public/browser/web_contents_observer.h"
24 24
25 namespace chrome { 25 namespace chrome {
26 26
27 namespace { 27 namespace {
28 28
29 class BrowserInstantControllerTest : public InstantUnitTestBase { 29 class BrowserInstantControllerTest : public InstantUnitTestBase {
30 public: 30 public:
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
OLDNEW
« no previous file with comments | « chrome/browser/ui/browser_browsertest.cc ('k') | chrome/browser/ui/browser_tabrestore.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698