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/command_line.h" | 5 #include "base/command_line.h" |
6 #include "base/file_path.h" | 6 #include "base/file_path.h" |
7 #include "base/file_util.h" | 7 #include "base/file_util.h" |
8 #include "base/path_service.h" | 8 #include "base/path_service.h" |
9 #include "chrome/browser/extensions/extension_apitest.h" | 9 #include "chrome/browser/extensions/extension_apitest.h" |
10 #include "chrome/browser/extensions/platform_app_browsertest_util.h" | 10 #include "chrome/browser/extensions/platform_app_browsertest_util.h" |
11 #include "chrome/common/chrome_paths.h" | 11 #include "chrome/common/chrome_paths.h" |
12 #include "chrome/common/chrome_switches.h" | 12 #include "chrome/common/chrome_switches.h" |
13 | 13 |
14 #if defined(OS_LINUX) | 14 #if defined(OS_LINUX) |
15 #include <fstream> | 15 #include <fstream> |
16 | 16 |
17 #include "base/environment.h" | 17 #include "base/environment.h" |
18 #include "base/scoped_temp_dir.h" | 18 #include "base/scoped_temp_dir.h" |
19 #endif | 19 #endif |
20 | 20 |
21 namespace { | 21 namespace { |
22 | 22 |
23 class ExperimentalMediaGalleriesAppBrowserTest : public PlatformAppBrowserTest { | 23 class ExperimentalMediaGalleriesAppBrowserTest |
| 24 : public extensions::PlatformAppBrowserTest { |
24 public: | 25 public: |
25 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE { | 26 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE { |
26 PlatformAppBrowserTest::SetUpCommandLine(command_line); | 27 extensions::PlatformAppBrowserTest::SetUpCommandLine(command_line); |
27 command_line->AppendSwitch(switches::kEnableExperimentalExtensionApis); | 28 command_line->AppendSwitch(switches::kEnableExperimentalExtensionApis); |
28 } | 29 } |
29 }; | 30 }; |
30 | 31 |
31 class ExperimentalMediaGalleriesApiTest : public ExtensionApiTest { | 32 class ExperimentalMediaGalleriesApiTest : public ExtensionApiTest { |
32 public: | 33 public: |
33 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE { | 34 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE { |
34 ExtensionApiTest::SetUpCommandLine(command_line); | 35 ExtensionApiTest::SetUpCommandLine(command_line); |
35 command_line->AppendSwitch(switches::kEnableExperimentalExtensionApis); | 36 command_line->AppendSwitch(switches::kEnableExperimentalExtensionApis); |
36 } | 37 } |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
91 MediaGalleriesNoAccess) { | 92 MediaGalleriesNoAccess) { |
92 EnsurePictureDirectoryExists picture_directory; | 93 EnsurePictureDirectoryExists picture_directory; |
93 ASSERT_TRUE(RunPlatformAppTest("api_test/media_galleries/no_access")) | 94 ASSERT_TRUE(RunPlatformAppTest("api_test/media_galleries/no_access")) |
94 << message_; | 95 << message_; |
95 } | 96 } |
96 | 97 |
97 IN_PROC_BROWSER_TEST_F(ExperimentalMediaGalleriesApiTest, | 98 IN_PROC_BROWSER_TEST_F(ExperimentalMediaGalleriesApiTest, |
98 ExperimentalMediaGalleries) { | 99 ExperimentalMediaGalleries) { |
99 ASSERT_TRUE(RunExtensionTest("media_galleries/experimental")) << message_; | 100 ASSERT_TRUE(RunExtensionTest("media_galleries/experimental")) << message_; |
100 } | 101 } |
OLD | NEW |