| OLD | NEW |
| 1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2009 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 "app/message_box_flags.h" |
| 5 #include "base/file_util.h" | 6 #include "base/file_util.h" |
| 6 #include "base/platform_thread.h" | 7 #include "base/platform_thread.h" |
| 7 #include "chrome/browser/automation/url_request_mock_http_job.h" | 8 #include "chrome/browser/automation/url_request_mock_http_job.h" |
| 8 #include "chrome/common/chrome_switches.h" | 9 #include "chrome/common/chrome_switches.h" |
| 9 #include "chrome/common/message_box_flags.h" | |
| 10 #include "chrome/test/automation/browser_proxy.h" | 10 #include "chrome/test/automation/browser_proxy.h" |
| 11 #include "chrome/test/automation/tab_proxy.h" | 11 #include "chrome/test/automation/tab_proxy.h" |
| 12 #include "chrome/test/ui/ui_test.h" | 12 #include "chrome/test/ui/ui_test.h" |
| 13 #include "net/url_request/url_request_unittest.h" | 13 #include "net/url_request/url_request_unittest.h" |
| 14 | 14 |
| 15 const std::string NOLISTENERS_HTML = | 15 const std::string NOLISTENERS_HTML = |
| 16 "<html><head><title>nolisteners</title></head><body></body></html>"; | 16 "<html><head><title>nolisteners</title></head><body></body></html>"; |
| 17 | 17 |
| 18 const std::string UNLOAD_HTML = | 18 const std::string UNLOAD_HTML = |
| 19 "<html><head><title>unload</title></head><body>" | 19 "<html><head><title>unload</title></head><body>" |
| (...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 363 EXPECT_EQ(1, main_tab_count); | 363 EXPECT_EQ(1, main_tab_count); |
| 364 scoped_ptr<TabProxy> main_tab(main_browser_proxy->GetActiveTab()); | 364 scoped_ptr<TabProxy> main_tab(main_browser_proxy->GetActiveTab()); |
| 365 std::wstring main_title; | 365 std::wstring main_title; |
| 366 ASSERT_TRUE(main_tab.get() != NULL); | 366 ASSERT_TRUE(main_tab.get() != NULL); |
| 367 EXPECT_TRUE(main_tab->GetTabTitle(&main_title)); | 367 EXPECT_TRUE(main_tab->GetTabTitle(&main_title)); |
| 368 EXPECT_EQ(std::wstring(L"only_one_unload"), main_title); | 368 EXPECT_EQ(std::wstring(L"only_one_unload"), main_title); |
| 369 } | 369 } |
| 370 | 370 |
| 371 // TODO(ojan): Add tests for unload/beforeunload that have multiple tabs | 371 // TODO(ojan): Add tests for unload/beforeunload that have multiple tabs |
| 372 // and multiple windows. | 372 // and multiple windows. |
| OLD | NEW |