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