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

Side by Side Diff: chrome/browser/ui/cocoa/extensions/extension_install_dialog_controller_unittest.mm

Issue 10332163: Revert 137075 - Get rid of Image::Image(SkBitmap*) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 7 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/file_path.h" 8 #include "base/file_path.h"
9 #include "base/file_util.h" 9 #include "base/file_util.h"
10 #include "base/json/json_file_value_serializer.h" 10 #include "base/json/json_file_value_serializer.h"
(...skipping 30 matching lines...) Expand all
41 protected: 41 protected:
42 void LoadIcon() { 42 void LoadIcon() {
43 std::string file_contents; 43 std::string file_contents;
44 file_util::ReadFileToString(test_data_dir_.AppendASCII("icon.png"), 44 file_util::ReadFileToString(test_data_dir_.AppendASCII("icon.png"),
45 &file_contents); 45 &file_contents);
46 46
47 webkit_glue::ImageDecoder decoder; 47 webkit_glue::ImageDecoder decoder;
48 SkBitmap bitmap = decoder.Decode( 48 SkBitmap bitmap = decoder.Decode(
49 reinterpret_cast<const unsigned char*>(file_contents.c_str()), 49 reinterpret_cast<const unsigned char*>(file_contents.c_str()),
50 file_contents.length()); 50 file_contents.length());
51 icon_ = gfx::Image(bitmap); 51 icon_ = gfx::Image(new SkBitmap(bitmap));
52 } 52 }
53 53
54 void LoadExtension() { 54 void LoadExtension() {
55 FilePath path = test_data_dir_.AppendASCII("extension.json"); 55 FilePath path = test_data_dir_.AppendASCII("extension.json");
56 56
57 std::string error; 57 std::string error;
58 JSONFileValueSerializer serializer(path); 58 JSONFileValueSerializer serializer(path);
59 scoped_ptr<DictionaryValue> value(static_cast<DictionaryValue*>( 59 scoped_ptr<DictionaryValue> value(static_cast<DictionaryValue*>(
60 serializer.Deserialize(NULL, &error))); 60 serializer.Deserialize(NULL, &error)));
61 if (!value.get()) { 61 if (!value.get()) {
(...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after
333 333
334 // Though we have no permissions warnings, these should still be hooked up, 334 // Though we have no permissions warnings, these should still be hooked up,
335 // just invisible. 335 // just invisible.
336 EXPECT_TRUE([controller subtitleField] != nil); 336 EXPECT_TRUE([controller subtitleField] != nil);
337 EXPECT_TRUE([[controller subtitleField] isHidden]); 337 EXPECT_TRUE([[controller subtitleField] isHidden]);
338 EXPECT_TRUE([controller warningsField] != nil); 338 EXPECT_TRUE([controller warningsField] != nil);
339 EXPECT_TRUE([[controller warningsField] isHidden]); 339 EXPECT_TRUE([[controller warningsField] isHidden]);
340 EXPECT_TRUE([controller warningsSeparator] != nil); 340 EXPECT_TRUE([controller warningsSeparator] != nil);
341 EXPECT_TRUE([[controller warningsSeparator] isHidden]); 341 EXPECT_TRUE([[controller warningsSeparator] isHidden]);
342 } 342 }
OLDNEW
« no previous file with comments | « chrome/browser/tab_contents/thumbnail_generator.cc ('k') | chrome/browser/ui/gtk/gtk_theme_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698