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

Side by Side Diff: net/proxy/proxy_script_fetcher_impl_unittest.cc

Issue 6264013: Clean up net unit testing code. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Re-virtualize TestDelegate::OnResponseCompleted Created 9 years, 11 months 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 #include "net/proxy/proxy_script_fetcher_impl.h" 5 #include "net/proxy/proxy_script_fetcher_impl.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/file_path.h" 9 #include "base/file_path.h"
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
11 #include "base/path_service.h" 11 #include "base/path_service.h"
12 #include "base/utf_string_conversions.h" 12 #include "base/utf_string_conversions.h"
13 #include "net/base/net_util.h" 13 #include "net/base/net_util.h"
14 #include "net/base/ssl_config_service_defaults.h" 14 #include "net/base/ssl_config_service_defaults.h"
15 #include "net/base/test_completion_callback.h" 15 #include "net/base/test_completion_callback.h"
16 #include "net/disk_cache/disk_cache.h" 16 #include "net/disk_cache/disk_cache.h"
17 #include "net/http/http_cache.h" 17 #include "net/http/http_cache.h"
18 #include "net/url_request/url_request_unittest.h" 18 #include "net/url_request/url_request_test_util.h"
19 #include "testing/gtest/include/gtest/gtest.h" 19 #include "testing/gtest/include/gtest/gtest.h"
20 #include "testing/platform_test.h" 20 #include "testing/platform_test.h"
21 21
22 // TODO(eroman): 22 // TODO(eroman):
23 // - Test canceling an outstanding request. 23 // - Test canceling an outstanding request.
24 // - Test deleting ProxyScriptFetcher while a request is in progress. 24 // - Test deleting ProxyScriptFetcher while a request is in progress.
25 25
26 const FilePath::CharType kDocRoot[] = 26 const FilePath::CharType kDocRoot[] =
27 FILE_PATH_LITERAL("net/data/proxy_script_fetcher_unittest"); 27 FILE_PATH_LITERAL("net/data/proxy_script_fetcher_unittest");
28 28
(...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after
326 string16 text; 326 string16 text;
327 TestCompletionCallback callback; 327 TestCompletionCallback callback;
328 int result = pac_fetcher.Fetch(url, &text, &callback); 328 int result = pac_fetcher.Fetch(url, &text, &callback);
329 EXPECT_EQ(ERR_IO_PENDING, result); 329 EXPECT_EQ(ERR_IO_PENDING, result);
330 EXPECT_EQ(OK, callback.WaitForResult()); 330 EXPECT_EQ(OK, callback.WaitForResult());
331 EXPECT_EQ(ASCIIToUTF16("This was encoded as UTF-16BE.\n"), text); 331 EXPECT_EQ(ASCIIToUTF16("This was encoded as UTF-16BE.\n"), text);
332 } 332 }
333 } 333 }
334 334
335 } // namespace net 335 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698