summaryrefslogtreecommitdiffstats
path: root/chrome/browser/extensions/extension_apitest.h
diff options
context:
space:
mode:
authorjstritar@chromium.org <jstritar@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-01-24 19:33:58 +0000
committerjstritar@chromium.org <jstritar@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-01-24 19:33:58 +0000
commit863e6478377f941f94c6bc0d5efe4b1f1863ecc9 (patch)
tree99ad6557040e587a90277b33170d6df170d22031 /chrome/browser/extensions/extension_apitest.h
parentce6b543d7d95aec9902d0e4e881b017bdf2b9889 (diff)
downloadchromium_src-863e6478377f941f94c6bc0d5efe4b1f1863ecc9.zip
chromium_src-863e6478377f941f94c6bc0d5efe4b1f1863ecc9.tar.gz
chromium_src-863e6478377f941f94c6bc0d5efe4b1f1863ecc9.tar.bz2
Disable modal JavaScript dialogs for platform apps.
- window.alert is silently ignored - window.confirm returns false - window.prompt returns null BUG=none TEST=PlatformAppBrowserTest.DisallowModalDialogs Review URL: https://chromiumcodereview.appspot.com/9195018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@118874 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/extensions/extension_apitest.h')
-rw-r--r--chrome/browser/extensions/extension_apitest.h15
1 files changed, 12 insertions, 3 deletions
diff --git a/chrome/browser/extensions/extension_apitest.h b/chrome/browser/extensions/extension_apitest.h
index d24b5fc..f59b53a 100644
--- a/chrome/browser/extensions/extension_apitest.h
+++ b/chrome/browser/extensions/extension_apitest.h
@@ -114,6 +114,10 @@ class ExtensionApiTest : public ExtensionBrowserTest {
// API on the page.
bool RunPageTest(const std::string& page_url);
+ // Similar to RunExtensionTest, except used for running tests in platform app
+ // shell windows.
+ bool RunPlatformAppTest(const char* extension_name);
+
// Start the test server, and store details of its state. Those details
// will be available to javascript tests using chrome.test.getConfig().
bool StartTestServer();
@@ -129,11 +133,16 @@ class ExtensionApiTest : public ExtensionBrowserTest {
std::string message_;
private:
+ enum Flags {
+ kFlagNone = 0,
+ kFlagEnableIncognito = 1 << 0,
+ kFlagEnableFileAccess = 1 << 1,
+ kFlagLoadAsComponent = 1 << 2,
+ kFlagLaunchAppShell = 1 << 3
+ };
bool RunExtensionTestImpl(const char* extension_name,
const std::string& test_page,
- bool enable_incognito,
- bool enable_fileaccess,
- bool load_as_component);
+ int flags);
// Hold details of the test, set in C++, which can be accessed by
// javascript using chrome.test.getConfig().