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_MIC || | 64 i == CONTENT_SETTINGS_TYPE_MEDIASTREAM_MIC || |
66 i == CONTENT_SETTINGS_TYPE_MEDIASTREAM_CAMERA || | 65 i == CONTENT_SETTINGS_TYPE_MEDIASTREAM_CAMERA || |
67 i == CONTENT_SETTINGS_TYPE_PPAPI_BROKER) { | 66 i == CONTENT_SETTINGS_TYPE_PPAPI_BROKER) { |
68 // These types have no bubble. | 67 // These types have no bubble. |
69 continue; | 68 continue; |
70 } | 69 } |
71 | 70 |
(...skipping 16 matching lines...) Expand all Loading... |
88 settingsType) | 87 settingsType) |
89 parentWindow:parent | 88 parentWindow:parent |
90 anchoredAt:NSMakePoint(50, 20)]; | 89 anchoredAt:NSMakePoint(50, 20)]; |
91 EXPECT_TRUE(controller != nil); | 90 EXPECT_TRUE(controller != nil); |
92 EXPECT_TRUE([[controller window] isVisible]); | 91 EXPECT_TRUE([[controller window] isVisible]); |
93 [parent close]; | 92 [parent close]; |
94 } | 93 } |
95 } | 94 } |
96 | 95 |
97 } // namespace | 96 } // namespace |
OLD | NEW |