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 "chrome/test/nacl/nacl_browsertest_util.h" | 5 #include "chrome/test/nacl/nacl_browsertest_util.h" |
6 | 6 |
7 #include <stdlib.h> | 7 #include <stdlib.h> |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/json/json_reader.h" | 9 #include "base/json/json_reader.h" |
10 #include "base/path_service.h" | 10 #include "base/path_service.h" |
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
199 NaClBrowserTestBase::NaClBrowserTestBase() { | 199 NaClBrowserTestBase::NaClBrowserTestBase() { |
200 } | 200 } |
201 | 201 |
202 NaClBrowserTestBase::~NaClBrowserTestBase() { | 202 NaClBrowserTestBase::~NaClBrowserTestBase() { |
203 } | 203 } |
204 | 204 |
205 void NaClBrowserTestBase::SetUpCommandLine(CommandLine* command_line) { | 205 void NaClBrowserTestBase::SetUpCommandLine(CommandLine* command_line) { |
206 command_line->AppendSwitch(switches::kEnableNaCl); | 206 command_line->AppendSwitch(switches::kEnableNaCl); |
207 } | 207 } |
208 | 208 |
209 void NaClBrowserTestBase::SetUpInProcessBrowserTestFixture() { | 209 void NaClBrowserTestBase::SetUpOnMainThread() { |
210 // Sanity check. | 210 // Sanity check. |
211 base::FilePath plugin_lib; | 211 base::FilePath plugin_lib; |
212 ASSERT_TRUE(PathService::Get(chrome::FILE_NACL_PLUGIN, &plugin_lib)); | 212 ASSERT_TRUE(PathService::Get(chrome::FILE_NACL_PLUGIN, &plugin_lib)); |
213 ASSERT_TRUE(base::PathExists(plugin_lib)) << plugin_lib.value(); | 213 ASSERT_TRUE(base::PathExists(plugin_lib)) << plugin_lib.value(); |
214 | 214 |
215 ASSERT_TRUE(StartTestServer()) << "Cannot start test server."; | 215 ASSERT_TRUE(StartTestServer()) << "Cannot start test server."; |
216 } | 216 } |
217 | 217 |
218 bool NaClBrowserTestBase::GetDocumentRoot(base::FilePath* document_root) { | 218 bool NaClBrowserTestBase::GetDocumentRoot(base::FilePath* document_root) { |
219 return GetNaClVariantRoot(Variant(), document_root); | 219 return GetNaClVariantRoot(Variant(), document_root); |
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
329 } | 329 } |
330 | 330 |
331 base::FilePath::StringType NaClBrowserTestStatic::Variant() { | 331 base::FilePath::StringType NaClBrowserTestStatic::Variant() { |
332 return FILE_PATH_LITERAL("static"); | 332 return FILE_PATH_LITERAL("static"); |
333 } | 333 } |
334 | 334 |
335 bool NaClBrowserTestStatic::GetDocumentRoot(base::FilePath* document_root) { | 335 bool NaClBrowserTestStatic::GetDocumentRoot(base::FilePath* document_root) { |
336 *document_root = base::FilePath(FILE_PATH_LITERAL("chrome/test/data/nacl")); | 336 *document_root = base::FilePath(FILE_PATH_LITERAL("chrome/test/data/nacl")); |
337 return true; | 337 return true; |
338 } | 338 } |
OLD | NEW |