OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "base/memory/scoped_ptr.h" | 5 #include "chrome/browser/safe_browsing/ui_manager.h" |
| 6 |
6 #include "base/run_loop.h" | 7 #include "base/run_loop.h" |
7 #include "chrome/browser/safe_browsing/safe_browsing_service.h" | 8 #include "chrome/browser/safe_browsing/safe_browsing_service.h" |
8 #include "chrome/browser/safe_browsing/ui_manager.h" | |
9 #include "chrome/test/base/chrome_render_view_host_test_harness.h" | 9 #include "chrome/test/base/chrome_render_view_host_test_harness.h" |
10 #include "chrome/test/base/testing_profile.h" | 10 #include "chrome/test/base/testing_profile.h" |
11 #include "components/safe_browsing_db/util.h" | 11 #include "components/safe_browsing_db/util.h" |
12 #include "content/public/browser/render_process_host.h" | 12 #include "content/public/browser/render_process_host.h" |
13 #include "content/public/browser/render_view_host.h" | 13 #include "content/public/browser/render_view_host.h" |
14 #include "content/public/browser/web_contents.h" | 14 #include "content/public/browser/web_contents.h" |
15 #include "content/public/test/test_browser_thread_bundle.h" | 15 #include "content/public/test/test_browser_thread_bundle.h" |
16 #include "content/public/test/web_contents_tester.h" | 16 #include "content/public/test/web_contents_tester.h" |
17 #include "testing/gtest/include/gtest/gtest.h" | 17 #include "testing/gtest/include/gtest/gtest.h" |
18 #include "url/gurl.h" | 18 #include "url/gurl.h" |
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
263 std::vector<SafeBrowsingUIManager::UnsafeResource> resources; | 263 std::vector<SafeBrowsingUIManager::UnsafeResource> resources; |
264 resources.push_back(resource); | 264 resources.push_back(resource); |
265 SimulateBlockingPageDone(resources, false); | 265 SimulateBlockingPageDone(resources, false); |
266 EXPECT_FALSE(IsWhitelisted(resource)); | 266 EXPECT_FALSE(IsWhitelisted(resource)); |
267 waiter.WaitForCallback(); | 267 waiter.WaitForCallback(); |
268 EXPECT_TRUE(waiter.callback_called()); | 268 EXPECT_TRUE(waiter.callback_called()); |
269 EXPECT_FALSE(waiter.proceed()); | 269 EXPECT_FALSE(waiter.proceed()); |
270 } | 270 } |
271 | 271 |
272 } // namespace safe_browsing | 272 } // namespace safe_browsing |
OLD | NEW |