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 <map> | 5 #include <map> |
6 | 6 |
7 #include "chrome/browser/chrome_notification_types.h" | 7 #include "chrome/browser/chrome_notification_types.h" |
8 #include "chrome/browser/extensions/extension_apitest.h" | 8 #include "chrome/browser/extensions/extension_apitest.h" |
9 #include "chrome/browser/extensions/extension_service.h" | 9 #include "chrome/browser/extensions/extension_service.h" |
10 #include "chrome/browser/extensions/launch_util.h" | 10 #include "chrome/browser/extensions/launch_util.h" |
(...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
316 ASSERT_TRUE(app_browser->is_app()); | 316 ASSERT_TRUE(app_browser->is_app()); |
317 } | 317 } |
318 | 318 |
319 IN_PROC_BROWSER_TEST_F(ExtensionManagementApiTest, LaunchType) { | 319 IN_PROC_BROWSER_TEST_F(ExtensionManagementApiTest, LaunchType) { |
320 LoadExtensions(); | 320 LoadExtensions(); |
321 base::FilePath basedir = test_data_dir_.AppendASCII("management"); | 321 base::FilePath basedir = test_data_dir_.AppendASCII("management"); |
322 LoadNamedExtension(basedir, "packaged_app"); | 322 LoadNamedExtension(basedir, "packaged_app"); |
323 | 323 |
324 ASSERT_TRUE(RunExtensionSubtest("management/test", "launchType.html")); | 324 ASSERT_TRUE(RunExtensionSubtest("management/test", "launchType.html")); |
325 } | 325 } |
326 | |
327 class ExtensionManagementApiStreamlinedAppsTest | |
328 : public ExtensionManagementApiTest { | |
329 public: | |
330 void SetUpCommandLine(CommandLine* command_line) override { | |
331 ExtensionManagementApiTest::SetUpCommandLine(command_line); | |
332 command_line->AppendSwitch(switches::kEnableStreamlinedHostedApps); | |
333 } | |
334 }; | |
335 | |
336 IN_PROC_BROWSER_TEST_F(ExtensionManagementApiStreamlinedAppsTest, LaunchType) { | |
337 LoadExtensions(); | |
338 base::FilePath basedir = test_data_dir_.AppendASCII("management"); | |
339 LoadNamedExtension(basedir, "packaged_app"); | |
340 | |
341 ASSERT_TRUE(RunExtensionSubtest("management/test", | |
342 "launchType.html?streamlined-hosted-apps")); | |
343 } | |
OLD | NEW |