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 "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/string_util.h" | 8 #include "base/string_util.h" |
9 #include "base/utf_string_conversions.h" | 9 #include "base/utf_string_conversions.h" |
10 #include "chrome/browser/history/history.h" | 10 #include "chrome/browser/history/history.h" |
11 #include "chrome/browser/profiles/profile_manager.h" | 11 #include "chrome/browser/profiles/profile_manager.h" |
12 #include "chrome/browser/ui/browser.h" | 12 #include "chrome/browser/ui/browser.h" |
13 #include "chrome/common/url_constants.h" | 13 #include "chrome/common/url_constants.h" |
14 #include "chrome/test/base/chrome_render_view_host_test_harness.h" | 14 #include "chrome/test/base/chrome_render_view_host_test_harness.h" |
15 #include "chrome/test/base/testing_profile.h" | 15 #include "chrome/test/base/testing_profile.h" |
16 #include "content/browser/tab_contents/navigation_controller.h" | 16 #include "content/browser/tab_contents/navigation_controller.h" |
17 #include "content/browser/tab_contents/navigation_entry.h" | 17 #include "content/browser/tab_contents/navigation_entry.h" |
18 #include "content/browser/tab_contents/tab_contents.h" | 18 #include "content/browser/tab_contents/tab_contents.h" |
19 #include "content/browser/tab_contents/test_tab_contents.h" | 19 #include "content/browser/tab_contents/test_tab_contents.h" |
20 #include "content/test/test_browser_thread.h" | 20 #include "content/test/test_browser_thread.h" |
21 #include "testing/gtest/include/gtest/gtest.h" | 21 #include "testing/gtest/include/gtest/gtest.h" |
22 #include "third_party/skia/include/core/SkBitmap.h" | 22 #include "third_party/skia/include/core/SkBitmap.h" |
23 #include "ui/gfx/codec/png_codec.h" | 23 #include "ui/gfx/codec/png_codec.h" |
24 | 24 |
| 25 using content::BrowserThread; |
| 26 |
25 namespace { | 27 namespace { |
26 | 28 |
27 // Creates a bitmap of the specified color. | 29 // Creates a bitmap of the specified color. |
28 SkBitmap CreateBitmap(SkColor color) { | 30 SkBitmap CreateBitmap(SkColor color) { |
29 SkBitmap bitmap; | 31 SkBitmap bitmap; |
30 bitmap.setConfig(SkBitmap::kARGB_8888_Config, 16, 16); | 32 bitmap.setConfig(SkBitmap::kARGB_8888_Config, 16, 16); |
31 bitmap.allocPixels(); | 33 bitmap.allocPixels(); |
32 bitmap.eraseColor(color); | 34 bitmap.eraseColor(color); |
33 return bitmap; | 35 return bitmap; |
34 } | 36 } |
(...skipping 513 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
548 // Verify we did get the expected favicon. | 550 // Verify we did get the expected favicon. |
549 EXPECT_EQ(0, memcmp(new_icon.getPixels(), valid_icon.getPixels(), | 551 EXPECT_EQ(0, memcmp(new_icon.getPixels(), valid_icon.getPixels(), |
550 new_icon.getSize())); | 552 new_icon.getSize())); |
551 | 553 |
552 // Make sure the browser deconstructor doesn't have problems. | 554 // Make sure the browser deconstructor doesn't have problems. |
553 browser.CloseAllTabs(); | 555 browser.CloseAllTabs(); |
554 // This is required to prevent the message loop from hanging. | 556 // This is required to prevent the message loop from hanging. |
555 profile()->DestroyHistoryService(); | 557 profile()->DestroyHistoryService(); |
556 } | 558 } |
557 | 559 |
OLD | NEW |