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 "content/test/layout_browsertest.h" | 5 #include "content/test/layout_browsertest.h" |
6 | 6 |
7 #include <sstream> | 7 #include <sstream> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/file_util.h" | 10 #include "base/file_util.h" |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 | 66 |
67 InProcessBrowserLayoutTest::InProcessBrowserLayoutTest( | 67 InProcessBrowserLayoutTest::InProcessBrowserLayoutTest( |
68 const base::FilePath& test_parent_dir, | 68 const base::FilePath& test_parent_dir, |
69 const base::FilePath& test_case_dir, | 69 const base::FilePath& test_case_dir, |
70 int port) | 70 int port) |
71 : test_parent_dir_(test_parent_dir), test_case_dir_(test_case_dir), | 71 : test_parent_dir_(test_parent_dir), test_case_dir_(test_case_dir), |
72 port_(port) { | 72 port_(port) { |
73 } | 73 } |
74 | 74 |
75 InProcessBrowserLayoutTest::~InProcessBrowserLayoutTest() { | 75 InProcessBrowserLayoutTest::~InProcessBrowserLayoutTest() { |
76 if (test_http_server_.get()) | 76 if (test_http_server_) |
77 CHECK(test_http_server_->Stop()); | 77 CHECK(test_http_server_->Stop()); |
78 } | 78 } |
79 | 79 |
80 void InProcessBrowserLayoutTest::SetUpInProcessBrowserTestFixture() { | 80 void InProcessBrowserLayoutTest::SetUpInProcessBrowserTestFixture() { |
81 base::FilePath src_dir; | 81 base::FilePath src_dir; |
82 ASSERT_TRUE(PathService::Get(DIR_LAYOUT_TESTS, &src_dir)); | 82 ASSERT_TRUE(PathService::Get(DIR_LAYOUT_TESTS, &src_dir)); |
83 base::FilePath absolute_parent_dir = src_dir.Append(test_parent_dir_); | 83 base::FilePath absolute_parent_dir = src_dir.Append(test_parent_dir_); |
84 ASSERT_TRUE(file_util::DirectoryExists(absolute_parent_dir)); | 84 ASSERT_TRUE(file_util::DirectoryExists(absolute_parent_dir)); |
85 layout_test_dir_ = absolute_parent_dir.Append(test_case_dir_); | 85 layout_test_dir_ = absolute_parent_dir.Append(test_case_dir_); |
86 ASSERT_TRUE(file_util::DirectoryExists(layout_test_dir_)); | 86 ASSERT_TRUE(file_util::DirectoryExists(layout_test_dir_)); |
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
205 expected.size())); | 205 expected.size())); |
206 EXPECT_NE(-1, file_util::WriteFile(actual_filename, | 206 EXPECT_NE(-1, file_util::WriteFile(actual_filename, |
207 actual.c_str(), | 207 actual.c_str(), |
208 actual.size())); | 208 actual.size())); |
209 return base::StringPrintf("Wrote %"PRFilePath" %"PRFilePath, | 209 return base::StringPrintf("Wrote %"PRFilePath" %"PRFilePath, |
210 expected_filename.value().c_str(), | 210 expected_filename.value().c_str(), |
211 actual_filename.value().c_str()); | 211 actual_filename.value().c_str()); |
212 } | 212 } |
213 | 213 |
214 } // namespace content | 214 } // namespace content |
OLD | NEW |