Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(33)

Side by Side Diff: chrome/browser/safe_browsing/safe_browsing_test.cc

Issue 8437002: Move BrowserThread to content namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: A few updates. Created 9 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 29 matching lines...) Expand all
40 #include "content/browser/renderer_host/resource_dispatcher_host.h" 40 #include "content/browser/renderer_host/resource_dispatcher_host.h"
41 #include "content/public/common/url_fetcher.h" 41 #include "content/public/common/url_fetcher.h"
42 #include "content/public/common/url_fetcher_delegate.h" 42 #include "content/public/common/url_fetcher_delegate.h"
43 #include "content/test/test_browser_thread.h" 43 #include "content/test/test_browser_thread.h"
44 #include "net/base/host_resolver.h" 44 #include "net/base/host_resolver.h"
45 #include "net/base/load_flags.h" 45 #include "net/base/load_flags.h"
46 #include "net/base/net_log.h" 46 #include "net/base/net_log.h"
47 #include "net/test/python_utils.h" 47 #include "net/test/python_utils.h"
48 #include "testing/gtest/include/gtest/gtest.h" 48 #include "testing/gtest/include/gtest/gtest.h"
49 49
50 using content::BrowserThread;
51
50 namespace { 52 namespace {
51 53
52 const FilePath::CharType kDataFile[] = FILE_PATH_LITERAL("testing_input.dat"); 54 const FilePath::CharType kDataFile[] = FILE_PATH_LITERAL("testing_input.dat");
53 const char kUrlVerifyPath[] = "/safebrowsing/verify_urls"; 55 const char kUrlVerifyPath[] = "/safebrowsing/verify_urls";
54 const char kDBVerifyPath[] = "/safebrowsing/verify_database"; 56 const char kDBVerifyPath[] = "/safebrowsing/verify_database";
55 const char kDBResetPath[] = "/reset"; 57 const char kDBResetPath[] = "/reset";
56 const char kTestCompletePath[] = "/test_complete"; 58 const char kTestCompletePath[] = "/test_complete";
57 59
58 struct PhishingUrl { 60 struct PhishingUrl {
59 std::string url; 61 std::string url;
(...skipping 589 matching lines...) Expand 10 before | Expand all | Expand 10 after
649 } 651 }
650 652
651 // Verifies with server if test is done and waits till server responses. 653 // Verifies with server if test is done and waits till server responses.
652 EXPECT_EQ(net::URLRequestStatus::SUCCESS, 654 EXPECT_EQ(net::URLRequestStatus::SUCCESS,
653 safe_browsing_helper->VerifyTestComplete(server_host, 655 safe_browsing_helper->VerifyTestComplete(server_host,
654 server_port, 656 server_port,
655 last_step)); 657 last_step));
656 EXPECT_EQ("yes", safe_browsing_helper->response_data()); 658 EXPECT_EQ("yes", safe_browsing_helper->response_data());
657 test_server.Stop(); 659 test_server.Stop();
658 } 660 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698