| 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 "base/path_service.h" | 5 #include "base/path_service.h" |
| 6 #include "base/test/test_timeouts.h" | 6 #include "base/test/test_timeouts.h" |
| 7 #include "build/build_config.h" | 7 #include "build/build_config.h" |
| 8 #include "chrome/browser/extensions/extension_browsertest.h" | 8 #include "chrome/browser/extensions/extension_browsertest.h" |
| 9 #include "chrome/browser/profiles/profile.h" | 9 #include "chrome/browser/profiles/profile.h" |
| 10 #include "chrome/browser/ui/browser.h" | 10 #include "chrome/browser/ui/browser.h" |
| 11 #include "chrome/browser/ui/browser_navigator.h" | 11 #include "chrome/browser/ui/browser_navigator.h" |
| 12 #include "chrome/browser/ui/extensions/app_launch_params.h" | 12 #include "chrome/browser/ui/extensions/app_launch_params.h" |
| 13 #include "chrome/browser/ui/extensions/application_launch.h" | 13 #include "chrome/browser/ui/extensions/application_launch.h" |
| 14 #include "chrome/browser/ui/tabs/tab_strip_model.h" | 14 #include "chrome/browser/ui/tabs/tab_strip_model.h" |
| 15 #include "chrome/common/chrome_paths.h" | 15 #include "chrome/common/chrome_paths.h" |
| 16 #include "chrome/test/base/ui_test_utils.h" | 16 #include "chrome/test/base/ui_test_utils.h" |
| 17 #include "chrome/test/nacl/nacl_browsertest_util.h" | 17 #include "chrome/test/nacl/nacl_browsertest_util.h" |
| 18 #include "chrome/test/ppapi/ppapi_test.h" | 18 #include "chrome/test/ppapi/ppapi_test.h" |
| 19 #include "components/content_settings/core/browser/host_content_settings_map.h" | 19 #include "components/content_settings/core/browser/host_content_settings_map.h" |
| 20 #include "components/nacl/common/nacl_switches.h" | 20 #include "components/nacl/common/nacl_switches.h" |
| 21 #include "content/public/browser/web_contents.h" | 21 #include "content/public/browser/web_contents.h" |
| 22 #include "content/public/common/content_switches.h" |
| 22 #include "content/public/common/url_constants.h" | 23 #include "content/public/common/url_constants.h" |
| 23 #include "content/public/test/javascript_test_observer.h" | 24 #include "content/public/test/javascript_test_observer.h" |
| 24 #include "content/public/test/test_renderer_host.h" | 25 #include "content/public/test/test_renderer_host.h" |
| 25 #include "extensions/common/constants.h" | 26 #include "extensions/common/constants.h" |
| 26 #include "extensions/test/extension_test_message_listener.h" | 27 #include "extensions/test/extension_test_message_listener.h" |
| 27 #include "ppapi/shared_impl/test_harness_utils.h" | 28 #include "ppapi/shared_impl/test_harness_utils.h" |
| 28 | 29 |
| 29 using content::RenderViewHost; | 30 using content::RenderViewHost; |
| 30 | 31 |
| 31 // This macro finesses macro expansion to do what we want. | 32 // This macro finesses macro expansion to do what we want. |
| (...skipping 1310 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1342 }; | 1343 }; |
| 1343 | 1344 |
| 1344 // TODO(hidehiko): Switch for NonSfi tests to use nacl_helper_nonsfi, when | 1345 // TODO(hidehiko): Switch for NonSfi tests to use nacl_helper_nonsfi, when |
| 1345 // it is launched officially. See NaClBrowserTestPnaclTransitionalNonSfi | 1346 // it is launched officially. See NaClBrowserTestPnaclTransitionalNonSfi |
| 1346 // for more details. | 1347 // for more details. |
| 1347 class TransitionalNonSfiPackagedAppTest : public NonSfiPackagedAppTest { | 1348 class TransitionalNonSfiPackagedAppTest : public NonSfiPackagedAppTest { |
| 1348 public: | 1349 public: |
| 1349 void SetUpCommandLine(base::CommandLine* command_line) override { | 1350 void SetUpCommandLine(base::CommandLine* command_line) override { |
| 1350 NonSfiPackagedAppTest::SetUpCommandLine(command_line); | 1351 NonSfiPackagedAppTest::SetUpCommandLine(command_line); |
| 1351 command_line->AppendSwitch(switches::kUseNaClHelperNonSfi); | 1352 command_line->AppendSwitch(switches::kUseNaClHelperNonSfi); |
| 1353 // TODO(hidehiko): Remove this flag, when namespace sandbox is supported. |
| 1354 command_line->AppendSwitch(switches::kDisableNamespaceSandbox); |
| 1352 } | 1355 } |
| 1353 }; | 1356 }; |
| 1354 | 1357 |
| 1355 // Load a packaged app, and wait for it to successfully post a "hello" message | 1358 // Load a packaged app, and wait for it to successfully post a "hello" message |
| 1356 // back. | 1359 // back. |
| 1357 IN_PROC_BROWSER_TEST_F(NewlibPackagedAppTest, SuccessfulLoad) { | 1360 IN_PROC_BROWSER_TEST_F(NewlibPackagedAppTest, SuccessfulLoad) { |
| 1358 RunTests("packaged_app"); | 1361 RunTests("packaged_app"); |
| 1359 } | 1362 } |
| 1360 | 1363 |
| 1361 IN_PROC_BROWSER_TEST_F(NonSfiPackagedAppTest, | 1364 IN_PROC_BROWSER_TEST_F(NonSfiPackagedAppTest, |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1419 #endif | 1422 #endif |
| 1420 | 1423 |
| 1421 IN_PROC_BROWSER_TEST_F(MojoPPAPITest, MAYBE_MOJO(Mojo)) { | 1424 IN_PROC_BROWSER_TEST_F(MojoPPAPITest, MAYBE_MOJO(Mojo)) { |
| 1422 RunTest(); | 1425 RunTest(); |
| 1423 } | 1426 } |
| 1424 | 1427 |
| 1425 IN_PROC_BROWSER_TEST_F(MojoPPAPITest, MAYBE_MOJO(MojoFailsWithoutFlag)) { | 1428 IN_PROC_BROWSER_TEST_F(MojoPPAPITest, MAYBE_MOJO(MojoFailsWithoutFlag)) { |
| 1426 RunTestWithoutFlag(); | 1429 RunTestWithoutFlag(); |
| 1427 } | 1430 } |
| 1428 #endif | 1431 #endif |
| OLD | NEW |