OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "base/command_line.h" | 5 #include "base/command_line.h" |
6 #include "base/logging.h" | 6 #include "base/logging.h" |
7 #include "chrome/browser/ui/browser.h" | 7 #include "chrome/browser/ui/browser.h" |
8 #include "chrome/browser/ui/browser_commands.h" | 8 #include "chrome/browser/ui/browser_commands.h" |
9 #include "chrome/browser/ui/tabs/tab_strip_model.h" | 9 #include "chrome/browser/ui/tabs/tab_strip_model.h" |
10 #include "chrome/common/chrome_switches.h" | 10 #include "chrome/common/chrome_switches.h" |
(...skipping 24 matching lines...) Expand all Loading... |
35 } | 35 } |
36 | 36 |
37 } // namespace | 37 } // namespace |
38 | 38 |
39 class NewTabUIBrowserTest : public InProcessBrowserTest { | 39 class NewTabUIBrowserTest : public InProcessBrowserTest { |
40 public: | 40 public: |
41 NewTabUIBrowserTest() { | 41 NewTabUIBrowserTest() { |
42 logging::SetLogMessageHandler(&HandleMessage); | 42 logging::SetLogMessageHandler(&HandleMessage); |
43 } | 43 } |
44 | 44 |
45 virtual ~NewTabUIBrowserTest() { | 45 ~NewTabUIBrowserTest() override { logging::SetLogMessageHandler(NULL); } |
46 logging::SetLogMessageHandler(NULL); | |
47 } | |
48 | 46 |
49 virtual void TearDown() override { | 47 void TearDown() override { |
50 InProcessBrowserTest::TearDown(); | 48 InProcessBrowserTest::TearDown(); |
51 ASSERT_FALSE(had_console_errors); | 49 ASSERT_FALSE(had_console_errors); |
52 } | 50 } |
53 }; | 51 }; |
54 | 52 |
55 // TODO(samarth): delete along with rest of NTP4 code. | 53 // TODO(samarth): delete along with rest of NTP4 code. |
56 // #if defined(OS_WIN) | 54 // #if defined(OS_WIN) |
57 // // Flaky on Windows (http://crbug.com/174819) | 55 // // Flaky on Windows (http://crbug.com/174819) |
58 // #define MAYBE_LoadNTPInExistingProcess DISABLED_LoadNTPInExistingProcess | 56 // #define MAYBE_LoadNTPInExistingProcess DISABLED_LoadNTPInExistingProcess |
59 // #else | 57 // #else |
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
177 | 175 |
178 // We don't use ui_test_utils::NavigateToURLWithDisposition because that waits | 176 // We don't use ui_test_utils::NavigateToURLWithDisposition because that waits |
179 // for current loading to stop. | 177 // for current loading to stop. |
180 content::TestNavigationObserver observer( | 178 content::TestNavigationObserver observer( |
181 browser()->tab_strip_model()->GetActiveWebContents()); | 179 browser()->tab_strip_model()->GetActiveWebContents()); |
182 browser()->OpenURL(OpenURLParams( | 180 browser()->OpenURL(OpenURLParams( |
183 GURL("data:text/html,hello world"), Referrer(), CURRENT_TAB, | 181 GURL("data:text/html,hello world"), Referrer(), CURRENT_TAB, |
184 ui::PAGE_TRANSITION_TYPED, false)); | 182 ui::PAGE_TRANSITION_TYPED, false)); |
185 observer.Wait(); | 183 observer.Wait(); |
186 } | 184 } |
OLD | NEW |