Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3855)

Unified Diff: chrome/browser/content_exceptions_table_model_unittest.cc

Issue 3446013: Refcount the host content settings map from the content exceptions table model. (Closed)
Patch Set: updates Created 10 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/content_exceptions_table_model.h ('k') | chrome/browser/host_content_settings_map.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/content_exceptions_table_model_unittest.cc
diff --git a/chrome/browser/content_exceptions_table_model_unittest.cc b/chrome/browser/content_exceptions_table_model_unittest.cc
new file mode 100644
index 0000000000000000000000000000000000000000..646ab9ede5eb0fc4d5e02db3a6ffbc1f4f039a16
--- /dev/null
+++ b/chrome/browser/content_exceptions_table_model_unittest.cc
@@ -0,0 +1,34 @@
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "chrome/browser/content_exceptions_table_model.h"
+
+#include "chrome/test/testing_profile.h"
+#include "testing/gtest/include/gtest/gtest.h"
+
+namespace {
+
+class ContentExceptionsTableModelTest : public testing::Test {
+ public:
+ ContentExceptionsTableModelTest()
+ : ui_thread_(ChromeThread::UI, &message_loop_) {}
+
+ protected:
+ MessageLoop message_loop_;
+ ChromeThread ui_thread_;
+};
+
+TEST_F(ContentExceptionsTableModelTest, Incognito) {
+ TestingProfile profile;
+ TestingProfile* otr_profile = new TestingProfile();
+ otr_profile->set_off_the_record(true);
+ ContentExceptionsTableModel model(profile.GetHostContentSettingsMap(),
+ otr_profile->GetHostContentSettingsMap(),
+ CONTENT_SETTINGS_TYPE_COOKIES);
+ delete otr_profile;
+ model.AddException(HostContentSettingsMap::Pattern("example.com"),
+ CONTENT_SETTING_BLOCK, true);
+}
+
+} // namespace
« no previous file with comments | « chrome/browser/content_exceptions_table_model.h ('k') | chrome/browser/host_content_settings_map.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698