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

Side by Side Diff: chrome/browser/ui/search/instant_page_unittest.cc

Issue 137993020: (Try 2) InstantExtended: remove dead code related to the non-cacheable NTP. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Disable InstantPolicyTests Created 6 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
« no previous file with comments | « chrome/browser/ui/search/instant_page.cc ('k') | chrome/browser/ui/search/instant_test_utils.h » ('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 "chrome/browser/ui/search/instant_page.h" 5 #include "chrome/browser/ui/search/instant_page.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "chrome/browser/ui/search/search_tab_helper.h" 9 #include "chrome/browser/ui/search/search_tab_helper.h"
10 #include "chrome/common/chrome_switches.h" 10 #include "chrome/common/chrome_switches.h"
(...skipping 25 matching lines...) Expand all
36 void(const content::WebContents* contents)); 36 void(const content::WebContents* contents));
37 MOCK_METHOD2(InstantPageAboutToNavigateMainFrame, 37 MOCK_METHOD2(InstantPageAboutToNavigateMainFrame,
38 void(const content::WebContents* contents, 38 void(const content::WebContents* contents,
39 const GURL& url)); 39 const GURL& url));
40 MOCK_METHOD5(NavigateToURL, 40 MOCK_METHOD5(NavigateToURL,
41 void(const content::WebContents* contents, 41 void(const content::WebContents* contents,
42 const GURL& url, 42 const GURL& url,
43 content::PageTransition transition, 43 content::PageTransition transition,
44 WindowOpenDisposition disposition, 44 WindowOpenDisposition disposition,
45 bool is_search_type)); 45 bool is_search_type));
46 MOCK_METHOD1(InstantPageLoadFailed, void(content::WebContents* contents));
47 }; 46 };
48 47
49 } // namespace 48 } // namespace
50 49
51 class InstantPageTest : public ChromeRenderViewHostTestHarness { 50 class InstantPageTest : public ChromeRenderViewHostTestHarness {
52 public: 51 public:
53 virtual void SetUp() OVERRIDE; 52 virtual void SetUp() OVERRIDE;
54 53
55 bool MessageWasSent(uint32 id) { 54 bool MessageWasSent(uint32 id) {
56 return process()->sink().GetFirstMessageMatching(id) != NULL; 55 return process()->sink().GetFirstMessageMatching(id) != NULL;
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 EXPECT_TRUE(MessageWasSent(ChromeViewMsg_SearchBoxMarginChange::ID)); 164 EXPECT_TRUE(MessageWasSent(ChromeViewMsg_SearchBoxMarginChange::ID));
166 165
167 // Incognito pages should not get any others. 166 // Incognito pages should not get any others.
168 page->sender()->FocusChanged( 167 page->sender()->FocusChanged(
169 OMNIBOX_FOCUS_NONE, OMNIBOX_FOCUS_CHANGE_EXPLICIT); 168 OMNIBOX_FOCUS_NONE, OMNIBOX_FOCUS_CHANGE_EXPLICIT);
170 EXPECT_FALSE(MessageWasSent(ChromeViewMsg_SearchBoxFocusChanged::ID)); 169 EXPECT_FALSE(MessageWasSent(ChromeViewMsg_SearchBoxFocusChanged::ID));
171 170
172 page->sender()->SetInputInProgress(false); 171 page->sender()->SetInputInProgress(false);
173 EXPECT_FALSE(MessageWasSent(ChromeViewMsg_SearchBoxSetInputInProgress::ID)); 172 EXPECT_FALSE(MessageWasSent(ChromeViewMsg_SearchBoxSetInputInProgress::ID));
174 } 173 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/search/instant_page.cc ('k') | chrome/browser/ui/search/instant_test_utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698