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 | |
Nathan Parker
2016/04/11 17:56:44
maybe not needed
dcheng
2016/04/11 18:31:15
Done.
| |
7 #include <memory> | |
8 | |
6 #include "base/run_loop.h" | 9 #include "base/run_loop.h" |
7 #include "chrome/browser/safe_browsing/safe_browsing_service.h" | 10 #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" | 11 #include "chrome/test/base/chrome_render_view_host_test_harness.h" |
10 #include "chrome/test/base/testing_profile.h" | 12 #include "chrome/test/base/testing_profile.h" |
11 #include "components/safe_browsing_db/util.h" | 13 #include "components/safe_browsing_db/util.h" |
12 #include "content/public/browser/render_process_host.h" | 14 #include "content/public/browser/render_process_host.h" |
13 #include "content/public/browser/render_view_host.h" | 15 #include "content/public/browser/render_view_host.h" |
14 #include "content/public/browser/web_contents.h" | 16 #include "content/public/browser/web_contents.h" |
15 #include "content/public/test/test_browser_thread_bundle.h" | 17 #include "content/public/test/test_browser_thread_bundle.h" |
16 #include "content/public/test/web_contents_tester.h" | 18 #include "content/public/test/web_contents_tester.h" |
17 #include "testing/gtest/include/gtest/gtest.h" | 19 #include "testing/gtest/include/gtest/gtest.h" |
18 #include "url/gurl.h" | 20 #include "url/gurl.h" |
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
263 std::vector<SafeBrowsingUIManager::UnsafeResource> resources; | 265 std::vector<SafeBrowsingUIManager::UnsafeResource> resources; |
264 resources.push_back(resource); | 266 resources.push_back(resource); |
265 SimulateBlockingPageDone(resources, false); | 267 SimulateBlockingPageDone(resources, false); |
266 EXPECT_FALSE(IsWhitelisted(resource)); | 268 EXPECT_FALSE(IsWhitelisted(resource)); |
267 waiter.WaitForCallback(); | 269 waiter.WaitForCallback(); |
268 EXPECT_TRUE(waiter.callback_called()); | 270 EXPECT_TRUE(waiter.callback_called()); |
269 EXPECT_FALSE(waiter.proceed()); | 271 EXPECT_FALSE(waiter.proceed()); |
270 } | 272 } |
271 | 273 |
272 } // namespace safe_browsing | 274 } // namespace safe_browsing |
OLD | NEW |