| OLD | NEW |
| 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/chrome_thread.h" |
| 5 #include "chrome/browser/dom_ui/new_tab_ui.h" | 6 #include "chrome/browser/dom_ui/new_tab_ui.h" |
| 6 #include "chrome/browser/renderer_host/test/test_render_view_host.h" | 7 #include "chrome/browser/renderer_host/test/test_render_view_host.h" |
| 7 #include "chrome/common/url_constants.h" | 8 #include "chrome/common/url_constants.h" |
| 8 #include "testing/gtest/include/gtest/gtest.h" | 9 #include "testing/gtest/include/gtest/gtest.h" |
| 9 | 10 |
| 10 class DOMUITest : public RenderViewHostTestHarness { | 11 class DOMUITest : public RenderViewHostTestHarness { |
| 11 public: | 12 public: |
| 12 DOMUITest() : ui_thread_(ChromeThread::UI, MessageLoop::current()) {} | 13 DOMUITest() : ui_thread_(ChromeThread::UI, MessageLoop::current()) {} |
| 13 | 14 |
| 14 // Tests navigating with a DOM UI from a fresh (nothing pending or committed) | 15 // Tests navigating with a DOM UI from a fresh (nothing pending or committed) |
| (...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 185 | 186 |
| 186 // Navigate forward. Shouldn't focus the location bar. | 187 // Navigate forward. Shouldn't focus the location bar. |
| 187 focus_called = tc->focus_called(); | 188 focus_called = tc->focus_called(); |
| 188 ASSERT_TRUE(controller().CanGoForward()); | 189 ASSERT_TRUE(controller().CanGoForward()); |
| 189 controller().GoForward(); | 190 controller().GoForward(); |
| 190 pending_rvh()->SendNavigate(next_page_id, next_url); | 191 pending_rvh()->SendNavigate(next_page_id, next_url); |
| 191 EXPECT_EQ(focus_called, tc->focus_called()); | 192 EXPECT_EQ(focus_called, tc->focus_called()); |
| 192 | 193 |
| 193 contents_.swap(tc_scoped_ptr); | 194 contents_.swap(tc_scoped_ptr); |
| 194 } | 195 } |
| OLD | NEW |