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

Side by Side Diff: chrome/common/extensions/extension_file_util_unittest.cc

Issue 8816022: Crashing: ExtensionFileUtil.InstallUninstallGarbageCollect. (Closed) Base URL: svn://svn.chromium.org/chrome/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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "chrome/common/extensions/extension_file_util.h" 5 #include "chrome/common/extensions/extension_file_util.h"
6 6
7 #include "base/file_util.h" 7 #include "base/file_util.h"
8 #include "base/json/json_value_serializer.h" 8 #include "base/json/json_value_serializer.h"
9 #include "base/path_service.h" 9 #include "base/path_service.h"
10 #include "base/scoped_temp_dir.h" 10 #include "base/scoped_temp_dir.h"
11 #include "base/stringprintf.h" 11 #include "base/stringprintf.h"
12 #include "base/utf_string_conversions.h" 12 #include "base/utf_string_conversions.h"
13 #include "chrome/common/chrome_paths.h" 13 #include "chrome/common/chrome_paths.h"
14 #include "chrome/common/extensions/extension.h" 14 #include "chrome/common/extensions/extension.h"
15 #include "chrome/common/extensions/extension_constants.h" 15 #include "chrome/common/extensions/extension_constants.h"
16 #include "testing/gtest/include/gtest/gtest.h" 16 #include "testing/gtest/include/gtest/gtest.h"
17 17
18 namespace keys = extension_manifest_keys; 18 namespace keys = extension_manifest_keys;
19 19
20 TEST(ExtensionFileUtil, InstallUninstallGarbageCollect) { 20 // http://crbug.com/106381
21 TEST(ExtensionFileUtil, DISABLED_InstallUninstallGarbageCollect) {
21 ScopedTempDir temp; 22 ScopedTempDir temp;
22 ASSERT_TRUE(temp.CreateUniqueTempDir()); 23 ASSERT_TRUE(temp.CreateUniqueTempDir());
23 24
24 // Create a source extension. 25 // Create a source extension.
25 std::string extension_id("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"); 26 std::string extension_id("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa");
26 std::string version("1.0"); 27 std::string version("1.0");
27 FilePath src = temp.path().AppendASCII(extension_id); 28 FilePath src = temp.path().AppendASCII(extension_id);
28 ASSERT_TRUE(file_util::CreateDirectory(src)); 29 ASSERT_TRUE(file_util::CreateDirectory(src));
29 30
30 // Create a extensions tree. 31 // Create a extensions tree.
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after
277 kManifest, temp.path(), Extension::LOAD, 0, &error); 278 kManifest, temp.path(), Extension::LOAD, 0, &error);
278 ASSERT_TRUE(extension.get()) << error; 279 ASSERT_TRUE(extension.get()) << error;
279 280
280 EXPECT_TRUE(extension_file_util::ValidateExtension(extension, &error)) << 281 EXPECT_TRUE(extension_file_util::ValidateExtension(extension, &error)) <<
281 error; 282 error;
282 } 283 }
283 284
284 // TODO(aa): More tests as motivation allows. Maybe steal some from 285 // TODO(aa): More tests as motivation allows. Maybe steal some from
285 // ExtensionService? Many of them could probably be tested here without the 286 // ExtensionService? Many of them could probably be tested here without the
286 // MessageLoop shenanigans. 287 // MessageLoop shenanigans.
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698