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

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

Issue 10453101: Convert most of the rest of chrome to ImageSkia (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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 <Cocoa/Cocoa.h> 5 #import <Cocoa/Cocoa.h>
6 6
7 #include "base/compiler_specific.h" 7 #include "base/compiler_specific.h"
8 #include "base/memory/scoped_nsobject.h" 8 #include "base/memory/scoped_nsobject.h"
9 #include "base/utf_string_conversions.h" 9 #include "base/utf_string_conversions.h"
10 #import "chrome/browser/ui/cocoa/task_manager_mac.h" 10 #import "chrome/browser/ui/cocoa/task_manager_mac.h"
11 #import "chrome/browser/ui/cocoa/cocoa_test_helper.h" 11 #import "chrome/browser/ui/cocoa/cocoa_test_helper.h"
12 #include "grit/generated_resources.h" 12 #include "grit/generated_resources.h"
13 #include "testing/gtest/include/gtest/gtest.h" 13 #include "testing/gtest/include/gtest/gtest.h"
14 #import "testing/gtest_mac.h" 14 #import "testing/gtest_mac.h"
15 #include "testing/platform_test.h" 15 #include "testing/platform_test.h"
16 #include "third_party/skia/include/core/SkBitmap.h" 16 #include "ui/gfx/image/image_skia.h"
17 17
18 namespace { 18 namespace {
19 19
20 class TestResource : public TaskManager::Resource { 20 class TestResource : public TaskManager::Resource {
21 public: 21 public:
22 TestResource(const string16& title, pid_t pid) : title_(title), pid_(pid) {} 22 TestResource(const string16& title, pid_t pid) : title_(title), pid_(pid) {}
23 virtual string16 GetTitle() const OVERRIDE { return title_; } 23 virtual string16 GetTitle() const OVERRIDE { return title_; }
24 virtual string16 GetProfileName() const OVERRIDE { return string16(); } 24 virtual string16 GetProfileName() const OVERRIDE { return string16(); }
25 virtual SkBitmap GetIcon() const OVERRIDE { return SkBitmap(); } 25 virtual gfx::ImageSkia GetIcon() const OVERRIDE { return gfx::ImageSkia(); }
26 virtual base::ProcessHandle GetProcess() const OVERRIDE { return pid_; } 26 virtual base::ProcessHandle GetProcess() const OVERRIDE { return pid_; }
27 virtual int GetUniqueChildProcessId() const OVERRIDE { 27 virtual int GetUniqueChildProcessId() const OVERRIDE {
28 // In reality the unique child process ID is not the actual process ID, 28 // In reality the unique child process ID is not the actual process ID,
29 // but for testing purposes it shouldn't make difference. 29 // but for testing purposes it shouldn't make difference.
30 return static_cast<int>(base::GetCurrentProcId()); 30 return static_cast<int>(base::GetCurrentProcId());
31 } 31 }
32 virtual Type GetType() const OVERRIDE { return RENDERER; } 32 virtual Type GetType() const OVERRIDE { return RENDERER; }
33 virtual bool SupportNetworkUsage() const OVERRIDE { return false; } 33 virtual bool SupportNetworkUsage() const OVERRIDE { return false; }
34 virtual void SetSupportNetworkUsage() OVERRIDE { NOTREACHED(); } 34 virtual void SetSupportNetworkUsage() OVERRIDE { NOTREACHED(); }
35 virtual void Refresh() OVERRIDE {} 35 virtual void Refresh() OVERRIDE {}
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 NSIndexSet* selection = [table selectedRowIndexes]; 114 NSIndexSet* selection = [table selectedRowIndexes];
115 ASSERT_EQ(1u, [selection count]); 115 ASSERT_EQ(1u, [selection count]);
116 EXPECT_EQ(1u, [selection firstIndex]); 116 EXPECT_EQ(1u, [selection firstIndex]);
117 117
118 // Releases the controller, which in turn deletes |bridge|. 118 // Releases the controller, which in turn deletes |bridge|.
119 [controller close]; 119 [controller close];
120 120
121 task_manager.RemoveResource(&resource1); 121 task_manager.RemoveResource(&resource1);
122 task_manager.RemoveResource(&resource2); 122 task_manager.RemoveResource(&resource2);
123 } 123 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/task_manager_mac.mm ('k') | chrome/browser/ui/gtk/extensions/extension_install_dialog_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698