diff options
author | thestig@chromium.org <thestig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-09-24 04:26:50 +0000 |
---|---|---|
committer | thestig@chromium.org <thestig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-09-24 04:26:50 +0000 |
commit | 415471662957f41c3c1d789815703a74039617cb (patch) | |
tree | 6cf3fa395260941b23cb5f0654310b183cd2b4cf /chrome/browser/extensions/extension_apitest.h | |
parent | 3d1df54872badcea24026122d0494fd2a0b30841 (diff) | |
download | chromium_src-415471662957f41c3c1d789815703a74039617cb.zip chromium_src-415471662957f41c3c1d789815703a74039617cb.tar.gz chromium_src-415471662957f41c3c1d789815703a74039617cb.tar.bz2 |
Cleanup: Use std::string in ExtensionApiTest.
Review URL: https://chromiumcodereview.appspot.com/23531076
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@224891 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/extensions/extension_apitest.h')
-rw-r--r-- | chrome/browser/extensions/extension_apitest.h | 27 |
1 files changed, 15 insertions, 12 deletions
diff --git a/chrome/browser/extensions/extension_apitest.h b/chrome/browser/extensions/extension_apitest.h index 12827ad..1e79880 100644 --- a/chrome/browser/extensions/extension_apitest.h +++ b/chrome/browser/extensions/extension_apitest.h @@ -109,37 +109,39 @@ class ExtensionApiTest : public ExtensionBrowserTest { // Load |extension_name| and wait for pass / fail notification. // |extension_name| is a directory in "test/data/extensions/api_test". - bool RunExtensionTest(const char* extension_name); + bool RunExtensionTest(const std::string& extension_name); // Same as RunExtensionTest, but enables the extension for incognito mode. - bool RunExtensionTestIncognito(const char* extension_name); + bool RunExtensionTestIncognito(const std::string& extension_name); // Same as RunExtensionTest, but ignores any warnings in the manifest. - bool RunExtensionTestIgnoreManifestWarnings(const char* extension_name); + bool RunExtensionTestIgnoreManifestWarnings( + const std::string& extension_name); // Same as RunExtensionTest, allow old manifest ersions. - bool RunExtensionTestAllowOldManifestVersion(const char* extension_name); + bool RunExtensionTestAllowOldManifestVersion( + const std::string& extension_name); // Same as RunExtensionTest, but loads extension as component. - bool RunComponentExtensionTest(const char* extension_name); + bool RunComponentExtensionTest(const std::string& extension_name); // Same as RunExtensionTest, but disables file access. - bool RunExtensionTestNoFileAccess(const char* extension_name); + bool RunExtensionTestNoFileAccess(const std::string& extension_name); // Same as RunExtensionTestIncognito, but disables file access. - bool RunExtensionTestIncognitoNoFileAccess(const char* extension_name); + bool RunExtensionTestIncognitoNoFileAccess(const std::string& extension_name); // If not empty, Load |extension_name|, load |page_url| and wait for pass / // fail notification from the extension API on the page. Note that if // |page_url| is not a valid url, it will be treated as a resource within // the extension. |extension_name| is a directory in // "test/data/extensions/api_test". - bool RunExtensionSubtest(const char* extension_name, + bool RunExtensionSubtest(const std::string& extension_name, const std::string& page_url); // Same as RunExtensionSubtest, except run with the specific |flags| // (as defined in the Flags enum). - bool RunExtensionSubtest(const char* extension_name, + bool RunExtensionSubtest(const std::string& extension_name, const std::string& page_url, int flags); @@ -150,11 +152,12 @@ class ExtensionApiTest : public ExtensionBrowserTest { // Similar to RunExtensionTest, except used for running tests in platform app // shell windows. - bool RunPlatformAppTest(const char* extension_name); + bool RunPlatformAppTest(const std::string& extension_name); + // Similar to RunPlatformAppTest, except sets an additional string argument // |customArg| to the test config object. bool RunPlatformAppTestWithArg( - const char* extension_name, const char* custom_arg); + const std::string& extension_name, const char* custom_arg); // Start the test server, and store details of its state. Those details // will be available to javascript tests using chrome.test.getConfig(). @@ -176,7 +179,7 @@ class ExtensionApiTest : public ExtensionBrowserTest { std::string message_; private: - bool RunExtensionTestImpl(const char* extension_name, + bool RunExtensionTestImpl(const std::string& extension_name, const std::string& test_page, const char* custom_arg, int flags); |