OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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_resolver_v8_tracing.h" | 5 #include "net/proxy/proxy_resolver_v8_tracing.h" |
6 | 6 |
7 #include "base/files/file_util.h" | 7 #include "base/files/file_util.h" |
8 #include "base/message_loop/message_loop.h" | 8 #include "base/message_loop/message_loop.h" |
9 #include "base/path_service.h" | 9 #include "base/path_service.h" |
10 #include "base/stl_util.h" | 10 #include "base/stl_util.h" |
(...skipping 13 matching lines...) Expand all Loading... |
24 #include "net/proxy/proxy_resolver_error_observer.h" | 24 #include "net/proxy/proxy_resolver_error_observer.h" |
25 #include "testing/gtest/include/gtest/gtest.h" | 25 #include "testing/gtest/include/gtest/gtest.h" |
26 #include "url/gurl.h" | 26 #include "url/gurl.h" |
27 | 27 |
28 namespace net { | 28 namespace net { |
29 | 29 |
30 namespace { | 30 namespace { |
31 | 31 |
32 class ProxyResolverV8TracingTest : public testing::Test { | 32 class ProxyResolverV8TracingTest : public testing::Test { |
33 public: | 33 public: |
34 virtual void TearDown() override { | 34 void TearDown() override { |
35 // Drain any pending messages, which may be left over from cancellation. | 35 // Drain any pending messages, which may be left over from cancellation. |
36 // This way they get reliably run as part of the current test, rather than | 36 // This way they get reliably run as part of the current test, rather than |
37 // spilling into the next test's execution. | 37 // spilling into the next test's execution. |
38 base::MessageLoop::current()->RunUntilIdle(); | 38 base::MessageLoop::current()->RunUntilIdle(); |
39 } | 39 } |
40 }; | 40 }; |
41 | 41 |
42 scoped_refptr<ProxyResolverScriptData> LoadScriptData(const char* filename) { | 42 scoped_refptr<ProxyResolverScriptData> LoadScriptData(const char* filename) { |
43 base::FilePath path; | 43 base::FilePath path; |
44 PathService::Get(base::DIR_SOURCE_ROOT, &path); | 44 PathService::Get(base::DIR_SOURCE_ROOT, &path); |
(...skipping 1044 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1089 proxy_uri.substr(0, proxy_uri.find(':') + 1)); | 1089 proxy_uri.substr(0, proxy_uri.find(':') + 1)); |
1090 } else { | 1090 } else { |
1091 NOTREACHED(); | 1091 NOTREACHED(); |
1092 } | 1092 } |
1093 } | 1093 } |
1094 } | 1094 } |
1095 | 1095 |
1096 } // namespace | 1096 } // namespace |
1097 | 1097 |
1098 } // namespace net | 1098 } // namespace net |
OLD | NEW |