| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #ifndef CHROME_BROWSER_APPS_EPHEMERAL_APP_BROWSERTEST_H_ | 5 #ifndef CHROME_BROWSER_APPS_EPHEMERAL_APP_BROWSERTEST_H_ |
| 6 #define CHROME_BROWSER_APPS_EPHEMERAL_APP_BROWSERTEST_H_ | 6 #define CHROME_BROWSER_APPS_EPHEMERAL_APP_BROWSERTEST_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
| 11 #include "chrome/browser/apps/app_browsertest_util.h" | 11 #include "chrome/browser/apps/app_browsertest_util.h" |
| 12 #include "extensions/common/manifest.h" | 12 #include "extensions/common/manifest.h" |
| 13 | 13 |
| 14 namespace base { | 14 namespace base { |
| 15 class CommandLine; | 15 class CommandLine; |
| 16 } | 16 } |
| 17 | 17 |
| 18 // Contains common code for ephemeral app browser tests. | 18 // Contains common code for ephemeral app browser tests. |
| 19 class EphemeralAppTestBase : public extensions::PlatformAppBrowserTest { | 19 class EphemeralAppTestBase : public extensions::PlatformAppBrowserTest { |
| 20 public: | 20 public: |
| 21 static const char kMessagingReceiverApp[]; | 21 static const char kMessagingReceiverApp[]; |
| 22 static const char kMessagingReceiverAppV2[]; | 22 static const char kMessagingReceiverAppV2[]; |
| 23 static const char kDispatchEventTestApp[]; |
| 23 | 24 |
| 24 EphemeralAppTestBase(); | 25 EphemeralAppTestBase(); |
| 25 virtual ~EphemeralAppTestBase(); | 26 virtual ~EphemeralAppTestBase(); |
| 26 | 27 |
| 27 virtual void SetUpCommandLine(base::CommandLine* command_line) OVERRIDE; | 28 virtual void SetUpCommandLine(base::CommandLine* command_line) OVERRIDE; |
| 28 | 29 |
| 29 protected: | 30 protected: |
| 30 base::FilePath GetTestPath(const char* test_path); | 31 base::FilePath GetTestPath(const char* test_path); |
| 31 | 32 |
| 32 const extensions::Extension* InstallEphemeralApp( | 33 const extensions::Extension* InstallEphemeralApp( |
| 33 const char* test_path, extensions::Manifest::Location manifest_location); | 34 const char* test_path, extensions::Manifest::Location manifest_location); |
| 34 const extensions::Extension* InstallEphemeralApp(const char* test_path); | 35 const extensions::Extension* InstallEphemeralApp(const char* test_path); |
| 35 const extensions::Extension* InstallAndLaunchEphemeralApp( | 36 const extensions::Extension* InstallAndLaunchEphemeralApp( |
| 36 const char* test_path); | 37 const char* test_path); |
| 37 const extensions::Extension* UpdateEphemeralApp( | 38 const extensions::Extension* UpdateEphemeralApp( |
| 38 const std::string& app_id, | 39 const std::string& app_id, |
| 39 const base::FilePath& test_dir, | 40 const base::FilePath& test_dir, |
| 40 const base::FilePath& pem_path); | 41 const base::FilePath& pem_path); |
| 41 void PromoteEphemeralApp(const extensions::Extension* app); | 42 void PromoteEphemeralApp(const extensions::Extension* app); |
| 42 | 43 |
| 43 void CloseApp(const std::string& app_id); | 44 void CloseApp(const std::string& app_id); |
| 44 void EvictApp(const std::string& app_id); | 45 void EvictApp(const std::string& app_id); |
| 45 }; | 46 }; |
| 46 | 47 |
| 47 #endif // CHROME_BROWSER_APPS_EPHEMERAL_APP_BROWSERTEST_H_ | 48 #endif // CHROME_BROWSER_APPS_EPHEMERAL_APP_BROWSERTEST_H_ |
| OLD | NEW |