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

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

Issue 337041: Fix bug where many extensions don't install due to sandbox. (Closed)
Patch Set: Attempt to fix a deps issue Created 11 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
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 <algorithm> 5 #include <algorithm>
6 6
7 #include "app/l10n_util.h" 7 #include "app/l10n_util.h"
8 #include "base/file_util.h" 8 #include "base/file_util.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 "chrome/browser/extensions/extension_l10n_util.h"
12 #include "chrome/common/chrome_paths.h" 11 #include "chrome/common/chrome_paths.h"
13 #include "chrome/common/extensions/extension.h" 12 #include "chrome/common/extensions/extension.h"
13 #include "chrome/common/extensions/extension_l10n_util.h"
14 #include "chrome/common/extensions/extension_resource.h" 14 #include "chrome/common/extensions/extension_resource.h"
15 #include "testing/gtest/include/gtest/gtest.h" 15 #include "testing/gtest/include/gtest/gtest.h"
16 16
17 TEST(ExtensionResourceTest, CreateEmptyResource) { 17 TEST(ExtensionResourceTest, CreateEmptyResource) {
18 ExtensionResource resource; 18 ExtensionResource resource;
19 19
20 EXPECT_TRUE(resource.extension_root().empty()); 20 EXPECT_TRUE(resource.extension_root().empty());
21 EXPECT_TRUE(resource.relative_path().empty()); 21 EXPECT_TRUE(resource.relative_path().empty());
22 EXPECT_TRUE(resource.GetFilePath().empty()); 22 EXPECT_TRUE(resource.GetFilePath().empty());
23 } 23 }
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 ASSERT_FALSE(locales.empty()); 76 ASSERT_FALSE(locales.empty());
77 FilePath expected_path; 77 FilePath expected_path;
78 expected_path = l10n_path.AppendASCII(locales[0]).AppendASCII(filename); 78 expected_path = l10n_path.AppendASCII(locales[0]).AppendASCII(filename);
79 79
80 EXPECT_EQ(ToLower(expected_path.value()), ToLower(resolved_path.value())); 80 EXPECT_EQ(ToLower(expected_path.value()), ToLower(resolved_path.value()));
81 EXPECT_EQ(ToLower(temp.path().value()), 81 EXPECT_EQ(ToLower(temp.path().value()),
82 ToLower(resource.extension_root().value())); 82 ToLower(resource.extension_root().value()));
83 EXPECT_EQ(ToLower(FilePath().AppendASCII(filename).value()), 83 EXPECT_EQ(ToLower(FilePath().AppendASCII(filename).value()),
84 ToLower(resource.relative_path().value())); 84 ToLower(resource.relative_path().value()));
85 } 85 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698