| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/base_paths.h" | 5 #include "base/base_paths.h" |
| 6 #include "base/file_path.h" | 6 #include "base/file_path.h" |
| 7 #include "base/file_util.h" | 7 #include "base/file_util.h" |
| 8 #include "base/path_service.h" | 8 #include "base/path_service.h" |
| 9 #include "base/string_util.h" | 9 #include "base/string_util.h" |
| 10 #include "base/sys_info.h" | 10 #include "base/sys_info.h" |
| (...skipping 30 matching lines...) Expand all Loading... |
| 41 } // namespace | 41 } // namespace |
| 42 | 42 |
| 43 // The browser should quit quickly if it receives a WM_ENDSESSION message | 43 // The browser should quit quickly if it receives a WM_ENDSESSION message |
| 44 // on Windows, or SIGTERM on posix. | 44 // on Windows, or SIGTERM on posix. |
| 45 TEST_F(BrowserTest, SessionEnd) { | 45 TEST_F(BrowserTest, SessionEnd) { |
| 46 FilePath test_file(test_data_directory_); | 46 FilePath test_file(test_data_directory_); |
| 47 test_file = test_file.AppendASCII("title1.html"); | 47 test_file = test_file.AppendASCII("title1.html"); |
| 48 | 48 |
| 49 NavigateToURL(net::FilePathToFileURL(test_file)); | 49 NavigateToURL(net::FilePathToFileURL(test_file)); |
| 50 TerminateBrowser(); | 50 TerminateBrowser(); |
| 51 VerifyCleanExit(); | |
| 52 } | 51 } |
| 53 | 52 |
| 54 // WindowOpenClose is flaky on ChromeOS and fails consistently on linux views. | 53 // WindowOpenClose is flaky on ChromeOS and fails consistently on linux views. |
| 55 // See http://crbug.com/85763. | 54 // See http://crbug.com/85763. |
| 56 #if defined (OS_CHROMEOS) | 55 #if defined (OS_CHROMEOS) |
| 57 #define MAYBE_WindowOpenClose FLAKY_WindowOpenClose | 56 #define MAYBE_WindowOpenClose FLAKY_WindowOpenClose |
| 58 #elif defined(OS_LINUX) && defined(TOOLKIT_VIEWS) | 57 #elif defined(OS_LINUX) && defined(TOOLKIT_VIEWS) |
| 59 #define MAYBE_WindowOpenClose FAILS_WindowOpenClose | 58 #define MAYBE_WindowOpenClose FAILS_WindowOpenClose |
| 60 #else | 59 #else |
| 61 #define MAYBE_WindowOpenClose WindowOpenClose | 60 #define MAYBE_WindowOpenClose WindowOpenClose |
| (...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 244 | 243 |
| 245 // Verify that the window is present. | 244 // Verify that the window is present. |
| 246 scoped_refptr<BrowserProxy> browser(automation()->GetBrowserWindow(0)); | 245 scoped_refptr<BrowserProxy> browser(automation()->GetBrowserWindow(0)); |
| 247 ASSERT_TRUE(browser.get()); | 246 ASSERT_TRUE(browser.get()); |
| 248 | 247 |
| 249 // Verify the browser is in application mode. | 248 // Verify the browser is in application mode. |
| 250 bool is_application; | 249 bool is_application; |
| 251 ASSERT_TRUE(browser->IsApplication(&is_application)); | 250 ASSERT_TRUE(browser->IsApplication(&is_application)); |
| 252 EXPECT_TRUE(is_application); | 251 EXPECT_TRUE(is_application); |
| 253 } | 252 } |
| OLD | NEW |