| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 "build/build_config.h" | 7 #include "build/build_config.h" |
| 8 #include "chrome/common/chrome_switches.h" | 8 #include "chrome/common/chrome_switches.h" |
| 9 #include "chrome/test/automation/tab_proxy.h" | 9 #include "chrome/test/automation/tab_proxy.h" |
| 10 #include "chrome/test/ui/ui_test.h" | 10 #include "chrome/test/ui/ui_test.h" |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 50 | 50 |
| 51 // Give unlimited quota for files to Pepper tests. | 51 // Give unlimited quota for files to Pepper tests. |
| 52 // TODO(dumi): remove this switch once we have a quota management | 52 // TODO(dumi): remove this switch once we have a quota management |
| 53 // system in place. | 53 // system in place. |
| 54 launch_arguments_.AppendSwitch(switches::kUnlimitedQuotaForFiles); | 54 launch_arguments_.AppendSwitch(switches::kUnlimitedQuotaForFiles); |
| 55 } | 55 } |
| 56 | 56 |
| 57 void RunTest(const std::string& test_case) { | 57 void RunTest(const std::string& test_case) { |
| 58 FilePath test_path; | 58 FilePath test_path; |
| 59 PathService::Get(base::DIR_SOURCE_ROOT, &test_path); | 59 PathService::Get(base::DIR_SOURCE_ROOT, &test_path); |
| 60 test_path = test_path.Append(FILE_PATH_LITERAL("third_party")); | |
| 61 test_path = test_path.Append(FILE_PATH_LITERAL("ppapi")); | 60 test_path = test_path.Append(FILE_PATH_LITERAL("ppapi")); |
| 62 test_path = test_path.Append(FILE_PATH_LITERAL("tests")); | 61 test_path = test_path.Append(FILE_PATH_LITERAL("tests")); |
| 63 test_path = test_path.Append(FILE_PATH_LITERAL("test_case.html")); | 62 test_path = test_path.Append(FILE_PATH_LITERAL("test_case.html")); |
| 64 | 63 |
| 65 // Sanity check the file name. | 64 // Sanity check the file name. |
| 66 EXPECT_TRUE(file_util::PathExists(test_path)); | 65 EXPECT_TRUE(file_util::PathExists(test_path)); |
| 67 | 66 |
| 68 GURL::Replacements replacements; | 67 GURL::Replacements replacements; |
| 69 replacements.SetQuery(test_case.c_str(), | 68 replacements.SetQuery(test_case.c_str(), |
| 70 url_parse::Component(0, test_case.size())); | 69 url_parse::Component(0, test_case.size())); |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 129 RunTest("UrlUtil"); | 128 RunTest("UrlUtil"); |
| 130 } | 129 } |
| 131 | 130 |
| 132 TEST_F(PPAPITest, CharSet) { | 131 TEST_F(PPAPITest, CharSet) { |
| 133 RunTest("CharSet"); | 132 RunTest("CharSet"); |
| 134 } | 133 } |
| 135 | 134 |
| 136 TEST_F(PPAPITest, Var) { | 135 TEST_F(PPAPITest, Var) { |
| 137 RunTest("Var"); | 136 RunTest("Var"); |
| 138 } | 137 } |
| OLD | NEW |