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 "chrome/test/ui/ui_test.h" | 5 #include "chrome/test/ui/ui_test.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/file_util.h" | 8 #include "base/file_util.h" |
9 #include "base/path_service.h" | 9 #include "base/path_service.h" |
10 #include "base/process_util.h" | 10 #include "base/process_util.h" |
11 #include "chrome/browser/ui/browser.h" | 11 #include "chrome/browser/ui/browser.h" |
12 #include "chrome/browser/ui/browser_list.h" | 12 #include "chrome/browser/ui/browser_list.h" |
13 #include "chrome/common/chrome_notification_types.h" | 13 #include "chrome/common/chrome_notification_types.h" |
14 #include "chrome/common/chrome_paths.h" | 14 #include "chrome/common/chrome_paths.h" |
15 #include "chrome/common/chrome_switches.h" | 15 #include "chrome/common/chrome_switches.h" |
16 #include "chrome/test/base/in_process_browser_test.h" | 16 #include "chrome/test/base/in_process_browser_test.h" |
17 #include "chrome/test/base/ui_test_utils.h" | 17 #include "chrome/test/base/ui_test_utils.h" |
18 #include "content/public/browser/navigation_controller.h" | 18 #include "content/public/browser/navigation_controller.h" |
19 #include "content/public/browser/navigation_entry.h" | 19 #include "content/public/browser/navigation_entry.h" |
20 #include "content/public/browser/notification_service.h" | 20 #include "content/public/browser/notification_service.h" |
21 #include "content/public/browser/web_contents.h" | 21 #include "content/public/browser/web_contents.h" |
22 #include "net/base/net_util.h" | 22 #include "net/base/net_util.h" |
23 | 23 |
24 // These tests don't apply to the Mac version; see GetCommandLineForRelaunch | 24 // These tests don't apply to the Mac version; see GetCommandLineForRelaunch |
25 // for details. | 25 // for details. |
26 #if !defined(OS_MACOSX) | 26 #if !defined(OS_MACOSX) |
27 | 27 |
| 28 // These tests hang on the build/try bot but pass locally with chromeos=1 |
| 29 // builds. jam is investigatin |
| 30 #if !defined(OS_CHROMEOS) |
| 31 |
28 class ChromeMainTest : public InProcessBrowserTest { | 32 class ChromeMainTest : public InProcessBrowserTest { |
29 public: | 33 public: |
30 ChromeMainTest() {} | 34 ChromeMainTest() {} |
31 | 35 |
32 void Relaunch(const CommandLine& new_command_line) { | 36 void Relaunch(const CommandLine& new_command_line) { |
33 base::LaunchProcess(new_command_line, base::LaunchOptions(), NULL); | 37 base::LaunchProcess(new_command_line, base::LaunchOptions(), NULL); |
34 } | 38 } |
35 }; | 39 }; |
36 | 40 |
37 // Make sure that the second invocation creates a new window. | 41 // Make sure that the second invocation creates a new window. |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
116 chrome::NOTIFICATION_TAB_ADDED, | 120 chrome::NOTIFICATION_TAB_ADDED, |
117 content::NotificationService::AllSources()); | 121 content::NotificationService::AllSources()); |
118 Relaunch(new_command_line); | 122 Relaunch(new_command_line); |
119 tab_observer.Wait(); | 123 tab_observer.Wait(); |
120 | 124 |
121 // There should be one normal and one incognito window now. | 125 // There should be one normal and one incognito window now. |
122 ASSERT_EQ(2u, BrowserList::size()); | 126 ASSERT_EQ(2u, BrowserList::size()); |
123 ASSERT_EQ(1u, BrowserList::GetBrowserCountForType(profile, true)); | 127 ASSERT_EQ(1u, BrowserList::GetBrowserCountForType(profile, true)); |
124 } | 128 } |
125 | 129 |
| 130 #endif // !OS_CHROMEOS |
| 131 |
126 #endif // !OS_MACOSX | 132 #endif // !OS_MACOSX |
OLD | NEW |