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

Side by Side Diff: chrome/browser/extensions/extension_icon_image_unittest.cc

Issue 13949011: Cleanup: Remove unnecessary ".get()" from scoped_ptrs<>. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 8 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 #include "chrome/browser/extensions/extension_icon_image.h" 5 #include "chrome/browser/extensions/extension_icon_image.h"
6 6
7 #include "base/json/json_file_value_serializer.h" 7 #include "base/json/json_file_value_serializer.h"
8 #include "base/message_loop.h" 8 #include "base/message_loop.h"
9 #include "base/path_service.h" 9 #include "base/path_service.h"
10 #include "chrome/browser/extensions/image_loader.h" 10 #include "chrome/browser/extensions/image_loader.h"
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
155 std::string error; 155 std::string error;
156 JSONFileValueSerializer serializer(test_file.AppendASCII("app.json")); 156 JSONFileValueSerializer serializer(test_file.AppendASCII("app.json"));
157 scoped_ptr<DictionaryValue> valid_value( 157 scoped_ptr<DictionaryValue> valid_value(
158 static_cast<DictionaryValue*>(serializer.Deserialize(&error_code, 158 static_cast<DictionaryValue*>(serializer.Deserialize(&error_code,
159 &error))); 159 &error)));
160 EXPECT_EQ(0, error_code) << error; 160 EXPECT_EQ(0, error_code) << error;
161 if (error_code != 0) 161 if (error_code != 0)
162 return NULL; 162 return NULL;
163 163
164 EXPECT_TRUE(valid_value.get()); 164 EXPECT_TRUE(valid_value.get());
165 if (!valid_value.get()) 165 if (!valid_value)
166 return NULL; 166 return NULL;
167 167
168 return Extension::Create(test_file, location, *valid_value, 168 return Extension::Create(test_file, location, *valid_value,
169 Extension::NO_FLAGS, &error); 169 Extension::NO_FLAGS, &error);
170 } 170 }
171 171
172 // testing::Test overrides: 172 // testing::Test overrides:
173 virtual void SetUp() OVERRIDE { 173 virtual void SetUp() OVERRIDE {
174 file_thread_.Start(); 174 file_thread_.Start();
175 io_thread_.Start(); 175 io_thread_.Start();
(...skipping 371 matching lines...) Expand 10 before | Expand all | Expand 10 after
547 EXPECT_EQ(16, representation.pixel_width()); 547 EXPECT_EQ(16, representation.pixel_width());
548 EXPECT_TRUE(gfx::BitmapsAreEqual(representation.sk_bitmap(), bitmap_16)); 548 EXPECT_TRUE(gfx::BitmapsAreEqual(representation.sk_bitmap(), bitmap_16));
549 549
550 // When requesting another representation, we should get blank image. 550 // When requesting another representation, we should get blank image.
551 representation = image_skia.GetRepresentation(ui::SCALE_FACTOR_200P); 551 representation = image_skia.GetRepresentation(ui::SCALE_FACTOR_200P);
552 552
553 EXPECT_TRUE(gfx::BitmapsAreEqual( 553 EXPECT_TRUE(gfx::BitmapsAreEqual(
554 representation.sk_bitmap(), 554 representation.sk_bitmap(),
555 CreateBlankBitmapForScale(16, ui::SCALE_FACTOR_200P))); 555 CreateBlankBitmapForScale(16, ui::SCALE_FACTOR_200P)));
556 } 556 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_host.cc ('k') | chrome/browser/extensions/extension_info_map.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698