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

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

Issue 7740044: Implement fullscreen info bubble on Win and Mac (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix license Created 9 years, 2 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 } 50 }
51 51
52 ContentSettingBubbleControllerTest::~ContentSettingBubbleControllerTest() { 52 ContentSettingBubbleControllerTest::~ContentSettingBubbleControllerTest() {
53 } 53 }
54 54
55 // Check that the bubble doesn't crash or leak for any settings type 55 // Check that the bubble doesn't crash or leak for any settings type
56 TEST_F(ContentSettingBubbleControllerTest, Init) { 56 TEST_F(ContentSettingBubbleControllerTest, Init) {
57 for (int i = 0; i < CONTENT_SETTINGS_NUM_TYPES; ++i) { 57 for (int i = 0; i < CONTENT_SETTINGS_NUM_TYPES; ++i) {
58 if (i == CONTENT_SETTINGS_TYPE_NOTIFICATIONS || 58 if (i == CONTENT_SETTINGS_TYPE_NOTIFICATIONS ||
59 i == CONTENT_SETTINGS_TYPE_INTENTS || 59 i == CONTENT_SETTINGS_TYPE_INTENTS ||
60 i == CONTENT_SETTINGS_TYPE_AUTO_SELECT_CERTIFICATE) { 60 i == CONTENT_SETTINGS_TYPE_AUTO_SELECT_CERTIFICATE ||
61 i == CONTENT_SETTINGS_TYPE_FULLSCREEN) {
61 // Notifications, web intents and auto select certificate have no bubble. 62 // Notifications, web intents and auto select certificate have no bubble.
62 continue; 63 continue;
63 } 64 }
64 65
65 ContentSettingsType settingsType = static_cast<ContentSettingsType>(i); 66 ContentSettingsType settingsType = static_cast<ContentSettingsType>(i);
66 67
67 scoped_nsobject<NSWindow> parent([[NSWindow alloc] 68 scoped_nsobject<NSWindow> parent([[NSWindow alloc]
68 initWithContentRect:NSMakeRect(0, 0, 800, 600) 69 initWithContentRect:NSMakeRect(0, 0, 800, 600)
69 styleMask:NSBorderlessWindowMask 70 styleMask:NSBorderlessWindowMask
70 backing:NSBackingStoreBuffered 71 backing:NSBackingStoreBuffered
(...skipping 10 matching lines...) Expand all
81 settingsType) 82 settingsType)
82 parentWindow:parent 83 parentWindow:parent
83 anchoredAt:NSMakePoint(50, 20)]; 84 anchoredAt:NSMakePoint(50, 20)];
84 EXPECT_TRUE(controller != nil); 85 EXPECT_TRUE(controller != nil);
85 EXPECT_TRUE([[controller window] isVisible]); 86 EXPECT_TRUE([[controller window] isVisible]);
86 [parent.get() close]; 87 [parent.get() close];
87 } 88 }
88 } 89 }
89 90
90 } // namespace 91 } // namespace
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698