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/ppapi/ppapi_test.h" | 5 #include "chrome/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/logging.h" | 9 #include "base/logging.h" |
10 #include "base/path_service.h" | 10 #include "base/path_service.h" |
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
125 | 125 |
126 // The test sends us the result via a cookie. | 126 // The test sends us the result via a cookie. |
127 command_line->AppendSwitch(switches::kEnableFileCookies); | 127 command_line->AppendSwitch(switches::kEnableFileCookies); |
128 | 128 |
129 // Some stuff is hung off of the testing interface which is not enabled | 129 // Some stuff is hung off of the testing interface which is not enabled |
130 // by default. | 130 // by default. |
131 command_line->AppendSwitch(switches::kEnablePepperTesting); | 131 command_line->AppendSwitch(switches::kEnablePepperTesting); |
132 | 132 |
133 // Smooth scrolling confuses the scrollbar test. | 133 // Smooth scrolling confuses the scrollbar test. |
134 command_line->AppendSwitch(switches::kDisableSmoothScrolling); | 134 command_line->AppendSwitch(switches::kDisableSmoothScrolling); |
135 | |
136 // Enable threading since we test that feature. | |
137 command_line->AppendSwitch(switches::kEnablePepperThreading); | |
138 } | 135 } |
139 | 136 |
140 void PPAPITestBase::SetUpOnMainThread() { | 137 void PPAPITestBase::SetUpOnMainThread() { |
141 // Always allow access to the PPAPI broker. | 138 // Always allow access to the PPAPI broker. |
142 browser()->profile()->GetHostContentSettingsMap()->SetDefaultContentSetting( | 139 browser()->profile()->GetHostContentSettingsMap()->SetDefaultContentSetting( |
143 CONTENT_SETTINGS_TYPE_PPAPI_BROKER, CONTENT_SETTING_ALLOW); | 140 CONTENT_SETTINGS_TYPE_PPAPI_BROKER, CONTENT_SETTING_ALLOW); |
144 } | 141 } |
145 | 142 |
146 GURL PPAPITestBase::GetTestFileUrl(const std::string& test_case) { | 143 GURL PPAPITestBase::GetTestFileUrl(const std::string& test_case) { |
147 FilePath test_path; | 144 FilePath test_path; |
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
334 const std::string& base, | 331 const std::string& base, |
335 const std::string& test_case) { | 332 const std::string& test_case) { |
336 return StringPrintf("%smode=nacl_newlib&testcase=%s", base.c_str(), | 333 return StringPrintf("%smode=nacl_newlib&testcase=%s", base.c_str(), |
337 test_case.c_str()); | 334 test_case.c_str()); |
338 } | 335 } |
339 | 336 |
340 void PPAPIBrokerInfoBarTest::SetUpOnMainThread() { | 337 void PPAPIBrokerInfoBarTest::SetUpOnMainThread() { |
341 // The default content setting for the PPAPI broker is ASK. We purposefully | 338 // The default content setting for the PPAPI broker is ASK. We purposefully |
342 // don't call PPAPITestBase::SetUpOnMainThread() to keep it that way. | 339 // don't call PPAPITestBase::SetUpOnMainThread() to keep it that way. |
343 } | 340 } |
OLD | NEW |