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

Side by Side Diff: chrome/browser/themes/browser_theme_pack_unittest.cc

Issue 4192012: Convert implicit scoped_refptr constructor calls to explicit ones, part 1 (Closed) Base URL: http://git.chromium.org/git/chromium.git
Patch Set: fix presubmit Created 10 years, 1 month 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) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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/themes/browser_theme_pack.h" 5 #include "chrome/browser/themes/browser_theme_pack.h"
6 6
7 #include "base/file_util.h" 7 #include "base/file_util.h"
8 #include "base/json/json_reader.h" 8 #include "base/json/json_reader.h"
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "base/path_service.h" 10 #include "base/path_service.h"
(...skipping 392 matching lines...) Expand 10 before | Expand all | Expand 10 after
403 JSONFileValueSerializer serializer(manifest_path); 403 JSONFileValueSerializer serializer(manifest_path);
404 scoped_ptr<DictionaryValue> valid_value( 404 scoped_ptr<DictionaryValue> valid_value(
405 static_cast<DictionaryValue*>(serializer.Deserialize(NULL, &error))); 405 static_cast<DictionaryValue*>(serializer.Deserialize(NULL, &error)));
406 EXPECT_EQ("", error); 406 EXPECT_EQ("", error);
407 ASSERT_TRUE(valid_value.get()); 407 ASSERT_TRUE(valid_value.get());
408 scoped_refptr<Extension> extension(Extension::Create( 408 scoped_refptr<Extension> extension(Extension::Create(
409 star_gazing_path, Extension::INVALID, *valid_value, true, &error)); 409 star_gazing_path, Extension::INVALID, *valid_value, true, &error));
410 ASSERT_TRUE(extension.get()); 410 ASSERT_TRUE(extension.get());
411 ASSERT_EQ("", error); 411 ASSERT_EQ("", error);
412 412
413 scoped_refptr<BrowserThemePack> pack = 413 scoped_refptr<BrowserThemePack> pack(
414 BrowserThemePack::BuildFromExtension(extension.get()); 414 BrowserThemePack::BuildFromExtension(extension.get()));
415 ASSERT_TRUE(pack.get()); 415 ASSERT_TRUE(pack.get());
416 ASSERT_TRUE(pack->WriteToDisk(file)); 416 ASSERT_TRUE(pack->WriteToDisk(file));
417 VerifyStarGazing(pack.get()); 417 VerifyStarGazing(pack.get());
418 } 418 }
419 419
420 // Part 2: Try to read back the data pack that we just wrote to disk. 420 // Part 2: Try to read back the data pack that we just wrote to disk.
421 { 421 {
422 scoped_refptr<BrowserThemePack> pack = 422 scoped_refptr<BrowserThemePack> pack =
423 BrowserThemePack::BuildFromDataPack( 423 BrowserThemePack::BuildFromDataPack(
424 file, "mblmlcbknbnfebdfjnolmcapmdofhmme"); 424 file, "mblmlcbknbnfebdfjnolmcapmdofhmme");
425 ASSERT_TRUE(pack.get()); 425 ASSERT_TRUE(pack.get());
426 VerifyStarGazing(pack.get()); 426 VerifyStarGazing(pack.get());
427 } 427 }
428 } 428 }
OLDNEW
« no previous file with comments | « chrome/browser/themes/browser_theme_pack.cc ('k') | chrome/browser/themes/browser_theme_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698