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

Unified Diff: chrome/browser/cocoa/content_settings_dialog_controller_unittest.mm

Issue 650124: Mac: Move prefs around in preparation for the content settings window. (Closed)
Patch Set: done? Created 10 years, 10 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
Index: chrome/browser/cocoa/content_settings_dialog_controller_unittest.mm
diff --git a/chrome/browser/cocoa/content_settings_dialog_controller_unittest.mm b/chrome/browser/cocoa/content_settings_dialog_controller_unittest.mm
new file mode 100644
index 0000000000000000000000000000000000000000..91892d2217c12bebaf8af3a3320da291713a5330
--- /dev/null
+++ b/chrome/browser/cocoa/content_settings_dialog_controller_unittest.mm
@@ -0,0 +1,31 @@
+// 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 "base/scoped_nsautorelease_pool.h"
+#include "chrome/browser/cocoa/browser_test_helper.h"
+#include "chrome/browser/cocoa/cocoa_test_helper.h"
+#import "chrome/browser/cocoa/content_settings_dialog_controller.h"
+#include "testing/gtest/include/gtest/gtest.h"
+#include "testing/platform_test.h"
+
+namespace {
+
+class ContentSettingsDialogControllerTest : public CocoaTest {
+ public:
+ BrowserTestHelper browser_helper_;
+};
+
+// Test that +showContentSettingsDialogForProfile brings up the existing editor
+// and doesn't leak or crash.
+TEST_F(ContentSettingsDialogControllerTest, CreateDialog) {
+ Profile* profile(browser_helper_.profile());
+ ContentSettingsDialogController* sharedInstance =
+ [ContentSettingsDialogController
+ showContentSettingsForType:CONTENT_SETTINGS_TYPE_DEFAULT
+ profile:profile];
+ EXPECT_TRUE(sharedInstance);
+ [sharedInstance close];
+}
+
+} // namespace

Powered by Google App Engine
This is Rietveld 408576698