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 // This test uses the safebrowsing test server published at | 5 // This test uses the safebrowsing test server published at |
6 // http://code.google.com/p/google-safe-browsing/ to test the safebrowsing | 6 // http://code.google.com/p/google-safe-browsing/ to test the safebrowsing |
7 // protocol implemetation. Details of the safebrowsing testing flow is | 7 // protocol implemetation. Details of the safebrowsing testing flow is |
8 // documented at | 8 // documented at |
9 // http://code.google.com/p/google-safe-browsing/wiki/ProtocolTesting | 9 // http://code.google.com/p/google-safe-browsing/wiki/ProtocolTesting |
10 // | 10 // |
(...skipping 21 matching lines...) Expand all Loading... |
32 #include "base/utf_string_conversions.h" | 32 #include "base/utf_string_conversions.h" |
33 #include "chrome/browser/browser_process.h" | 33 #include "chrome/browser/browser_process.h" |
34 #include "chrome/browser/safe_browsing/protocol_manager.h" | 34 #include "chrome/browser/safe_browsing/protocol_manager.h" |
35 #include "chrome/browser/safe_browsing/safe_browsing_service.h" | 35 #include "chrome/browser/safe_browsing/safe_browsing_service.h" |
36 #include "chrome/common/chrome_switches.h" | 36 #include "chrome/common/chrome_switches.h" |
37 #include "chrome/common/url_constants.h" | 37 #include "chrome/common/url_constants.h" |
38 #include "chrome/test/base/in_process_browser_test.h" | 38 #include "chrome/test/base/in_process_browser_test.h" |
39 #include "chrome/test/base/ui_test_utils.h" | 39 #include "chrome/test/base/ui_test_utils.h" |
40 #include "content/public/browser/browser_context.h" | 40 #include "content/public/browser/browser_context.h" |
41 #include "content/public/common/url_fetcher.h" | 41 #include "content/public/common/url_fetcher.h" |
42 #include "content/test/test_browser_thread.h" | 42 #include "content/public/test/test_browser_thread.h" |
43 #include "net/base/host_resolver.h" | 43 #include "net/base/host_resolver.h" |
44 #include "net/base/load_flags.h" | 44 #include "net/base/load_flags.h" |
45 #include "net/base/net_log.h" | 45 #include "net/base/net_log.h" |
46 #include "net/test/python_utils.h" | 46 #include "net/test/python_utils.h" |
47 #include "net/url_request/url_fetcher_delegate.h" | 47 #include "net/url_request/url_fetcher_delegate.h" |
48 #include "net/url_request/url_request_status.h" | 48 #include "net/url_request/url_request_status.h" |
49 #include "testing/gtest/include/gtest/gtest.h" | 49 #include "testing/gtest/include/gtest/gtest.h" |
50 | 50 |
51 using content::BrowserThread; | 51 using content::BrowserThread; |
52 | 52 |
(...skipping 591 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
644 } | 644 } |
645 | 645 |
646 // Verifies with server if test is done and waits till server responses. | 646 // Verifies with server if test is done and waits till server responses. |
647 EXPECT_EQ(net::URLRequestStatus::SUCCESS, | 647 EXPECT_EQ(net::URLRequestStatus::SUCCESS, |
648 safe_browsing_helper->VerifyTestComplete(server_host, | 648 safe_browsing_helper->VerifyTestComplete(server_host, |
649 server_port, | 649 server_port, |
650 last_step)); | 650 last_step)); |
651 EXPECT_EQ("yes", safe_browsing_helper->response_data()); | 651 EXPECT_EQ("yes", safe_browsing_helper->response_data()); |
652 test_server.Stop(); | 652 test_server.Stop(); |
653 } | 653 } |
OLD | NEW |