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 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
198 NaClBrowserTestBase::NaClBrowserTestBase() { | 198 NaClBrowserTestBase::NaClBrowserTestBase() { |
199 } | 199 } |
200 | 200 |
201 NaClBrowserTestBase::~NaClBrowserTestBase() { | 201 NaClBrowserTestBase::~NaClBrowserTestBase() { |
202 } | 202 } |
203 | 203 |
204 void NaClBrowserTestBase::SetUpCommandLine(CommandLine* command_line) { | 204 void NaClBrowserTestBase::SetUpCommandLine(CommandLine* command_line) { |
205 command_line->AppendSwitch(switches::kEnableNaCl); | 205 command_line->AppendSwitch(switches::kEnableNaCl); |
206 } | 206 } |
207 | 207 |
208 void NaClBrowserTestBase::SetUpInProcessBrowserTestFixture() { | 208 void NaClBrowserTestBase::SetUpOnMainThread() { |
209 // Sanity check. | 209 // Sanity check. |
210 base::FilePath plugin_lib; | 210 base::FilePath plugin_lib; |
211 ASSERT_TRUE(PathService::Get(chrome::FILE_NACL_PLUGIN, &plugin_lib)); | 211 ASSERT_TRUE(PathService::Get(chrome::FILE_NACL_PLUGIN, &plugin_lib)); |
212 ASSERT_TRUE(base::PathExists(plugin_lib)) << plugin_lib.value(); | 212 ASSERT_TRUE(base::PathExists(plugin_lib)) << plugin_lib.value(); |
213 | 213 |
214 ASSERT_TRUE(StartTestServer()) << "Cannot start test server."; | 214 ASSERT_TRUE(StartTestServer()) << "Cannot start test server."; |
215 } | 215 } |
216 | 216 |
217 bool NaClBrowserTestBase::GetDocumentRoot(base::FilePath* document_root) { | 217 bool NaClBrowserTestBase::GetDocumentRoot(base::FilePath* document_root) { |
218 return GetNaClVariantRoot(Variant(), document_root); | 218 return GetNaClVariantRoot(Variant(), document_root); |
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
319 } | 319 } |
320 | 320 |
321 base::FilePath::StringType NaClBrowserTestStatic::Variant() { | 321 base::FilePath::StringType NaClBrowserTestStatic::Variant() { |
322 return FILE_PATH_LITERAL("static"); | 322 return FILE_PATH_LITERAL("static"); |
323 } | 323 } |
324 | 324 |
325 bool NaClBrowserTestStatic::GetDocumentRoot(base::FilePath* document_root) { | 325 bool NaClBrowserTestStatic::GetDocumentRoot(base::FilePath* document_root) { |
326 *document_root = base::FilePath(FILE_PATH_LITERAL("chrome/test/data/nacl")); | 326 *document_root = base::FilePath(FILE_PATH_LITERAL("chrome/test/data/nacl")); |
327 return true; | 327 return true; |
328 } | 328 } |
OLD | NEW |