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

Unified Diff: chrome/browser/chromeos/file_system_provider/operations/read_directory_unittest.cc

Issue 294073007: [fsp] Let extensions decide about the file system id. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased. Created 6 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/chromeos/file_system_provider/operations/read_directory_unittest.cc
diff --git a/chrome/browser/chromeos/file_system_provider/operations/read_directory_unittest.cc b/chrome/browser/chromeos/file_system_provider/operations/read_directory_unittest.cc
index 1158ddf129118bba5ac6513a2352bf52579676f9..a53a8b6cf2c3c347baefd0e6895dc80c9c147fa1 100644
--- a/chrome/browser/chromeos/file_system_provider/operations/read_directory_unittest.cc
+++ b/chrome/browser/chromeos/file_system_provider/operations/read_directory_unittest.cc
@@ -9,6 +9,7 @@
#include "base/json/json_reader.h"
#include "base/memory/scoped_ptr.h"
#include "base/memory/scoped_vector.h"
+#include "base/values.h"
#include "chrome/browser/chromeos/file_system_provider/operations/read_directory.h"
#include "chrome/common/extensions/api/file_system_provider.h"
#include "chrome/common/extensions/api/file_system_provider_internal.h"
@@ -22,7 +23,7 @@ namespace operations {
namespace {
const char kExtensionId[] = "mbflcebpggnecokmikipoihdbecnjfoj";
-const int kFileSystemId = 1;
+const char kFileSystemId[] = "testing-file-system";
const int kRequestId = 2;
const base::FilePath::CharType kDirectoryPath[] = "/directory";
@@ -137,8 +138,8 @@ TEST_F(FileSystemProviderOperationsReadDirectoryTest, Execute) {
base::ListValue* event_args = event->event_args.get();
ASSERT_EQ(3u, event_args->GetSize());
- int event_file_system_id = -1;
- EXPECT_TRUE(event_args->GetInteger(0, &event_file_system_id));
+ std::string event_file_system_id;
+ EXPECT_TRUE(event_args->GetString(0, &event_file_system_id));
EXPECT_EQ(kFileSystemId, event_file_system_id);
int event_request_id = -1;
@@ -190,8 +191,8 @@ TEST_F(FileSystemProviderOperationsReadDirectoryTest, OnSuccess) {
// base::Value.
const std::string input =
"[\n"
- " 1,\n" // kFileSystemId
- " 2,\n" // kRequestId
+ " \"testing-file-system\",\n" // kFileSystemId
+ " 2,\n" // kRequestId
" [\n"
" {\n"
" \"isDirectory\": false,\n"

Powered by Google App Engine
This is Rietveld 408576698