| 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 "app/message_box_flags.h" |
| 6 #include "base/file_util.h" | 6 #include "base/file_util.h" |
| 7 #include "base/platform_thread.h" | 7 #include "base/platform_thread.h" |
| 8 #include "chrome/browser/net/url_request_mock_http_job.h" | 8 #include "chrome/browser/net/url_request_mock_http_job.h" |
| 9 #include "chrome/browser/view_ids.h" | 9 #include "chrome/browser/ui/view_ids.h" |
| 10 #include "chrome/common/chrome_switches.h" | 10 #include "chrome/common/chrome_switches.h" |
| 11 #include "chrome/test/automation/browser_proxy.h" | 11 #include "chrome/test/automation/browser_proxy.h" |
| 12 #include "chrome/test/automation/tab_proxy.h" | 12 #include "chrome/test/automation/tab_proxy.h" |
| 13 #include "chrome/test/automation/window_proxy.h" | 13 #include "chrome/test/automation/window_proxy.h" |
| 14 #include "chrome/test/ui/ui_test.h" | 14 #include "chrome/test/ui/ui_test.h" |
| 15 #include "net/url_request/url_request_unittest.h" | 15 #include "net/url_request/url_request_unittest.h" |
| 16 #include "views/event.h" | 16 #include "views/event.h" |
| 17 | 17 |
| 18 const std::string NOLISTENERS_HTML = | 18 const std::string NOLISTENERS_HTML = |
| 19 "<html><head><title>nolisteners</title></head><body></body></html>"; | 19 "<html><head><title>nolisteners</title></head><body></body></html>"; |
| (...skipping 430 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 450 ASSERT_TRUE(browser->WaitForTabCountToBecome(1)); | 450 ASSERT_TRUE(browser->WaitForTabCountToBecome(1)); |
| 451 scoped_refptr<TabProxy> main_tab(browser->GetActiveTab()); | 451 scoped_refptr<TabProxy> main_tab(browser->GetActiveTab()); |
| 452 ASSERT_TRUE(main_tab.get()); | 452 ASSERT_TRUE(main_tab.get()); |
| 453 std::wstring main_title; | 453 std::wstring main_title; |
| 454 EXPECT_TRUE(main_tab->GetTabTitle(&main_title)); | 454 EXPECT_TRUE(main_tab->GetTabTitle(&main_title)); |
| 455 EXPECT_EQ(std::wstring(L"only_one_unload"), main_title); | 455 EXPECT_EQ(std::wstring(L"only_one_unload"), main_title); |
| 456 } | 456 } |
| 457 | 457 |
| 458 // TODO(ojan): Add tests for unload/beforeunload that have multiple tabs | 458 // TODO(ojan): Add tests for unload/beforeunload that have multiple tabs |
| 459 // and multiple windows. | 459 // and multiple windows. |
| OLD | NEW |