OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #import "chrome/browser/ui/cocoa/content_settings/content_setting_bubble_cocoa.h
" | 5 #import "chrome/browser/ui/cocoa/content_settings/content_setting_bubble_cocoa.h
" |
6 | 6 |
7 #import <Cocoa/Cocoa.h> | 7 #import <Cocoa/Cocoa.h> |
8 | 8 |
9 #include "base/debug/debugger.h" | 9 #include "base/debug/debugger.h" |
10 #include "base/mac/scoped_nsautorelease_pool.h" | 10 #include "base/mac/scoped_nsautorelease_pool.h" |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
51 browser_thread_(BrowserThread::UI, &message_loop_) { | 51 browser_thread_(BrowserThread::UI, &message_loop_) { |
52 } | 52 } |
53 | 53 |
54 ContentSettingBubbleControllerTest::~ContentSettingBubbleControllerTest() { | 54 ContentSettingBubbleControllerTest::~ContentSettingBubbleControllerTest() { |
55 } | 55 } |
56 | 56 |
57 // Check that the bubble doesn't crash or leak for any settings type | 57 // Check that the bubble doesn't crash or leak for any settings type |
58 TEST_F(ContentSettingBubbleControllerTest, Init) { | 58 TEST_F(ContentSettingBubbleControllerTest, Init) { |
59 for (int i = 0; i < CONTENT_SETTINGS_NUM_TYPES; ++i) { | 59 for (int i = 0; i < CONTENT_SETTINGS_NUM_TYPES; ++i) { |
60 if (i == CONTENT_SETTINGS_TYPE_NOTIFICATIONS || | 60 if (i == CONTENT_SETTINGS_TYPE_NOTIFICATIONS || |
61 i == CONTENT_SETTINGS_TYPE_INTENTS || | |
62 i == CONTENT_SETTINGS_TYPE_AUTO_SELECT_CERTIFICATE || | 61 i == CONTENT_SETTINGS_TYPE_AUTO_SELECT_CERTIFICATE || |
63 i == CONTENT_SETTINGS_TYPE_FULLSCREEN || | 62 i == CONTENT_SETTINGS_TYPE_FULLSCREEN || |
64 i == CONTENT_SETTINGS_TYPE_MOUSELOCK || | 63 i == CONTENT_SETTINGS_TYPE_MOUSELOCK || |
65 i == CONTENT_SETTINGS_TYPE_MEDIASTREAM || | 64 i == CONTENT_SETTINGS_TYPE_MEDIASTREAM || |
66 i == CONTENT_SETTINGS_TYPE_MEDIASTREAM_MIC || | 65 i == CONTENT_SETTINGS_TYPE_MEDIASTREAM_MIC || |
67 i == CONTENT_SETTINGS_TYPE_MEDIASTREAM_CAMERA || | 66 i == CONTENT_SETTINGS_TYPE_MEDIASTREAM_CAMERA || |
68 i == CONTENT_SETTINGS_TYPE_PPAPI_BROKER) { | 67 i == CONTENT_SETTINGS_TYPE_PPAPI_BROKER) { |
69 // These types have no bubble. | 68 // These types have no bubble. |
70 continue; | 69 continue; |
71 } | 70 } |
(...skipping 17 matching lines...) Expand all Loading... |
89 settingsType) | 88 settingsType) |
90 parentWindow:parent | 89 parentWindow:parent |
91 anchoredAt:NSMakePoint(50, 20)]; | 90 anchoredAt:NSMakePoint(50, 20)]; |
92 EXPECT_TRUE(controller != nil); | 91 EXPECT_TRUE(controller != nil); |
93 EXPECT_TRUE([[controller window] isVisible]); | 92 EXPECT_TRUE([[controller window] isVisible]); |
94 [parent.get() close]; | 93 [parent.get() close]; |
95 } | 94 } |
96 } | 95 } |
97 | 96 |
98 } // namespace | 97 } // namespace |
OLD | NEW |