summaryrefslogtreecommitdiffstats
path: root/chrome/browser/extensions/notifications_apitest.cc
diff options
context:
space:
mode:
authorfinnur@chromium.org <finnur@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-09-19 20:10:37 +0000
committerfinnur@chromium.org <finnur@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-09-19 20:10:37 +0000
commitdd86ba3021d6a074bebb29b5c6b7f9a71c9054ec (patch)
tree4203e5be285d6a9ecb941838934dfca48026fd48 /chrome/browser/extensions/notifications_apitest.cc
parent030a56a592f60f718c45b4b053e91ed5047b2f91 (diff)
downloadchromium_src-dd86ba3021d6a074bebb29b5c6b7f9a71c9054ec.zip
chromium_src-dd86ba3021d6a074bebb29b5c6b7f9a71c9054ec.tar.gz
chromium_src-dd86ba3021d6a074bebb29b5c6b7f9a71c9054ec.tar.bz2
Redirect chrome://extensions to the new chrome://settings/extensions (attempt 3).
I split up an API test because it times out (it is doing too much). The other two modifications to the tests were needed because they were trying to open chrome://extensions in incognito. In one case, the test just needed any page (so I switched to about:blank) and in the other we are testing for a condition that cannot happen anymorebecause chrome://extensions could be loaded in incognito but chrome://settingsdoesn't allow that -- it shunts the request to the non-incognito profile. The test was testing that we don't crash in incognito, so I removed that test. Also change the URL for the Extension Settings page fromchrome://settings/extensionSettings -> chrome://settings/extensions. BUG=87377, 96836 TEST=Well... type in chrome://extensions and notice it redirects. TEST=chrome://settings/extensions (or chrome://extensions) should take you to the extension settings page, and chrome://settings/extensionSettings should not. Review URL: http://codereview.chromium.org/7918019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@101804 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/extensions/notifications_apitest.cc')
-rw-r--r--chrome/browser/extensions/notifications_apitest.cc16
1 files changed, 15 insertions, 1 deletions
diff --git a/chrome/browser/extensions/notifications_apitest.cc b/chrome/browser/extensions/notifications_apitest.cc
index 61b4be9..da134b12 100644
--- a/chrome/browser/extensions/notifications_apitest.cc
+++ b/chrome/browser/extensions/notifications_apitest.cc
@@ -9,13 +9,27 @@
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/browser.h"
-IN_PROC_BROWSER_TEST_F(ExtensionApiTest, Notifications) {
+IN_PROC_BROWSER_TEST_F(ExtensionApiTest, NotificationsNoPermission) {
#if defined(OS_LINUX) && defined(TOOLKIT_VIEWS)
// Notifications not supported on linux/views yet.
#else
ASSERT_TRUE(RunExtensionTest("notifications/has_not_permission")) << message_;
+#endif
+}
+
+IN_PROC_BROWSER_TEST_F(ExtensionApiTest, NotificationsHasPermissionManifest) {
+#if defined(OS_LINUX) && defined(TOOLKIT_VIEWS)
+ // Notifications not supported on linux/views yet.
+#else
ASSERT_TRUE(RunExtensionTest("notifications/has_permission_manifest"))
<< message_;
+#endif
+}
+
+IN_PROC_BROWSER_TEST_F(ExtensionApiTest, NotificationsHasPermission) {
+#if defined(OS_LINUX) && defined(TOOLKIT_VIEWS)
+ // Notifications not supported on linux/views yet.
+#else
DesktopNotificationServiceFactory::GetForProfile(browser()->profile())
->GrantPermission(GURL(
"chrome-extension://peoadpeiejnhkmpaakpnompolbglelel"));