| 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/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 "net/base/net_util.h" | 9 #include "net/base/net_util.h" |
| 10 | 10 |
| (...skipping 26 matching lines...) Expand all Loading... |
| 37 EXPECT_EQ(1, window_count); | 37 EXPECT_EQ(1, window_count); |
| 38 | 38 |
| 39 EXPECT_EQ(1, GetTabCount()); | 39 EXPECT_EQ(1, GetTabCount()); |
| 40 } | 40 } |
| 41 | 41 |
| 42 // Make sure that the second invocation creates a new window. | 42 // Make sure that the second invocation creates a new window. |
| 43 TEST_F(ChromeMainTest, SecondLaunch) { | 43 TEST_F(ChromeMainTest, SecondLaunch) { |
| 44 include_testing_id_ = false; | 44 include_testing_id_ = false; |
| 45 use_existing_browser_ = true; | 45 use_existing_browser_ = true; |
| 46 | 46 |
| 47 ASSERT_TRUE(LaunchAnotherBrowserBlockUntilClosed(CommandLine(L""))); | 47 ASSERT_TRUE(LaunchAnotherBrowserBlockUntilClosed( |
| 48 CommandLine(CommandLine::ARGUMENTS_ONLY))); |
| 48 | 49 |
| 49 ASSERT_TRUE(automation()->WaitForWindowCountToBecome(2, action_timeout_ms())); | 50 ASSERT_TRUE(automation()->WaitForWindowCountToBecome(2, action_timeout_ms())); |
| 50 } | 51 } |
| 51 | 52 |
| 52 TEST_F(ChromeMainTest, ReuseBrowserInstanceWhenOpeningFile) { | 53 TEST_F(ChromeMainTest, ReuseBrowserInstanceWhenOpeningFile) { |
| 53 include_testing_id_ = false; | 54 include_testing_id_ = false; |
| 54 use_existing_browser_ = true; | 55 use_existing_browser_ = true; |
| 55 | 56 |
| 56 FilePath test_file = test_data_directory_.AppendASCII("empty.html"); | 57 FilePath test_file = test_data_directory_.AppendASCII("empty.html"); |
| 57 | 58 |
| 58 CommandLine command_line(L""); | 59 CommandLine command_line(CommandLine::ARGUMENTS_ONLY); |
| 59 command_line.AppendLooseValue(test_file.ToWStringHack()); | 60 command_line.AppendLooseValue(test_file.ToWStringHack()); |
| 60 | |
| 61 ASSERT_TRUE(LaunchAnotherBrowserBlockUntilClosed(command_line)); | 61 ASSERT_TRUE(LaunchAnotherBrowserBlockUntilClosed(command_line)); |
| 62 | 62 |
| 63 ASSERT_TRUE(automation()->IsURLDisplayed(net::FilePathToFileURL(test_file))); | 63 ASSERT_TRUE(automation()->IsURLDisplayed(net::FilePathToFileURL(test_file))); |
| 64 } | 64 } |
| OLD | NEW |