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 <windows.h> | 5 #include <windows.h> |
6 #include <wininet.h> | 6 #include <wininet.h> |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/path_service.h" | 10 #include "base/path_service.h" |
(...skipping 14 matching lines...) Expand all Loading... |
25 class TestServerTest: public testing::Test { | 25 class TestServerTest: public testing::Test { |
26 protected: | 26 protected: |
27 virtual void SetUp() { | 27 virtual void SetUp() { |
28 PathService::Get(base::DIR_SOURCE_ROOT, &source_path_); | 28 PathService::Get(base::DIR_SOURCE_ROOT, &source_path_); |
29 source_path_ = source_path_.Append(FILE_PATH_LITERAL("chrome_frame")); | 29 source_path_ = source_path_.Append(FILE_PATH_LITERAL("chrome_frame")); |
30 } | 30 } |
31 virtual void TearDown() { | 31 virtual void TearDown() { |
32 } | 32 } |
33 | 33 |
34 public: | 34 public: |
35 const FilePath& source_path() const { | 35 const base::FilePath& source_path() const { |
36 return source_path_; | 36 return source_path_; |
37 } | 37 } |
38 | 38 |
39 protected: | 39 protected: |
40 FilePath source_path_; | 40 base::FilePath source_path_; |
41 }; | 41 }; |
42 | 42 |
43 namespace { | 43 namespace { |
44 | 44 |
45 class ScopedInternet { | 45 class ScopedInternet { |
46 public: | 46 public: |
47 explicit ScopedInternet(HINTERNET handle) | 47 explicit ScopedInternet(HINTERNET handle) |
48 : h_(handle) { | 48 : h_(handle) { |
49 } | 49 } |
50 ~ScopedInternet() { | 50 ~ScopedInternet() { |
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
187 EXPECT_EQ(file.accessed(), 1); | 187 EXPECT_EQ(file.accessed(), 1); |
188 EXPECT_EQ(redir.accessed(), 1); | 188 EXPECT_EQ(redir.accessed(), 1); |
189 | 189 |
190 EXPECT_TRUE(person_task.response().find("Guthrie") != std::string::npos); | 190 EXPECT_TRUE(person_task.response().find("Guthrie") != std::string::npos); |
191 EXPECT_TRUE(file_task.response().find("function") != std::string::npos); | 191 EXPECT_TRUE(file_task.response().find("function") != std::string::npos); |
192 EXPECT_TRUE(redir_task.response().find("Destination") != std::string::npos); | 192 EXPECT_TRUE(redir_task.response().find("Destination") != std::string::npos); |
193 } else { | 193 } else { |
194 ::TerminateThread(worker, ~0); | 194 ::TerminateThread(worker, ~0); |
195 } | 195 } |
196 } | 196 } |
OLD | NEW |