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 "base/command_line.h" | 5 #include "base/command_line.h" |
6 #include "base/file_path.h" | 6 #include "base/file_path.h" |
7 #include "base/utf_string_conversions.h" | 7 #include "base/utf_string_conversions.h" |
8 #include "chrome/browser/browser.h" | |
9 #include "chrome/browser/browser_list.h" | 8 #include "chrome/browser/browser_list.h" |
10 #include "chrome/browser/browser_window.h" | 9 #include "chrome/browser/browser_window.h" |
11 #include "chrome/browser/tab_contents/tab_contents.h" | 10 #include "chrome/browser/tab_contents/tab_contents.h" |
| 11 #include "chrome/browser/ui/browser.h" |
12 #include "chrome/browser/ui/browser_init.h" | 12 #include "chrome/browser/ui/browser_init.h" |
13 #include "chrome/test/in_process_browser_test.h" | 13 #include "chrome/test/in_process_browser_test.h" |
14 #include "testing/gtest/include/gtest/gtest.h" | 14 #include "testing/gtest/include/gtest/gtest.h" |
15 | 15 |
16 namespace { | 16 namespace { |
17 | 17 |
18 class BrowserInitTest : public InProcessBrowserTest { | 18 class BrowserInitTest : public InProcessBrowserTest { |
19 }; | 19 }; |
20 | 20 |
21 class OpenURLsPopupObserver : public BrowserList::Observer { | 21 class OpenURLsPopupObserver : public BrowserList::Observer { |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
54 CommandLine dummy(CommandLine::NO_PROGRAM); | 54 CommandLine dummy(CommandLine::NO_PROGRAM); |
55 BrowserInit::LaunchWithProfile launch(FilePath(), dummy); | 55 BrowserInit::LaunchWithProfile launch(FilePath(), dummy); |
56 // This should create a new window, but re-use the profile from |popup|. If | 56 // This should create a new window, but re-use the profile from |popup|. If |
57 // it used a NULL or invalid profile, it would crash. | 57 // it used a NULL or invalid profile, it would crash. |
58 launch.OpenURLsInBrowser(popup, false, urls); | 58 launch.OpenURLsInBrowser(popup, false, urls); |
59 ASSERT_NE(popup, observer.added_browser_); | 59 ASSERT_NE(popup, observer.added_browser_); |
60 BrowserList::RemoveObserver(&observer); | 60 BrowserList::RemoveObserver(&observer); |
61 } | 61 } |
62 | 62 |
63 } // namespace | 63 } // namespace |
OLD | NEW |