| OLD | NEW |
| (Empty) | |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "base/scoped_nsautorelease_pool.h" |
| 6 #include "chrome/browser/cocoa/browser_test_helper.h" |
| 7 #include "chrome/browser/cocoa/cocoa_test_helper.h" |
| 8 #import "chrome/browser/cocoa/content_settings_dialog_controller.h" |
| 9 #include "testing/gtest/include/gtest/gtest.h" |
| 10 #include "testing/platform_test.h" |
| 11 |
| 12 namespace { |
| 13 |
| 14 class ContentSettingsDialogControllerTest : public CocoaTest { |
| 15 public: |
| 16 BrowserTestHelper browser_helper_; |
| 17 }; |
| 18 |
| 19 // Test that +showContentSettingsDialogForProfile brings up the existing editor |
| 20 // and doesn't leak or crash. |
| 21 TEST_F(ContentSettingsDialogControllerTest, CreateDialog) { |
| 22 Profile* profile(browser_helper_.profile()); |
| 23 ContentSettingsDialogController* sharedInstance = |
| 24 [ContentSettingsDialogController |
| 25 showContentSettingsForType:CONTENT_SETTINGS_TYPE_DEFAULT |
| 26 profile:profile]; |
| 27 EXPECT_TRUE(sharedInstance); |
| 28 [sharedInstance close]; |
| 29 } |
| 30 |
| 31 } // namespace |
| OLD | NEW |