| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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/common/chrome_constants.h" | 5 #include "chrome/common/chrome_constants.h" |
| 6 #include "chrome/test/ui/ui_test.h" | 6 #include "chrome/test/ui/ui_test.h" |
| 7 | 7 |
| 8 typedef UITest ChromeMainTest; | 8 typedef UITest ChromeMainTest; |
| 9 | 9 |
| 10 // Launch the app, then close the app. | 10 // Launch the app, then close the app. |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 // Make sure that the testing interface is there and giving reasonable answers. | 24 // Make sure that the testing interface is there and giving reasonable answers. |
| 25 TEST_F(ChromeMainTest, AppTestingInterface) { | 25 TEST_F(ChromeMainTest, AppTestingInterface) { |
| 26 int window_count = 0; | 26 int window_count = 0; |
| 27 EXPECT_TRUE(automation()->GetBrowserWindowCount(&window_count)); | 27 EXPECT_TRUE(automation()->GetBrowserWindowCount(&window_count)); |
| 28 EXPECT_EQ(1, window_count); | 28 EXPECT_EQ(1, window_count); |
| 29 | 29 |
| 30 EXPECT_EQ(1, GetTabCount()); | 30 EXPECT_EQ(1, GetTabCount()); |
| 31 } | 31 } |
| 32 | 32 |
| 33 // Make sure that the second invocation creates a new window. | 33 // Make sure that the second invocation creates a new window. |
| 34 TEST_F(ChromeMainTest, DISABLED_SecondLaunch) { | 34 TEST_F(ChromeMainTest, SecondLaunch) { |
| 35 include_testing_id_ = false; | 35 include_testing_id_ = false; |
| 36 use_existing_browser_ = true; | 36 use_existing_browser_ = true; |
| 37 | 37 |
| 38 LaunchBrowser(CommandLine(L""), false); | 38 LaunchBrowser(CommandLine(L""), false); |
| 39 | 39 |
| 40 int window_count; | 40 int window_count; |
| 41 ASSERT_TRUE(automation()->WaitForWindowCountToChange(1, &window_count, | 41 ASSERT_TRUE(automation()->WaitForWindowCountToChange(1, &window_count, |
| 42 action_timeout_ms())); | 42 action_timeout_ms())); |
| 43 ASSERT_EQ(2, window_count); | 43 ASSERT_EQ(2, window_count); |
| 44 } | 44 } |
| 45 | 45 |
| OLD | NEW |