summaryrefslogtreecommitdiffstats
path: root/chrome/browser/host_content_settings_map_unittest.cc
diff options
context:
space:
mode:
authorpkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-02-09 23:25:49 +0000
committerpkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-02-09 23:25:49 +0000
commitda0c8e9e4c51699ef08ee449fe83fc1fb24b773d (patch)
tree671475593d2a739ed91dae72e631173ddd6219eb /chrome/browser/host_content_settings_map_unittest.cc
parent42da24d2930b8c2257f3560366a8eff766d8fb9b (diff)
downloadchromium_src-da0c8e9e4c51699ef08ee449fe83fc1fb24b773d.zip
chromium_src-da0c8e9e4c51699ef08ee449fe83fc1fb24b773d.tar.gz
chromium_src-da0c8e9e4c51699ef08ee449fe83fc1fb24b773d.tar.bz2
Whitelist all content for various internal schemes.
BUG=34805 TEST=New Tab page should still work if you disable script + images Review URL: http://codereview.chromium.org/588011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@38536 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/host_content_settings_map_unittest.cc')
-rw-r--r--chrome/browser/host_content_settings_map_unittest.cc12
1 files changed, 7 insertions, 5 deletions
diff --git a/chrome/browser/host_content_settings_map_unittest.cc b/chrome/browser/host_content_settings_map_unittest.cc
index dade37c..45a03a4 100644
--- a/chrome/browser/host_content_settings_map_unittest.cc
+++ b/chrome/browser/host_content_settings_map_unittest.cc
@@ -6,6 +6,7 @@
#include "chrome/common/notification_registrar.h"
#include "chrome/common/notification_service.h"
+#include "chrome/common/url_constants.h"
#include "chrome/test/testing_profile.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -23,10 +24,9 @@ bool SettingsEqual(const ContentSettings& settings1,
class StubSettingsObserver : public NotificationObserver {
public:
- StubSettingsObserver()
- : last_notifier(NULL), counter(0) {
+ StubSettingsObserver() : last_notifier(NULL), counter(0) {
registrar_.Add(this, NotificationType::CONTENT_SETTINGS_CHANGED,
- NotificationService::AllSources());
+ NotificationService::AllSources());
}
virtual void Observe(NotificationType type,
@@ -53,8 +53,7 @@ class StubSettingsObserver : public NotificationObserver {
class HostContentSettingsMapTest : public testing::Test {
public:
- HostContentSettingsMapTest()
- : ui_thread_(ChromeThread::UI, &message_loop_) {}
+ HostContentSettingsMapTest() : ui_thread_(ChromeThread::UI, &message_loop_) {}
protected:
MessageLoop message_loop_;
@@ -75,6 +74,9 @@ TEST_F(HostContentSettingsMapTest, DefaultValues) {
EXPECT_EQ(CONTENT_SETTING_BLOCK,
host_content_settings_map->GetDefaultContentSetting(
CONTENT_SETTINGS_TYPE_IMAGES));
+ EXPECT_EQ(CONTENT_SETTING_ALLOW, host_content_settings_map->GetContentSetting(
+ GURL(chrome::kChromeUINewTabURL),
+ CONTENT_SETTINGS_TYPE_IMAGES));
host_content_settings_map->SetDefaultContentSetting(
CONTENT_SETTINGS_TYPE_PLUGINS, CONTENT_SETTING_ASK);
EXPECT_EQ(CONTENT_SETTING_ASK,