Chromium Code Reviews

Unified Diff: chrome/browser/extensions/file_reader_unittest.cc

Issue 2867008: Show extension icons next to their top-level context menu items.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Index: chrome/browser/extensions/file_reader_unittest.cc
===================================================================
--- chrome/browser/extensions/file_reader_unittest.cc (revision 50770)
+++ chrome/browser/extensions/file_reader_unittest.cc (working copy)
@@ -10,6 +10,7 @@
#include "chrome/browser/chrome_thread.h"
#include "chrome/browser/extensions/file_reader.h"
#include "chrome/common/chrome_paths.h"
+#include "chrome/common/extensions/extension.h"
#include "chrome/common/extensions/extension_resource.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -51,7 +52,10 @@
void RunBasicTest(const char* filename) {
FilePath path;
PathService::Get(chrome::DIR_TEST_DATA, &path);
- ExtensionResource resource(path, FilePath().AppendASCII(filename));
+ std::string extension_id;
+ Extension::GenerateId("test", &extension_id);
+ ExtensionResource resource(extension_id, path,
+ FilePath().AppendASCII(filename));
path = path.AppendASCII(filename);
std::string file_contents;
@@ -80,7 +84,9 @@
TEST_F(FileReaderTest, NonExistantFile) {
FilePath path;
PathService::Get(chrome::DIR_TEST_DATA, &path);
- ExtensionResource resource(path, FilePath(
+ std::string extension_id;
+ Extension::GenerateId("test", &extension_id);
+ ExtensionResource resource(extension_id, path, FilePath(
FILE_PATH_LITERAL("file_that_does_not_exist")));
path = path.AppendASCII("file_that_does_not_exist");
« no previous file with comments | « chrome/browser/extensions/extensions_service_unittest.cc ('k') | chrome/browser/extensions/image_loading_tracker.h » ('j') | no next file with comments »

Powered by Google App Engine