| 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/environment.h" | 9 #include "base/environment.h" |
| 10 #include "base/json/json_reader.h" | 10 #include "base/json/json_reader.h" |
| (...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 195 | 195 |
| 196 void NaClBrowserTestBase::SetUpCommandLine(CommandLine* command_line) { | 196 void NaClBrowserTestBase::SetUpCommandLine(CommandLine* command_line) { |
| 197 command_line->AppendSwitch(switches::kNoFirstRun); | 197 command_line->AppendSwitch(switches::kNoFirstRun); |
| 198 command_line->AppendSwitch(switches::kEnableNaCl); | 198 command_line->AppendSwitch(switches::kEnableNaCl); |
| 199 } | 199 } |
| 200 | 200 |
| 201 void NaClBrowserTestBase::SetUpInProcessBrowserTestFixture() { | 201 void NaClBrowserTestBase::SetUpInProcessBrowserTestFixture() { |
| 202 // Sanity check. | 202 // Sanity check. |
| 203 base::FilePath plugin_lib; | 203 base::FilePath plugin_lib; |
| 204 ASSERT_TRUE(PathService::Get(chrome::FILE_NACL_PLUGIN, &plugin_lib)); | 204 ASSERT_TRUE(PathService::Get(chrome::FILE_NACL_PLUGIN, &plugin_lib)); |
| 205 ASSERT_TRUE(file_util::PathExists(plugin_lib)) << plugin_lib.value(); | 205 ASSERT_TRUE(base::PathExists(plugin_lib)) << plugin_lib.value(); |
| 206 | 206 |
| 207 ASSERT_TRUE(StartTestServer()) << "Cannot start test server."; | 207 ASSERT_TRUE(StartTestServer()) << "Cannot start test server."; |
| 208 } | 208 } |
| 209 | 209 |
| 210 bool NaClBrowserTestBase::GetDocumentRoot(base::FilePath* document_root) { | 210 bool NaClBrowserTestBase::GetDocumentRoot(base::FilePath* document_root) { |
| 211 return GetNaClVariantRoot(Variant(), document_root); | 211 return GetNaClVariantRoot(Variant(), document_root); |
| 212 } | 212 } |
| 213 | 213 |
| 214 bool NaClBrowserTestBase::IsPnacl() { | 214 bool NaClBrowserTestBase::IsPnacl() { |
| 215 return false; | 215 return false; |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 294 } | 294 } |
| 295 | 295 |
| 296 base::FilePath::StringType NaClBrowserTestStatic::Variant() { | 296 base::FilePath::StringType NaClBrowserTestStatic::Variant() { |
| 297 return FILE_PATH_LITERAL("static"); | 297 return FILE_PATH_LITERAL("static"); |
| 298 } | 298 } |
| 299 | 299 |
| 300 bool NaClBrowserTestStatic::GetDocumentRoot(base::FilePath* document_root) { | 300 bool NaClBrowserTestStatic::GetDocumentRoot(base::FilePath* document_root) { |
| 301 *document_root = base::FilePath(FILE_PATH_LITERAL("chrome/test/data/nacl")); | 301 *document_root = base::FilePath(FILE_PATH_LITERAL("chrome/test/data/nacl")); |
| 302 return true; | 302 return true; |
| 303 } | 303 } |
| OLD | NEW |