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

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

Issue 17593006: mac: Update clients of scoped_nsobject.h. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: iwyu, scoped_nsprotocol Created 7 years, 5 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/mac/scoped_nsautorelease_pool.h" 9 #include "base/mac/scoped_nsautorelease_pool.h"
10 #include "base/memory/scoped_nsobject.h" 10 #include "base/mac/scoped_nsobject.h"
11 #include "chrome/browser/media/media_capture_devices_dispatcher.h" 11 #include "chrome/browser/media/media_capture_devices_dispatcher.h"
12 #import "chrome/browser/ui/cocoa/cocoa_test_helper.h" 12 #import "chrome/browser/ui/cocoa/cocoa_test_helper.h"
13 #include "chrome/browser/ui/content_settings/content_setting_bubble_model.h" 13 #include "chrome/browser/ui/content_settings/content_setting_bubble_model.h"
14 #include "chrome/common/content_settings_types.h" 14 #include "chrome/common/content_settings_types.h"
15 #include "chrome/test/base/chrome_render_view_host_test_harness.h" 15 #include "chrome/test/base/chrome_render_view_host_test_harness.h"
16 #include "chrome/test/base/testing_profile.h" 16 #include "chrome/test/base/testing_profile.h"
17 #include "content/public/common/media_stream_request.h" 17 #include "content/public/common/media_stream_request.h"
18 #include "grit/generated_resources.h" 18 #include "grit/generated_resources.h"
19 #include "testing/gtest/include/gtest/gtest.h" 19 #include "testing/gtest/include/gtest/gtest.h"
20 #include "testing/gtest_mac.h" 20 #include "testing/gtest_mac.h"
(...skipping 20 matching lines...) Expand all
41 } 41 }
42 }; 42 };
43 43
44 class ContentSettingBubbleControllerTest 44 class ContentSettingBubbleControllerTest
45 : public ChromeRenderViewHostTestHarness { 45 : public ChromeRenderViewHostTestHarness {
46 protected: 46 protected:
47 // Helper function to create the bubble controller. 47 // Helper function to create the bubble controller.
48 ContentSettingBubbleController* CreateBubbleController( 48 ContentSettingBubbleController* CreateBubbleController(
49 ContentSettingsType settingsType); 49 ContentSettingsType settingsType);
50 50
51 scoped_nsobject<NSWindow> parent_; 51 base::scoped_nsobject<NSWindow> parent_;
52 52
53 private: 53 private:
54 base::mac::ScopedNSAutoreleasePool pool_; 54 base::mac::ScopedNSAutoreleasePool pool_;
55 }; 55 };
56 56
57 ContentSettingBubbleController* 57 ContentSettingBubbleController*
58 ContentSettingBubbleControllerTest::CreateBubbleController( 58 ContentSettingBubbleControllerTest::CreateBubbleController(
59 ContentSettingsType settingsType) { 59 ContentSettingsType settingsType) {
60 parent_.reset([[NSWindow alloc] initWithContentRect:NSMakeRect(0, 0, 800, 600) 60 parent_.reset([[NSWindow alloc] initWithContentRect:NSMakeRect(0, 0, 800, 600)
61 styleMask:NSBorderlessWindowMask 61 styleMask:NSBorderlessWindowMask
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 (content::MEDIA_DEVICE_VIDEO_CAPTURE == i->second->type)); 117 (content::MEDIA_DEVICE_VIDEO_CAPTURE == i->second->type));
118 EXPECT_EQ(0, [i->first numberOfItems]); 118 EXPECT_EQ(0, [i->first numberOfItems]);
119 EXPECT_NSEQ(title, [i->first title]); 119 EXPECT_NSEQ(title, [i->first title]);
120 EXPECT_FALSE([i->first isEnabled]); 120 EXPECT_FALSE([i->first isEnabled]);
121 } 121 }
122 122
123 [parent_ close]; 123 [parent_ close];
124 } 124 }
125 125
126 } // namespace 126 } // namespace
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698