| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "base/file_util.h" | 5 #include "base/file_util.h" |
| 6 #include "base/path_service.h" | 6 #include "base/path_service.h" |
| 7 #include "base/test/test_timeouts.h" | 7 #include "base/test/test_timeouts.h" |
| 8 #include "build/build_config.h" | 8 #include "build/build_config.h" |
| 9 #include "chrome/common/chrome_switches.h" | 9 #include "chrome/common/chrome_switches.h" |
| 10 #include "chrome/test/automation/tab_proxy.h" | 10 #include "chrome/test/automation/tab_proxy.h" |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 launch_arguments_.AppendSwitch(switches::kEnableFileCookies); | 46 launch_arguments_.AppendSwitch(switches::kEnableFileCookies); |
| 47 | 47 |
| 48 // Some stuff is hung off of the testing interface which is not enabled | 48 // Some stuff is hung off of the testing interface which is not enabled |
| 49 // by default. | 49 // by default. |
| 50 launch_arguments_.AppendSwitch(switches::kEnablePepperTesting); | 50 launch_arguments_.AppendSwitch(switches::kEnablePepperTesting); |
| 51 | 51 |
| 52 // Give unlimited quota for files to Pepper tests. | 52 // Give unlimited quota for files to Pepper tests. |
| 53 // TODO(dumi): remove this switch once we have a quota management | 53 // TODO(dumi): remove this switch once we have a quota management |
| 54 // system in place. | 54 // system in place. |
| 55 launch_arguments_.AppendSwitch(switches::kUnlimitedQuotaForFiles); | 55 launch_arguments_.AppendSwitch(switches::kUnlimitedQuotaForFiles); |
| 56 |
| 57 #if defined(ENABLE_P2P_APIS) |
| 58 // Enable P2P API. |
| 59 launch_arguments_.AppendSwitch(switches::kEnableP2PApi); |
| 60 #endif // ENABLE_P2P_APIS |
| 56 } | 61 } |
| 57 | 62 |
| 58 void RunTest(const std::string& test_case) { | 63 void RunTest(const std::string& test_case) { |
| 59 FilePath test_path; | 64 FilePath test_path; |
| 60 PathService::Get(base::DIR_SOURCE_ROOT, &test_path); | 65 PathService::Get(base::DIR_SOURCE_ROOT, &test_path); |
| 61 test_path = test_path.Append(FILE_PATH_LITERAL("ppapi")); | 66 test_path = test_path.Append(FILE_PATH_LITERAL("ppapi")); |
| 62 test_path = test_path.Append(FILE_PATH_LITERAL("tests")); | 67 test_path = test_path.Append(FILE_PATH_LITERAL("tests")); |
| 63 test_path = test_path.Append(FILE_PATH_LITERAL("test_case.html")); | 68 test_path = test_path.Append(FILE_PATH_LITERAL("test_case.html")); |
| 64 | 69 |
| 65 // Sanity check the file name. | 70 // Sanity check the file name. |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 162 | 167 |
| 163 TEST_F(PPAPITest, FileRef) { | 168 TEST_F(PPAPITest, FileRef) { |
| 164 RunTestViaHTTP("FileRef"); | 169 RunTestViaHTTP("FileRef"); |
| 165 } | 170 } |
| 166 | 171 |
| 167 // http://crbug.com/63239 | 172 // http://crbug.com/63239 |
| 168 TEST_F(PPAPITest, DISABLED_DirectoryReader) { | 173 TEST_F(PPAPITest, DISABLED_DirectoryReader) { |
| 169 RunTestViaHTTP("DirectoryReader"); | 174 RunTestViaHTTP("DirectoryReader"); |
| 170 } | 175 } |
| 171 | 176 |
| 172 // http://crbug.com/83395 | 177 #if defined(ENABLE_P2P_APIS) |
| 173 TEST_F(PPAPITest, DISABLED_Transport) { | 178 TEST_F(PPAPITest, Transport) { |
| 174 RunTest("Transport"); | 179 RunTest("Transport"); |
| 175 } | 180 } |
| 181 #endif // ENABLE_P2P_APIS |
| OLD | NEW |