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

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

Issue 264046: Update browser actions api to be like new design doc. (Closed)
Patch Set: rebase Created 11 years, 2 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
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"
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 l10n_path = l10n_path.AppendASCII(current_locale); 60 l10n_path = l10n_path.AppendASCII(current_locale);
61 ASSERT_TRUE(file_util::CreateDirectory(l10n_path)); 61 ASSERT_TRUE(file_util::CreateDirectory(l10n_path));
62 62
63 ASSERT_TRUE(file_util::WriteFile(l10n_path.AppendASCII(filename), 63 ASSERT_TRUE(file_util::WriteFile(l10n_path.AppendASCII(filename),
64 data.c_str(), data.length())); 64 data.c_str(), data.length()));
65 65
66 FilePath path; 66 FilePath path;
67 ExtensionResource resource(temp.path(), FilePath().AppendASCII(filename)); 67 ExtensionResource resource(temp.path(), FilePath().AppendASCII(filename));
68 FilePath resolved_path = resource.GetFilePath(); 68 FilePath resolved_path = resource.GetFilePath();
69 69
70 EXPECT_EQ(l10n_path.AppendASCII(filename).value(), resolved_path.value()); 70 EXPECT_EQ(ToLower(l10n_path.AppendASCII(filename).value()),
71 EXPECT_EQ(temp.path().value(), resource.extension_root().value()); 71 ToLower(resolved_path.value()));
72 EXPECT_EQ(FilePath().AppendASCII(filename).value(), 72 EXPECT_EQ(ToLower(temp.path().value()),
73 resource.relative_path().value()); 73 ToLower(resource.extension_root().value()));
74 EXPECT_EQ(ToLower(FilePath().AppendASCII(filename).value()),
75 ToLower(resource.relative_path().value()));
74 } 76 }
OLDNEW
« no previous file with comments | « chrome/common/extensions/docs/browserAction.html ('k') | chrome/renderer/extensions/extension_process_bindings.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698