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

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

Issue 885443002: Roll Chrome into Mojo. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Rebase to ToT mojo Created 5 years, 10 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
« no previous file with comments | « net/net.gypi ('k') | net/proxy/proxy_config_source.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #include "net/proxy/dhcp_proxy_script_adapter_fetcher_win.h" 5 #include "net/proxy/dhcp_proxy_script_adapter_fetcher_win.h"
6 6
7 #include "base/synchronization/waitable_event.h" 7 #include "base/synchronization/waitable_event.h"
8 #include "base/test/test_timeouts.h" 8 #include "base/test/test_timeouts.h"
9 #include "base/threading/sequenced_worker_pool.h" 9 #include "base/threading/sequenced_worker_pool.h"
10 #include "base/timer/elapsed_timer.h" 10 #include "base/timer/elapsed_timer.h"
11 #include "base/timer/timer.h" 11 #include "base/timer/timer.h"
12 #include "net/base/net_errors.h" 12 #include "net/base/net_errors.h"
13 #include "net/base/test_completion_callback.h" 13 #include "net/base/test_completion_callback.h"
14 #include "net/proxy/mock_proxy_script_fetcher.h" 14 #include "net/proxy/mock_proxy_script_fetcher.h"
15 #include "net/proxy/proxy_script_fetcher_impl.h" 15 #include "net/proxy/proxy_script_fetcher_impl.h"
16 #include "net/test/spawned_test_server/spawned_test_server.h" 16 #include "net/test/spawned_test_server/spawned_test_server.h"
17 #include "net/url_request/url_request_test_util.h" 17 #include "net/url_request/url_request_test_util.h"
18 #include "testing/gtest/include/gtest/gtest.h" 18 #include "testing/gtest/include/gtest/gtest.h"
19 19
20 namespace net { 20 namespace net {
21 21
22 namespace { 22 namespace {
23 23
24 const char* const kPacUrl = "http://pacserver/script.pac"; 24 const char kPacUrl[] = "http://pacserver/script.pac";
25 25
26 // In net/proxy/dhcp_proxy_script_fetcher_win_unittest.cc there are a few 26 // In net/proxy/dhcp_proxy_script_fetcher_win_unittest.cc there are a few
27 // tests that exercise DhcpProxyScriptAdapterFetcher end-to-end along with 27 // tests that exercise DhcpProxyScriptAdapterFetcher end-to-end along with
28 // DhcpProxyScriptFetcherWin, i.e. it tests the end-to-end usage of Win32 28 // DhcpProxyScriptFetcherWin, i.e. it tests the end-to-end usage of Win32
29 // APIs and the network. In this file we test only by stubbing out 29 // APIs and the network. In this file we test only by stubbing out
30 // functionality. 30 // functionality.
31 31
32 // Version of DhcpProxyScriptAdapterFetcher that mocks out dependencies 32 // Version of DhcpProxyScriptAdapterFetcher that mocks out dependencies
33 // to allow unit testing. 33 // to allow unit testing.
34 class MockDhcpProxyScriptAdapterFetcher 34 class MockDhcpProxyScriptAdapterFetcher
(...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after
329 EXPECT_EQ(BASE_URL, 329 EXPECT_EQ(BASE_URL,
330 DhcpProxyScriptAdapterFetcher::SanitizeDhcpApiString( 330 DhcpProxyScriptAdapterFetcher::SanitizeDhcpApiString(
331 BASE_URL "\0foo\0blat", kBaseUrlLen + 9)); 331 BASE_URL "\0foo\0blat", kBaseUrlLen + 9));
332 } 332 }
333 333
334 #undef BASE_URL 334 #undef BASE_URL
335 335
336 } // namespace 336 } // namespace
337 337
338 } // namespace net 338 } // namespace net
OLDNEW
« no previous file with comments | « net/net.gypi ('k') | net/proxy/proxy_config_source.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698