OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "apps/app_window.h" | 5 #include "apps/app_window.h" |
6 #include "apps/app_window_registry.h" | 6 #include "apps/app_window_registry.h" |
7 #include "apps/common/api/app_runtime.h" | 7 #include "apps/common/api/app_runtime.h" |
8 #include "apps/launcher.h" | 8 #include "apps/launcher.h" |
9 #include "apps/ui/native_app_window.h" | 9 #include "apps/ui/native_app_window.h" |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 528 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
539 } | 539 } |
540 } | 540 } |
541 | 541 |
542 // Tests that launch data is sent through if the file extension matches. | 542 // Tests that launch data is sent through if the file extension matches. |
543 IN_PROC_BROWSER_TEST_F(PlatformAppBrowserTest, LaunchWithFileExtension) { | 543 IN_PROC_BROWSER_TEST_F(PlatformAppBrowserTest, LaunchWithFileExtension) { |
544 SetCommandLineArg(kTestFilePath); | 544 SetCommandLineArg(kTestFilePath); |
545 ASSERT_TRUE(RunPlatformAppTest("platform_apps/launch_file_by_extension")) | 545 ASSERT_TRUE(RunPlatformAppTest("platform_apps/launch_file_by_extension")) |
546 << message_; | 546 << message_; |
547 } | 547 } |
548 | 548 |
| 549 // Tests that launch data is sent through to a whitelisted extension if the file |
| 550 // extension matches. |
| 551 IN_PROC_BROWSER_TEST_F(PlatformAppBrowserTest, |
| 552 LaunchWhiteListedExtensionWithFile) { |
| 553 SetCommandLineArg(kTestFilePath); |
| 554 ASSERT_TRUE(RunPlatformAppTest( |
| 555 "platform_apps/launch_whitelisted_ext_with_file")) |
| 556 << message_; |
| 557 } |
| 558 |
549 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) && defined(USE_AURA) | 559 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) && defined(USE_AURA) |
550 // TODO(erg): linux_aura bringup: http://crbug.com/163931 | 560 // TODO(erg): linux_aura bringup: http://crbug.com/163931 |
551 #define MAYBE_LaunchWithFileExtensionAndMimeType DISABLED_LaunchWithFileExtensio
nAndMimeType | 561 #define MAYBE_LaunchWithFileExtensionAndMimeType DISABLED_LaunchWithFileExtensio
nAndMimeType |
552 #else | 562 #else |
553 #define MAYBE_LaunchWithFileExtensionAndMimeType LaunchWithFileExtensionAndMimeT
ype | 563 #define MAYBE_LaunchWithFileExtensionAndMimeType LaunchWithFileExtensionAndMimeT
ype |
554 #endif | 564 #endif |
555 | 565 |
556 // Tests that launch data is sent through if the file extension and MIME type | 566 // Tests that launch data is sent through if the file extension and MIME type |
557 // both match. | 567 // both match. |
558 IN_PROC_BROWSER_TEST_F(PlatformAppBrowserTest, | 568 IN_PROC_BROWSER_TEST_F(PlatformAppBrowserTest, |
(...skipping 772 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1331 | 1341 |
1332 ExtensionApiTest::ResultCatcher result_catcher; | 1342 ExtensionApiTest::ResultCatcher result_catcher; |
1333 | 1343 |
1334 ASSERT_TRUE(launched_listener.WaitUntilSatisfied()); | 1344 ASSERT_TRUE(launched_listener.WaitUntilSatisfied()); |
1335 | 1345 |
1336 EXPECT_TRUE(result_catcher.GetNextResult()); | 1346 EXPECT_TRUE(result_catcher.GetNextResult()); |
1337 } | 1347 } |
1338 } | 1348 } |
1339 | 1349 |
1340 } // namespace extensions | 1350 } // namespace extensions |
OLD | NEW |