| 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 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 124 | 124 |
| 125 // The test sends us the result via a cookie. | 125 // The test sends us the result via a cookie. |
| 126 command_line->AppendSwitch(switches::kEnableFileCookies); | 126 command_line->AppendSwitch(switches::kEnableFileCookies); |
| 127 | 127 |
| 128 // Some stuff is hung off of the testing interface which is not enabled | 128 // Some stuff is hung off of the testing interface which is not enabled |
| 129 // by default. | 129 // by default. |
| 130 command_line->AppendSwitch(switches::kEnablePepperTesting); | 130 command_line->AppendSwitch(switches::kEnablePepperTesting); |
| 131 | 131 |
| 132 // Smooth scrolling confuses the scrollbar test. | 132 // Smooth scrolling confuses the scrollbar test. |
| 133 command_line->AppendSwitch(switches::kDisableSmoothScrolling); | 133 command_line->AppendSwitch(switches::kDisableSmoothScrolling); |
| 134 |
| 135 // For TestGetOSFileHandle. |
| 136 command_line->AppendSwitchASCII(switches::kAllowGetOSFileHandleAPI, |
| 137 "127.0.0.1"); |
| 134 } | 138 } |
| 135 | 139 |
| 136 void PPAPITestBase::SetUpOnMainThread() { | 140 void PPAPITestBase::SetUpOnMainThread() { |
| 137 // Always allow access to the PPAPI broker. | 141 // Always allow access to the PPAPI broker. |
| 138 browser()->profile()->GetHostContentSettingsMap()->SetDefaultContentSetting( | 142 browser()->profile()->GetHostContentSettingsMap()->SetDefaultContentSetting( |
| 139 CONTENT_SETTINGS_TYPE_PPAPI_BROKER, CONTENT_SETTING_ALLOW); | 143 CONTENT_SETTINGS_TYPE_PPAPI_BROKER, CONTENT_SETTING_ALLOW); |
| 140 } | 144 } |
| 141 | 145 |
| 142 GURL PPAPITestBase::GetTestFileUrl(const std::string& test_case) { | 146 GURL PPAPITestBase::GetTestFileUrl(const std::string& test_case) { |
| 143 base::FilePath test_path; | 147 base::FilePath test_path; |
| (...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 365 const std::string& base, | 369 const std::string& base, |
| 366 const std::string& test_case) { | 370 const std::string& test_case) { |
| 367 return base::StringPrintf("%smode=nacl_newlib&testcase=%s", base.c_str(), | 371 return base::StringPrintf("%smode=nacl_newlib&testcase=%s", base.c_str(), |
| 368 test_case.c_str()); | 372 test_case.c_str()); |
| 369 } | 373 } |
| 370 | 374 |
| 371 void PPAPIBrokerInfoBarTest::SetUpOnMainThread() { | 375 void PPAPIBrokerInfoBarTest::SetUpOnMainThread() { |
| 372 // The default content setting for the PPAPI broker is ASK. We purposefully | 376 // The default content setting for the PPAPI broker is ASK. We purposefully |
| 373 // don't call PPAPITestBase::SetUpOnMainThread() to keep it that way. | 377 // don't call PPAPITestBase::SetUpOnMainThread() to keep it that way. |
| 374 } | 378 } |
| OLD | NEW |