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

Side by Side Diff: chrome/browser/chromeos/drive/file_system_unittest.cc

Issue 29263007: linux and chromeos: Turn on -Wunused-const-variable. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 7 years, 2 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
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 "chrome/browser/chromeos/drive/file_system.h" 5 #include "chrome/browser/chromeos/drive/file_system.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 15 matching lines...) Expand all
26 #include "chrome/browser/chromeos/drive/test_util.h" 26 #include "chrome/browser/chromeos/drive/test_util.h"
27 #include "chrome/browser/drive/fake_drive_service.h" 27 #include "chrome/browser/drive/fake_drive_service.h"
28 #include "chrome/browser/google_apis/drive_api_parser.h" 28 #include "chrome/browser/google_apis/drive_api_parser.h"
29 #include "chrome/browser/google_apis/test_util.h" 29 #include "chrome/browser/google_apis/test_util.h"
30 #include "content/public/test/test_browser_thread_bundle.h" 30 #include "content/public/test/test_browser_thread_bundle.h"
31 #include "testing/gtest/include/gtest/gtest.h" 31 #include "testing/gtest/include/gtest/gtest.h"
32 32
33 namespace drive { 33 namespace drive {
34 namespace { 34 namespace {
35 35
36 const int64 kLotsOfSpace = internal::kMinFreeSpace * 10;
37
38 // Counts the number of invocation, and if it increased up to |expected_counter| 36 // Counts the number of invocation, and if it increased up to |expected_counter|
39 // quits the current message loop by calling |quit|. 37 // quits the current message loop by calling |quit|.
40 void AsyncInitializationCallback( 38 void AsyncInitializationCallback(
41 int* counter, int expected_counter, const base::Closure& quit, 39 int* counter, int expected_counter, const base::Closure& quit,
42 FileError error, scoped_ptr<ResourceEntry> entry) { 40 FileError error, scoped_ptr<ResourceEntry> entry) {
43 if (error != FILE_ERROR_OK || !entry) { 41 if (error != FILE_ERROR_OK || !entry) {
44 // If we hit an error case, quit the message loop immediately. 42 // If we hit an error case, quit the message loop immediately.
45 // Then the expectation in the test case can find it because the actual 43 // Then the expectation in the test case can find it because the actual
46 // value of |counter| is different from the expected one. 44 // value of |counter| is different from the expected one.
47 quit.Run(); 45 quit.Run();
(...skipping 694 matching lines...) Expand 10 before | Expand all | Expand 10 after
742 kEmbedOrigin, 740 kEmbedOrigin,
743 google_apis::test_util::CreateCopyResultCallback(&error, &share_url)); 741 google_apis::test_util::CreateCopyResultCallback(&error, &share_url));
744 test_util::RunBlockingPoolTask(); 742 test_util::RunBlockingPoolTask();
745 743
746 // Verify the error and the share url, which should be empty. 744 // Verify the error and the share url, which should be empty.
747 EXPECT_EQ(FILE_ERROR_FAILED, error); 745 EXPECT_EQ(FILE_ERROR_FAILED, error);
748 EXPECT_TRUE(share_url.is_empty()); 746 EXPECT_TRUE(share_url.is_empty());
749 } 747 }
750 748
751 } // namespace drive 749 } // namespace drive
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/display/overscan_calibrator.cc ('k') | chrome/browser/chromeos/file_manager/file_tasks.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698