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 #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" |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
121 dhcp_query_->test_finished_event_.Signal(); | 121 dhcp_query_->test_finished_event_.Signal(); |
122 } | 122 } |
123 | 123 |
124 base::TimeDelta dhcp_delay_; | 124 base::TimeDelta dhcp_delay_; |
125 base::TimeDelta timeout_; | 125 base::TimeDelta timeout_; |
126 std::string configured_url_; | 126 std::string configured_url_; |
127 int fetcher_delay_ms_; | 127 int fetcher_delay_ms_; |
128 int fetcher_result_; | 128 int fetcher_result_; |
129 std::string pac_script_; | 129 std::string pac_script_; |
130 MockProxyScriptFetcher* fetcher_; | 130 MockProxyScriptFetcher* fetcher_; |
131 base::OneShotTimer<MockDhcpProxyScriptAdapterFetcher> fetcher_timer_; | 131 base::OneShotTimer fetcher_timer_; |
132 scoped_refptr<DelayingDhcpQuery> dhcp_query_; | 132 scoped_refptr<DelayingDhcpQuery> dhcp_query_; |
133 }; | 133 }; |
134 | 134 |
135 class FetcherClient { | 135 class FetcherClient { |
136 public: | 136 public: |
137 FetcherClient() | 137 FetcherClient() |
138 : url_request_context_(new TestURLRequestContext()), | 138 : url_request_context_(new TestURLRequestContext()), |
139 worker_pool_( | 139 worker_pool_( |
140 new base::SequencedWorkerPool(4, "DhcpAdapterFetcherTest")), | 140 new base::SequencedWorkerPool(4, "DhcpAdapterFetcherTest")), |
141 fetcher_(new MockDhcpProxyScriptAdapterFetcher( | 141 fetcher_(new MockDhcpProxyScriptAdapterFetcher( |
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
330 EXPECT_EQ(BASE_URL, | 330 EXPECT_EQ(BASE_URL, |
331 DhcpProxyScriptAdapterFetcher::SanitizeDhcpApiString( | 331 DhcpProxyScriptAdapterFetcher::SanitizeDhcpApiString( |
332 BASE_URL "\0foo\0blat", kBaseUrlLen + 9)); | 332 BASE_URL "\0foo\0blat", kBaseUrlLen + 9)); |
333 } | 333 } |
334 | 334 |
335 #undef BASE_URL | 335 #undef BASE_URL |
336 | 336 |
337 } // namespace | 337 } // namespace |
338 | 338 |
339 } // namespace net | 339 } // namespace net |
OLD | NEW |