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 <stddef.h> | 5 #include <stddef.h> |
6 | 6 |
7 #include "base/macros.h" | 7 #include "base/macros.h" |
8 #include "base/path_service.h" | 8 #include "base/path_service.h" |
9 #include "base/test/test_timeouts.h" | 9 #include "base/test/test_timeouts.h" |
| 10 #include "base/threading/thread_restrictions.h" |
10 #include "build/build_config.h" | 11 #include "build/build_config.h" |
11 #include "chrome/browser/content_settings/host_content_settings_map_factory.h" | 12 #include "chrome/browser/content_settings/host_content_settings_map_factory.h" |
12 #include "chrome/browser/extensions/extension_browsertest.h" | 13 #include "chrome/browser/extensions/extension_browsertest.h" |
13 #include "chrome/browser/profiles/profile.h" | 14 #include "chrome/browser/profiles/profile.h" |
14 #include "chrome/browser/ui/browser.h" | 15 #include "chrome/browser/ui/browser.h" |
15 #include "chrome/browser/ui/browser_navigator_params.h" | 16 #include "chrome/browser/ui/browser_navigator_params.h" |
16 #include "chrome/browser/ui/extensions/app_launch_params.h" | 17 #include "chrome/browser/ui/extensions/app_launch_params.h" |
17 #include "chrome/browser/ui/extensions/application_launch.h" | 18 #include "chrome/browser/ui/extensions/application_launch.h" |
18 #include "chrome/browser/ui/tabs/tab_strip_model.h" | 19 #include "chrome/browser/ui/tabs/tab_strip_model.h" |
19 #include "chrome/common/chrome_paths.h" | 20 #include "chrome/common/chrome_paths.h" |
(...skipping 1232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1252 #endif | 1253 #endif |
1253 | 1254 |
1254 #if !defined(DISABLE_NACL) | 1255 #if !defined(DISABLE_NACL) |
1255 class PackagedAppTest : public ExtensionBrowserTest { | 1256 class PackagedAppTest : public ExtensionBrowserTest { |
1256 public: | 1257 public: |
1257 explicit PackagedAppTest(const std::string& toolchain) | 1258 explicit PackagedAppTest(const std::string& toolchain) |
1258 : toolchain_(toolchain) { } | 1259 : toolchain_(toolchain) { } |
1259 | 1260 |
1260 void LaunchTestingApp(const std::string& extension_dirname) { | 1261 void LaunchTestingApp(const std::string& extension_dirname) { |
1261 base::FilePath data_dir; | 1262 base::FilePath data_dir; |
1262 ASSERT_TRUE(PathService::Get(chrome::DIR_GEN_TEST_DATA, &data_dir)); | 1263 { |
| 1264 base::ThreadRestrictions::ScopedAllowIO allow_io; |
| 1265 ASSERT_TRUE(PathService::Get(chrome::DIR_GEN_TEST_DATA, &data_dir)); |
| 1266 } |
1263 base::FilePath app_dir = data_dir.AppendASCII("ppapi") | 1267 base::FilePath app_dir = data_dir.AppendASCII("ppapi") |
1264 .AppendASCII("tests") | 1268 .AppendASCII("tests") |
1265 .AppendASCII("extensions") | 1269 .AppendASCII("extensions") |
1266 .AppendASCII(extension_dirname) | 1270 .AppendASCII(extension_dirname) |
1267 .AppendASCII(toolchain_); | 1271 .AppendASCII(toolchain_); |
1268 | 1272 |
1269 const extensions::Extension* extension = LoadExtension(app_dir); | 1273 const extensions::Extension* extension = LoadExtension(app_dir); |
1270 ASSERT_TRUE(extension); | 1274 ASSERT_TRUE(extension); |
1271 | 1275 |
1272 AppLaunchParams params( | 1276 AppLaunchParams params( |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1333 MAYBE_PPAPI_NACL(NoSocketPermissions)) { | 1337 MAYBE_PPAPI_NACL(NoSocketPermissions)) { |
1334 RunTests("no_socket_permissions"); | 1338 RunTests("no_socket_permissions"); |
1335 } | 1339 } |
1336 | 1340 |
1337 IN_PROC_BROWSER_TEST_F(NewlibPackagedAppTest, | 1341 IN_PROC_BROWSER_TEST_F(NewlibPackagedAppTest, |
1338 MAYBE_PPAPI_NACL(SocketPermissions)) { | 1342 MAYBE_PPAPI_NACL(SocketPermissions)) { |
1339 RunTests("socket_permissions"); | 1343 RunTests("socket_permissions"); |
1340 } | 1344 } |
1341 | 1345 |
1342 #endif | 1346 #endif |
OLD | NEW |