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

Side by Side Diff: chrome/browser/ui/cocoa/menu_controller_unittest.mm

Issue 6263008: Move ResourceBundle, DataPack to ui/base (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 11 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 <Cocoa/Cocoa.h> 5 #import <Cocoa/Cocoa.h>
6 6
7 #include "app/resource_bundle.h"
8 #include "base/sys_string_conversions.h" 7 #include "base/sys_string_conversions.h"
9 #include "base/utf_string_conversions.h" 8 #include "base/utf_string_conversions.h"
10 #include "chrome/browser/ui/cocoa/cocoa_test_helper.h" 9 #include "chrome/browser/ui/cocoa/cocoa_test_helper.h"
11 #include "chrome/browser/ui/cocoa/menu_controller.h" 10 #include "chrome/browser/ui/cocoa/menu_controller.h"
12 #include "grit/app_resources.h" 11 #include "grit/app_resources.h"
13 #include "grit/generated_resources.h" 12 #include "grit/generated_resources.h"
14 #include "third_party/skia/include/core/SkBitmap.h" 13 #include "third_party/skia/include/core/SkBitmap.h"
15 #include "ui/base/models/simple_menu_model.h" 14 #include "ui/base/models/simple_menu_model.h"
15 #include "ui/base/resource/resource_bundle.h"
16 16
17 class MenuControllerTest : public CocoaTest { 17 class MenuControllerTest : public CocoaTest {
18 }; 18 };
19 19
20 // A menu delegate that counts the number of times certain things are called 20 // A menu delegate that counts the number of times certain things are called
21 // to make sure things are hooked up properly. 21 // to make sure things are hooked up properly.
22 class Delegate : public ui::SimpleMenuModel::Delegate { 22 class Delegate : public ui::SimpleMenuModel::Delegate {
23 public: 23 public:
24 Delegate() : execute_count_(0), enable_count_(0) { } 24 Delegate() : execute_count_(0), enable_count_(0) { }
25 25
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after
253 Validate(menu.get(), [menu menu]); 253 Validate(menu.get(), [menu menu]);
254 EXPECT_EQ(second, base::SysNSStringToUTF16([item title])); 254 EXPECT_EQ(second, base::SysNSStringToUTF16([item title]));
255 EXPECT_TRUE([item image] != nil); 255 EXPECT_TRUE([item image] != nil);
256 256
257 // Now get rid of the icon and make sure it goes away. 257 // Now get rid of the icon and make sure it goes away.
258 delegate.SetDynamicIcon(NULL); 258 delegate.SetDynamicIcon(NULL);
259 Validate(menu.get(), [menu menu]); 259 Validate(menu.get(), [menu menu]);
260 EXPECT_EQ(second, base::SysNSStringToUTF16([item title])); 260 EXPECT_EQ(second, base::SysNSStringToUTF16([item title]));
261 EXPECT_EQ(nil, [item image]); 261 EXPECT_EQ(nil, [item image]);
262 } 262 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698