| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/content_setting_image_model.h" | 5 #include "chrome/browser/content_setting_image_model.h" |
| 6 | |
| 7 #include "chrome/browser/browser_thread.h" | |
| 8 #include "chrome/browser/content_settings/host_content_settings_map.h" | 6 #include "chrome/browser/content_settings/host_content_settings_map.h" |
| 9 #include "chrome/browser/profiles/profile.h" | 7 #include "chrome/browser/profiles/profile.h" |
| 10 #include "chrome/browser/renderer_host/test/test_render_view_host.h" | |
| 11 #include "chrome/browser/tab_contents/test_tab_contents.h" | 8 #include "chrome/browser/tab_contents/test_tab_contents.h" |
| 12 #include "chrome/test/testing_profile.h" | 9 #include "chrome/test/testing_profile.h" |
| 10 #include "content/browser/browser_thread.h" |
| 11 #include "content/browser/renderer_host/test_render_view_host.h" |
| 13 #include "net/base/cookie_options.h" | 12 #include "net/base/cookie_options.h" |
| 14 #include "testing/gtest/include/gtest/gtest.h" | 13 #include "testing/gtest/include/gtest/gtest.h" |
| 15 | 14 |
| 16 class ContentSettingImageModelTest : public RenderViewHostTestHarness { | 15 class ContentSettingImageModelTest : public RenderViewHostTestHarness { |
| 17 public: | 16 public: |
| 18 ContentSettingImageModelTest() | 17 ContentSettingImageModelTest() |
| 19 : RenderViewHostTestHarness(), | 18 : RenderViewHostTestHarness(), |
| 20 ui_thread_(BrowserThread::UI, &message_loop_) {} | 19 ui_thread_(BrowserThread::UI, &message_loop_) {} |
| 21 | 20 |
| 22 private: | 21 private: |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 77 EXPECT_FALSE(content_setting_image_model->get_tooltip().empty()); | 76 EXPECT_FALSE(content_setting_image_model->get_tooltip().empty()); |
| 78 | 77 |
| 79 // Make the tab_contents prerendered | 78 // Make the tab_contents prerendered |
| 80 tab_contents.set_was_prerendered(true); | 79 tab_contents.set_was_prerendered(true); |
| 81 content_setting_image_model->UpdateFromTabContents(&tab_contents); | 80 content_setting_image_model->UpdateFromTabContents(&tab_contents); |
| 82 EXPECT_TRUE(content_setting_image_model->is_visible()); | 81 EXPECT_TRUE(content_setting_image_model->is_visible()); |
| 83 EXPECT_NE(0, content_setting_image_model->get_icon()); | 82 EXPECT_NE(0, content_setting_image_model->get_icon()); |
| 84 EXPECT_FALSE(content_setting_image_model->get_tooltip().empty()); | 83 EXPECT_FALSE(content_setting_image_model->get_tooltip().empty()); |
| 85 } | 84 } |
| 86 | 85 |
| OLD | NEW |