OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/browser/ui/toolbar/back_forward_menu_model.h" | 5 #include "chrome/browser/ui/toolbar/back_forward_menu_model.h" |
6 | 6 |
7 #include "base/path_service.h" | 7 #include "base/path_service.h" |
8 #include "base/string16.h" | 8 #include "base/string16.h" |
9 #include "base/string_util.h" | 9 #include "base/string_util.h" |
10 #include "base/utf_string_conversions.h" | 10 #include "base/utf_string_conversions.h" |
11 #include "chrome/browser/history/history.h" | 11 #include "chrome/browser/history/history.h" |
12 #include "chrome/browser/profiles/profile_manager.h" | 12 #include "chrome/browser/profiles/profile_manager.h" |
13 #include "chrome/browser/ui/browser.h" | 13 #include "chrome/browser/ui/browser.h" |
| 14 #include "chrome/browser/ui/browser_tabstrip.h" |
14 #include "chrome/common/url_constants.h" | 15 #include "chrome/common/url_constants.h" |
15 #include "chrome/test/base/chrome_render_view_host_test_harness.h" | 16 #include "chrome/test/base/chrome_render_view_host_test_harness.h" |
16 #include "chrome/test/base/testing_profile.h" | 17 #include "chrome/test/base/testing_profile.h" |
17 #include "content/public/browser/navigation_controller.h" | 18 #include "content/public/browser/navigation_controller.h" |
18 #include "content/public/browser/navigation_entry.h" | 19 #include "content/public/browser/navigation_entry.h" |
19 #include "content/public/browser/web_contents.h" | 20 #include "content/public/browser/web_contents.h" |
20 #include "content/public/test/test_browser_thread.h" | 21 #include "content/public/test/test_browser_thread.h" |
21 #include "content/public/test/web_contents_tester.h" | 22 #include "content/public/test/web_contents_tester.h" |
22 #include "testing/gtest/include/gtest/gtest.h" | 23 #include "testing/gtest/include/gtest/gtest.h" |
23 #include "third_party/skia/include/core/SkBitmap.h" | 24 #include "third_party/skia/include/core/SkBitmap.h" |
(...skipping 529 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
553 // Verify we did not get the default favicon. | 554 // Verify we did not get the default favicon. |
554 EXPECT_NE(0, memcmp(default_icon_bitmap.getPixels(), | 555 EXPECT_NE(0, memcmp(default_icon_bitmap.getPixels(), |
555 valid_icon_bitmap.getPixels(), | 556 valid_icon_bitmap.getPixels(), |
556 default_icon_bitmap.getSize())); | 557 default_icon_bitmap.getSize())); |
557 // Verify we did get the expected favicon. | 558 // Verify we did get the expected favicon. |
558 EXPECT_EQ(0, memcmp(new_icon_bitmap.getPixels(), | 559 EXPECT_EQ(0, memcmp(new_icon_bitmap.getPixels(), |
559 valid_icon_bitmap.getPixels(), | 560 valid_icon_bitmap.getPixels(), |
560 new_icon_bitmap.getSize())); | 561 new_icon_bitmap.getSize())); |
561 | 562 |
562 // Make sure the browser deconstructor doesn't have problems. | 563 // Make sure the browser deconstructor doesn't have problems. |
563 browser.CloseAllTabs(); | 564 chrome::CloseAllTabs(&browser); |
564 // This is required to prevent the message loop from hanging. | 565 // This is required to prevent the message loop from hanging. |
565 profile()->DestroyHistoryService(); | 566 profile()->DestroyHistoryService(); |
566 } | 567 } |
OLD | NEW |