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

Unified Diff: chrome/browser/chromeos/gdata/gdata_documents_service_browsertest.cc

Issue 9742002: Wired GDataFileSystem::GetFile() method with internal cache. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merge Created 8 years, 9 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/gdata/gdata_documents_service_browsertest.cc
diff --git a/chrome/browser/chromeos/gdata/gdata_documents_service_browsertest.cc b/chrome/browser/chromeos/gdata/gdata_documents_service_browsertest.cc
index 55a376c5dc99b95876b5b3a9abec50dd1292171c..9a66a6b2103c5686948cd992e2f43f07b5ce2ca7 100644
--- a/chrome/browser/chromeos/gdata/gdata_documents_service_browsertest.cc
+++ b/chrome/browser/chromeos/gdata/gdata_documents_service_browsertest.cc
@@ -8,6 +8,7 @@
#include "base/file_util.h"
#include "base/json/json_reader.h"
#include "chrome/browser/chromeos/gdata/gdata_documents_service.h"
+#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/test/base/in_process_browser_test.h"
#include "chrome/test/base/ui_test_utils.h"
@@ -34,6 +35,10 @@ class GDataTest : public InProcessBrowserTest {
}
protected:
+ FilePath GetTestCachedFilePath(const FilePath& file_name) {
+ return browser()->profile()->GetPath().Append(file_name);
+ }
+
net::TestServer gdata_test_server_;
scoped_ptr<gdata::DocumentsService> service_;
};
@@ -67,6 +72,7 @@ IN_PROC_BROWSER_TEST_F(GDataTest, Download) {
std::string contents;
service_->DownloadFile(
FilePath("/dummy/gdata/testfile.txt"),
+ GetTestCachedFilePath(FilePath("cached_testfile.txt")),
gdata_test_server_.GetURL("files/chromeos/gdata/testfile.txt"),
base::Bind(&TestDownloadCallback, &result, &contents));
ui_test_utils::RunMessageLoop();
@@ -84,6 +90,7 @@ IN_PROC_BROWSER_TEST_F(GDataTest, NonExistingDownload) {
std::string dummy_contents;
service_->DownloadFile(
FilePath("/dummy/gdata/no-such-file.txt"),
+ GetTestCachedFilePath(FilePath("cache_no-such-file.txt")),
gdata_test_server_.GetURL("files/chromeos/gdata/no-such-file.txt"),
base::Bind(&TestDownloadCallback, &result, &dummy_contents));
ui_test_utils::RunMessageLoop();
« no previous file with comments | « chrome/browser/chromeos/gdata/gdata_documents_service.cc ('k') | chrome/browser/chromeos/gdata/gdata_file_system.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698