| 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
|
|
|