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

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

Issue 8890086: Issue 71980: Extensions code should use UTF-16 for user-visible Unicode strings (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 9 years 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "base/file_util.h" 5 #include "base/file_util.h"
6 #include "base/memory/ref_counted.h" 6 #include "base/memory/ref_counted.h"
7 #include "base/path_service.h" 7 #include "base/path_service.h"
8 #include "base/scoped_temp_dir.h" 8 #include "base/scoped_temp_dir.h"
9 #include "base/scoped_temp_dir.h" 9 #include "base/scoped_temp_dir.h"
10 #include "base/string_util.h" 10 #include "base/string_util.h"
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 public: 42 public:
43 virtual ~MockSandboxedExtensionUnpackerClient() {} 43 virtual ~MockSandboxedExtensionUnpackerClient() {}
44 44
45 MOCK_METHOD4(OnUnpackSuccess, 45 MOCK_METHOD4(OnUnpackSuccess,
46 void(const FilePath& temp_dir, 46 void(const FilePath& temp_dir,
47 const FilePath& extension_root, 47 const FilePath& extension_root,
48 const DictionaryValue* original_manifest, 48 const DictionaryValue* original_manifest,
49 const Extension* extension)); 49 const Extension* extension));
50 50
51 MOCK_METHOD1(OnUnpackFailure, 51 MOCK_METHOD1(OnUnpackFailure,
52 void(const std::string& error)); 52 void(const string16& error));
53 53
54 void DelegateToFake() { 54 void DelegateToFake() {
55 ON_CALL(*this, OnUnpackSuccess(_, _, _, _)) 55 ON_CALL(*this, OnUnpackSuccess(_, _, _, _))
56 .WillByDefault(Invoke(::OnUnpackSuccess)); 56 .WillByDefault(Invoke(::OnUnpackSuccess));
57 } 57 }
58 }; 58 };
59 59
60 class SandboxedExtensionUnpackerTest : public testing::Test { 60 class SandboxedExtensionUnpackerTest : public testing::Test {
61 public: 61 public:
62 virtual void SetUp() { 62 virtual void SetUp() {
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
211 OnUnpackSucceeded(); 211 OnUnpackSucceeded();
212 212
213 // Check that there is newer _locales/en_US/messages.json file. 213 // Check that there is newer _locales/en_US/messages.json file.
214 base::PlatformFileInfo new_info; 214 base::PlatformFileInfo new_info;
215 EXPECT_TRUE(file_util::GetFileInfo(messages_file, &new_info)); 215 EXPECT_TRUE(file_util::GetFileInfo(messages_file, &new_info));
216 216
217 EXPECT_TRUE(new_info.last_modified > old_info.last_modified); 217 EXPECT_TRUE(new_info.last_modified > old_info.last_modified);
218 218
219 ASSERT_TRUE(TempFilesRemoved()); 219 ASSERT_TRUE(TempFilesRemoved());
220 } 220 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/sandboxed_extension_unpacker.cc ('k') | chrome/browser/extensions/webstore_installer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698