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

Side by Side Diff: chrome/browser/ui/cocoa/content_settings/content_setting_bubble_cocoa_unittest.mm

Issue 10537099: add "always allow" option to the mediastream infobar and allow user to allow/not allow acces to devi (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: addressed sky's comment and replaced "Do not allow any site to" with "Do not allow sites to" Created 8 years, 6 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 || 61 i == CONTENT_SETTINGS_TYPE_INTENTS ||
62 i == CONTENT_SETTINGS_TYPE_AUTO_SELECT_CERTIFICATE || 62 i == CONTENT_SETTINGS_TYPE_AUTO_SELECT_CERTIFICATE ||
63 i == CONTENT_SETTINGS_TYPE_FULLSCREEN || 63 i == CONTENT_SETTINGS_TYPE_FULLSCREEN ||
64 i == CONTENT_SETTINGS_TYPE_MOUSELOCK) { 64 i == CONTENT_SETTINGS_TYPE_MOUSELOCK ||
65 i == CONTENT_SETTINGS_TYPE_MEDIASTREAM) {
65 // These types have no bubble. 66 // These types have no bubble.
66 continue; 67 continue;
67 } 68 }
68 69
69 ContentSettingsType settingsType = static_cast<ContentSettingsType>(i); 70 ContentSettingsType settingsType = static_cast<ContentSettingsType>(i);
70 71
71 scoped_nsobject<NSWindow> parent([[NSWindow alloc] 72 scoped_nsobject<NSWindow> parent([[NSWindow alloc]
72 initWithContentRect:NSMakeRect(0, 0, 800, 600) 73 initWithContentRect:NSMakeRect(0, 0, 800, 600)
73 styleMask:NSBorderlessWindowMask 74 styleMask:NSBorderlessWindowMask
74 backing:NSBackingStoreBuffered 75 backing:NSBackingStoreBuffered
(...skipping 10 matching lines...) Expand all
85 settingsType) 86 settingsType)
86 parentWindow:parent 87 parentWindow:parent
87 anchoredAt:NSMakePoint(50, 20)]; 88 anchoredAt:NSMakePoint(50, 20)];
88 EXPECT_TRUE(controller != nil); 89 EXPECT_TRUE(controller != nil);
89 EXPECT_TRUE([[controller window] isVisible]); 90 EXPECT_TRUE([[controller window] isVisible]);
90 [parent.get() close]; 91 [parent.get() close];
91 } 92 }
92 } 93 }
93 94
94 } // namespace 95 } // namespace
OLDNEW
« no previous file with comments | « chrome/browser/ui/browser.cc ('k') | chrome/browser/ui/cocoa/infobars/media_stream_infobar_controller.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698