OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "content/test/ppapi/ppapi_test.h" | 5 #include "content/test/ppapi/ppapi_test.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/file_util.h" | 8 #include "base/file_util.h" |
9 #include "base/files/file_path.h" | 9 #include "base/files/file_path.h" |
10 #include "base/path_service.h" | 10 #include "base/path_service.h" |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 void PPAPITestBase::SetUpCommandLine(base::CommandLine* command_line) { | 42 void PPAPITestBase::SetUpCommandLine(base::CommandLine* command_line) { |
43 // The test sends us the result via a cookie. | 43 // The test sends us the result via a cookie. |
44 command_line->AppendSwitch(switches::kEnableFileCookies); | 44 command_line->AppendSwitch(switches::kEnableFileCookies); |
45 | 45 |
46 // Some stuff is hung off of the testing interface which is not enabled | 46 // Some stuff is hung off of the testing interface which is not enabled |
47 // by default. | 47 // by default. |
48 command_line->AppendSwitch(switches::kEnablePepperTesting); | 48 command_line->AppendSwitch(switches::kEnablePepperTesting); |
49 | 49 |
50 // Smooth scrolling confuses the scrollbar test. | 50 // Smooth scrolling confuses the scrollbar test. |
51 command_line->AppendSwitch(switches::kDisableSmoothScrolling); | 51 command_line->AppendSwitch(switches::kDisableSmoothScrolling); |
| 52 |
| 53 // Allow manual garbage collection. |
| 54 command_line->AppendSwitchASCII(switches::kJavaScriptFlags, "--expose_gc"); |
52 } | 55 } |
53 | 56 |
54 GURL PPAPITestBase::GetTestFileUrl(const std::string& test_case) { | 57 GURL PPAPITestBase::GetTestFileUrl(const std::string& test_case) { |
55 base::FilePath test_path; | 58 base::FilePath test_path; |
56 EXPECT_TRUE(PathService::Get(base::DIR_SOURCE_ROOT, &test_path)); | 59 EXPECT_TRUE(PathService::Get(base::DIR_SOURCE_ROOT, &test_path)); |
57 test_path = test_path.Append(FILE_PATH_LITERAL("ppapi")); | 60 test_path = test_path.Append(FILE_PATH_LITERAL("ppapi")); |
58 test_path = test_path.Append(FILE_PATH_LITERAL("tests")); | 61 test_path = test_path.Append(FILE_PATH_LITERAL("tests")); |
59 test_path = test_path.Append(FILE_PATH_LITERAL("test_case.html")); | 62 test_path = test_path.Append(FILE_PATH_LITERAL("test_case.html")); |
60 | 63 |
61 // Sanity check the file name. | 64 // Sanity check the file name. |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
120 std::string PPAPITest::BuildQuery(const std::string& base, | 123 std::string PPAPITest::BuildQuery(const std::string& base, |
121 const std::string& test_case){ | 124 const std::string& test_case){ |
122 return base::StringPrintf("%stestcase=%s", base.c_str(), test_case.c_str()); | 125 return base::StringPrintf("%stestcase=%s", base.c_str(), test_case.c_str()); |
123 } | 126 } |
124 | 127 |
125 OutOfProcessPPAPITest::OutOfProcessPPAPITest() { | 128 OutOfProcessPPAPITest::OutOfProcessPPAPITest() { |
126 in_process_ = false; | 129 in_process_ = false; |
127 } | 130 } |
128 | 131 |
129 } // namespace content | 132 } // namespace content |
OLD | NEW |