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 28 matching lines...) Expand all Loading... |
39 EXPECT_EQ(1, GetTabCount()); | 39 EXPECT_EQ(1, GetTabCount()); |
40 } | 40 } |
41 | 41 |
42 #if defined(OS_MACOSX) | 42 #if defined(OS_MACOSX) |
43 // Fails an SQL assertion on Mac: http://crbug.com/45108 | 43 // Fails an SQL assertion on Mac: http://crbug.com/45108 |
44 #define SecondLaunch DISABLED_SecondLaunch | 44 #define SecondLaunch DISABLED_SecondLaunch |
45 #endif | 45 #endif |
46 // Make sure that the second invocation creates a new window. | 46 // Make sure that the second invocation creates a new window. |
47 TEST_F(ChromeMainTest, SecondLaunch) { | 47 TEST_F(ChromeMainTest, SecondLaunch) { |
48 include_testing_id_ = false; | 48 include_testing_id_ = false; |
49 use_existing_browser_ = true; | |
50 | 49 |
51 ASSERT_TRUE(LaunchAnotherBrowserBlockUntilClosed( | 50 ASSERT_TRUE(LaunchAnotherBrowserBlockUntilClosed( |
52 CommandLine(CommandLine::ARGUMENTS_ONLY))); | 51 CommandLine(CommandLine::ARGUMENTS_ONLY))); |
53 | 52 |
54 ASSERT_TRUE(automation()->WaitForWindowCountToBecome(2)); | 53 ASSERT_TRUE(automation()->WaitForWindowCountToBecome(2)); |
55 } | 54 } |
56 | 55 |
57 #if defined(OS_MACOSX) | 56 #if defined(OS_MACOSX) |
58 // Fails an SQL assertion on Mac: http://crbug.com/45108 | 57 // Fails an SQL assertion on Mac: http://crbug.com/45108 |
59 #define ReuseBrowserInstanceWhenOpeningFile \ | 58 #define ReuseBrowserInstanceWhenOpeningFile \ |
60 DISABLED_ReuseBrowserInstanceWhenOpeningFile | 59 DISABLED_ReuseBrowserInstanceWhenOpeningFile |
61 #endif | 60 #endif |
62 TEST_F(ChromeMainTest, ReuseBrowserInstanceWhenOpeningFile) { | 61 TEST_F(ChromeMainTest, ReuseBrowserInstanceWhenOpeningFile) { |
63 include_testing_id_ = false; | 62 include_testing_id_ = false; |
64 use_existing_browser_ = true; | |
65 | 63 |
66 FilePath test_file = test_data_directory_.AppendASCII("empty.html"); | 64 FilePath test_file = test_data_directory_.AppendASCII("empty.html"); |
67 | 65 |
68 CommandLine command_line(CommandLine::ARGUMENTS_ONLY); | 66 CommandLine command_line(CommandLine::ARGUMENTS_ONLY); |
69 command_line.AppendLooseValue(test_file.ToWStringHack()); | 67 command_line.AppendLooseValue(test_file.ToWStringHack()); |
70 ASSERT_TRUE(LaunchAnotherBrowserBlockUntilClosed(command_line)); | 68 ASSERT_TRUE(LaunchAnotherBrowserBlockUntilClosed(command_line)); |
71 | 69 |
72 ASSERT_TRUE(automation()->IsURLDisplayed(net::FilePathToFileURL(test_file))); | 70 ASSERT_TRUE(automation()->IsURLDisplayed(net::FilePathToFileURL(test_file))); |
73 } | 71 } |
OLD | NEW |