| 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 "components/content_settings/core/common/content_settings.h" | 5 #include <stddef.h> |
| 6 |
| 6 #include "chrome/common/render_messages.h" | 7 #include "chrome/common/render_messages.h" |
| 7 #include "chrome/renderer/content_settings_observer.h" | 8 #include "chrome/renderer/content_settings_observer.h" |
| 8 #include "chrome/test/base/chrome_render_view_test.h" | 9 #include "chrome/test/base/chrome_render_view_test.h" |
| 9 #include "components/content_settings/content/common/content_settings_messages.h
" | 10 #include "components/content_settings/content/common/content_settings_messages.h
" |
| 11 #include "components/content_settings/core/common/content_settings.h" |
| 10 #include "content/public/renderer/render_view.h" | 12 #include "content/public/renderer/render_view.h" |
| 11 #include "ipc/ipc_message_macros.h" | 13 #include "ipc/ipc_message_macros.h" |
| 12 #include "testing/gmock/include/gmock/gmock.h" | 14 #include "testing/gmock/include/gmock/gmock.h" |
| 13 #include "testing/gtest/include/gtest/gtest.h" | 15 #include "testing/gtest/include/gtest/gtest.h" |
| 14 #include "third_party/WebKit/public/web/WebView.h" | 16 #include "third_party/WebKit/public/web/WebView.h" |
| 15 | 17 |
| 16 using testing::_; | 18 using testing::_; |
| 17 using testing::DeleteArg; | 19 using testing::DeleteArg; |
| 18 | 20 |
| 19 namespace { | 21 namespace { |
| (...skipping 347 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 367 was_blocked = true; | 369 was_blocked = true; |
| 368 } | 370 } |
| 369 EXPECT_FALSE(was_blocked); | 371 EXPECT_FALSE(was_blocked); |
| 370 | 372 |
| 371 // Verify that images are allowed. | 373 // Verify that images are allowed. |
| 372 EXPECT_CALL(mock_observer, OnContentBlocked(CONTENT_SETTINGS_TYPE_IMAGES, | 374 EXPECT_CALL(mock_observer, OnContentBlocked(CONTENT_SETTINGS_TYPE_IMAGES, |
| 373 base::string16())).Times(0); | 375 base::string16())).Times(0); |
| 374 EXPECT_TRUE(observer->allowImage(true, mock_observer.image_url_)); | 376 EXPECT_TRUE(observer->allowImage(true, mock_observer.image_url_)); |
| 375 ::testing::Mock::VerifyAndClearExpectations(&observer); | 377 ::testing::Mock::VerifyAndClearExpectations(&observer); |
| 376 } | 378 } |
| OLD | NEW |