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

Side by Side Diff: chrome/browser/dom_ui/dom_ui_unittest.cc

Issue 3053015: Revert bookmark bar promo CL, r52993... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years, 5 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/browser.cc ('k') | chrome/browser/dom_ui/new_tab_ui.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 (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 "chrome/browser/dom_ui/new_tab_ui.h" 5 #include "chrome/browser/dom_ui/new_tab_ui.h"
6 #include "chrome/browser/renderer_host/test/test_render_view_host.h" 6 #include "chrome/browser/renderer_host/test/test_render_view_host.h"
7 #include "chrome/common/url_constants.h" 7 #include "chrome/common/url_constants.h"
8 #include "testing/gtest/include/gtest/gtest.h" 8 #include "testing/gtest/include/gtest/gtest.h"
9 9
10 class DOMUITest : public RenderViewHostTestHarness { 10 class DOMUITest : public RenderViewHostTestHarness {
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 private: 77 private:
78 ChromeThread ui_thread_; 78 ChromeThread ui_thread_;
79 79
80 DISALLOW_COPY_AND_ASSIGN(DOMUITest); 80 DISALLOW_COPY_AND_ASSIGN(DOMUITest);
81 }; 81 };
82 82
83 // Tests that the New Tab Page flags are correctly set and propogated by 83 // Tests that the New Tab Page flags are correctly set and propogated by
84 // TabContents when we first navigate to a DOM UI page, then to a standard 84 // TabContents when we first navigate to a DOM UI page, then to a standard
85 // non-DOM-UI page. 85 // non-DOM-UI page.
86 TEST_F(DOMUITest, DOMUIToStandard) { 86 TEST_F(DOMUITest, DOMUIToStandard) {
87 profile_->CreateBookmarkModel(true);
88 DoNavigationTest(contents(), 1); 87 DoNavigationTest(contents(), 1);
89 88
90 // Test the case where we're not doing the initial navigation. This is 89 // Test the case where we're not doing the initial navigation. This is
91 // slightly different than the very-first-navigation case since the 90 // slightly different than the very-first-navigation case since the
92 // SiteInstance will be the same (the original TabContents must still be 91 // SiteInstance will be the same (the original TabContents must still be
93 // alive), which will trigger different behavior in RenderViewHostManager. 92 // alive), which will trigger different behavior in RenderViewHostManager.
94 TestTabContents contents2(profile_.get(), NULL); 93 TestTabContents contents2(profile_.get(), NULL);
95 94
96 DoNavigationTest(&contents2, 101); 95 DoNavigationTest(&contents2, 101);
97 } 96 }
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 185
187 // Navigate forward. Shouldn't focus the location bar. 186 // Navigate forward. Shouldn't focus the location bar.
188 focus_called = tc->focus_called(); 187 focus_called = tc->focus_called();
189 ASSERT_TRUE(controller().CanGoForward()); 188 ASSERT_TRUE(controller().CanGoForward());
190 controller().GoForward(); 189 controller().GoForward();
191 pending_rvh()->SendNavigate(next_page_id, next_url); 190 pending_rvh()->SendNavigate(next_page_id, next_url);
192 EXPECT_EQ(focus_called, tc->focus_called()); 191 EXPECT_EQ(focus_called, tc->focus_called());
193 192
194 contents_.swap(tc_scoped_ptr); 193 contents_.swap(tc_scoped_ptr);
195 } 194 }
OLDNEW
« no previous file with comments | « chrome/browser/browser.cc ('k') | chrome/browser/dom_ui/new_tab_ui.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698