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

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

Issue 2542173002: [Mac] Omnibox icons active states (Closed)
Patch Set: Created 4 years 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
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/mac/scoped_nsautorelease_pool.h" 9 #include "base/mac/scoped_nsautorelease_pool.h"
10 #include "base/mac/scoped_nsobject.h" 10 #include "base/mac/scoped_nsobject.h"
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 ContentSettingBubbleController* 48 ContentSettingBubbleController*
49 ContentSettingBubbleControllerTest::CreateBubbleController( 49 ContentSettingBubbleControllerTest::CreateBubbleController(
50 ContentSettingBubbleModel* bubble) { 50 ContentSettingBubbleModel* bubble) {
51 parent_.reset([[NSWindow alloc] initWithContentRect:NSMakeRect(0, 0, 800, 600) 51 parent_.reset([[NSWindow alloc] initWithContentRect:NSMakeRect(0, 0, 800, 600)
52 styleMask:NSBorderlessWindowMask 52 styleMask:NSBorderlessWindowMask
53 backing:NSBackingStoreBuffered 53 backing:NSBackingStoreBuffered
54 defer:NO]); 54 defer:NO]);
55 [parent_ setReleasedWhenClosed:NO]; 55 [parent_ setReleasedWhenClosed:NO];
56 [parent_ orderFront:nil]; 56 [parent_ orderFront:nil];
57 57
58 ContentSettingBubbleController* controller = [ContentSettingBubbleController 58 ContentSettingBubbleController* controller =
59 showForModel:bubble 59 [ContentSettingBubbleController showForModel:bubble
60 webContents:web_contents() 60 webContents:web_contents()
61 parentWindow:parent_ 61 parentWindow:parent_
62 anchoredAt:NSMakePoint(50, 20)]; 62 decoration:nullptr
63 anchoredAt:NSMakePoint(50, 20)];
63 64
64 EXPECT_TRUE(controller); 65 EXPECT_TRUE(controller);
65 EXPECT_TRUE([[controller window] isVisible]); 66 EXPECT_TRUE([[controller window] isVisible]);
66 67
67 return controller; 68 return controller;
68 } 69 }
69 70
70 // Check that the bubble doesn't crash or leak for any image model. 71 // Check that the bubble doesn't crash or leak for any image model.
71 IN_PROC_BROWSER_TEST_F(ContentSettingBubbleControllerTest, Init) { 72 IN_PROC_BROWSER_TEST_F(ContentSettingBubbleControllerTest, Init) {
72 TabSpecificContentSettings::FromWebContents(web_contents())-> 73 TabSpecificContentSettings::FromWebContents(web_contents())->
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 (content::MEDIA_DEVICE_VIDEO_CAPTURE == i->second->type)); 105 (content::MEDIA_DEVICE_VIDEO_CAPTURE == i->second->type));
105 EXPECT_EQ(0, [i->first numberOfItems]); 106 EXPECT_EQ(0, [i->first numberOfItems]);
106 EXPECT_NSEQ(title, [i->first title]); 107 EXPECT_NSEQ(title, [i->first title]);
107 EXPECT_FALSE([i->first isEnabled]); 108 EXPECT_FALSE([i->first isEnabled]);
108 } 109 }
109 110
110 [parent_ close]; 111 [parent_ close];
111 } 112 }
112 113
113 } // namespace 114 } // namespace
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698