| Index: chrome/browser/chromeos/gdata/drive_test_util.cc
|
| diff --git a/chrome/browser/chromeos/gdata/drive_test_util.cc b/chrome/browser/chromeos/gdata/drive_test_util.cc
|
| index 25010f5bd7687e4a811f49d7917336276dba74a3..02fae44dddb90059c9ab3106b6e3fcb1a5cfe1df 100644
|
| --- a/chrome/browser/chromeos/gdata/drive_test_util.cc
|
| +++ b/chrome/browser/chromeos/gdata/drive_test_util.cc
|
| @@ -4,54 +4,15 @@
|
|
|
| #include "chrome/browser/chromeos/gdata/drive_test_util.h"
|
|
|
| -#include "base/file_util.h"
|
| #include "base/json/json_file_value_serializer.h"
|
| -#include "base/message_loop.h"
|
| -#include "base/path_service.h"
|
| -#include "base/threading/sequenced_worker_pool.h"
|
| #include "chrome/browser/chromeos/gdata/drive.pb.h"
|
| #include "chrome/browser/chromeos/gdata/drive_api_parser.h"
|
| #include "chrome/browser/chromeos/gdata/drive_file_system.h"
|
| -#include "chrome/common/chrome_paths.h"
|
| -#include "content/public/browser/browser_thread.h"
|
| #include "testing/gtest/include/gtest/gtest.h"
|
|
|
| namespace gdata {
|
| namespace test_util {
|
|
|
| -// This class is used to monitor if any task is posted to a message loop.
|
| -class TaskObserver : public MessageLoop::TaskObserver {
|
| - public:
|
| - TaskObserver() : posted_(false) {}
|
| - virtual ~TaskObserver() {}
|
| -
|
| - // MessageLoop::TaskObserver overrides.
|
| - virtual void WillProcessTask(base::TimeTicks time_posted) {}
|
| - virtual void DidProcessTask(base::TimeTicks time_posted) {
|
| - posted_ = true;
|
| - }
|
| -
|
| - // Returns true if any task was posted.
|
| - bool posted() const { return posted_; }
|
| -
|
| - private:
|
| - bool posted_;
|
| - DISALLOW_COPY_AND_ASSIGN(TaskObserver);
|
| -};
|
| -
|
| -void RunBlockingPoolTask() {
|
| - while (true) {
|
| - content::BrowserThread::GetBlockingPool()->FlushForTesting();
|
| -
|
| - TaskObserver task_observer;
|
| - MessageLoop::current()->AddTaskObserver(&task_observer);
|
| - MessageLoop::current()->RunAllPending();
|
| - MessageLoop::current()->RemoveTaskObserver(&task_observer);
|
| - if (!task_observer.posted())
|
| - break;
|
| - }
|
| -}
|
| -
|
| DriveCacheEntry ToCacheEntry(int cache_state) {
|
| DriveCacheEntry cache_entry;
|
| cache_entry.set_is_present(cache_state & TEST_CACHE_STATE_PRESENT);
|
| @@ -136,28 +97,6 @@ void CopyResultsFromGetEntryInfoPairCallback(
|
| *out_result = result.Pass();
|
| }
|
|
|
| -FilePath GetTestFilePath(const std::string& relative_path) {
|
| - FilePath path;
|
| - std::string error;
|
| - PathService::Get(chrome::DIR_TEST_DATA, &path);
|
| - path = path.AppendASCII("chromeos")
|
| - .Append(FilePath::FromUTF8Unsafe(relative_path));
|
| - EXPECT_TRUE(file_util::PathExists(path)) <<
|
| - "Couldn't find " << path.value();
|
| - return path;
|
| -}
|
| -
|
| -scoped_ptr<base::Value> LoadJSONFile(const std::string& relative_path) {
|
| - FilePath path = GetTestFilePath(relative_path);
|
| -
|
| - std::string error;
|
| - JSONFileValueSerializer serializer(path);
|
| - scoped_ptr<base::Value> value(serializer.Deserialize(NULL, &error));
|
| - EXPECT_TRUE(value.get()) <<
|
| - "Parse error " << path.value() << ": " << error;
|
| - return value.Pass();
|
| -}
|
| -
|
| void LoadChangeFeed(const std::string& relative_path,
|
| DriveFileSystem* file_system,
|
| int64 start_changestamp,
|
|
|