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

Side by Side Diff: chrome/browser/chromeos/gdata/gdata_file_system_unittest.cc

Issue 10332267: Revert 138055 - gdata: Add requestDirectoryRefresh to file_browser_private. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 <errno.h> 5 #include <errno.h>
6 #include <string> 6 #include <string>
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 3645 matching lines...) Expand 10 before | Expand all | Expand 10 after
3656 GDataRootDirectory::CACHE_TYPE_TMP); 3656 GDataRootDirectory::CACHE_TYPE_TMP);
3657 EXPECT_EQ(1, num_callback_invocations_); 3657 EXPECT_EQ(1, num_callback_invocations_);
3658 EXPECT_TRUE(CacheEntryExists(resource_id, md5)); 3658 EXPECT_TRUE(CacheEntryExists(resource_id, md5));
3659 3659
3660 // Try to remove the file. 3660 // Try to remove the file.
3661 num_callback_invocations_ = 0; 3661 num_callback_invocations_ = 0;
3662 TestRemoveFromCache(resource_id, base::PLATFORM_FILE_OK); 3662 TestRemoveFromCache(resource_id, base::PLATFORM_FILE_OK);
3663 EXPECT_EQ(1, num_callback_invocations_); 3663 EXPECT_EQ(1, num_callback_invocations_);
3664 } 3664 }
3665 3665
3666 TEST_F(GDataFileSystemTest, RequestDirectoryRefresh) {
3667 // We'll fetch documents in the root directory with its resource ID.
3668 EXPECT_CALL(*mock_doc_service_,
3669 GetDocuments(Eq(GURL()), _, _, kGDataRootDirectoryResourceId, _))
3670 .Times(1);
3671 // We'll notify the directory change to the observer.
3672 EXPECT_CALL(*mock_directory_observer_,
3673 OnDirectoryChanged(Eq(FilePath(kGDataRootDirectory)))).Times(1);
3674
3675 file_system_->RequestDirectoryRefresh(FilePath(kGDataRootDirectory));
3676 message_loop_.RunAllPending();
3677 }
3678
3679 } // namespace gdata 3666 } // namespace gdata
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/gdata/gdata_file_system.cc ('k') | chrome/browser/chromeos/gdata/gdata_files.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698