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

Side by Side Diff: content/browser/tracing/tracing_controller_browsertest.cc

Issue 102873002: Move GetFileSize, NormalizeFilePath to base namespace (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "base/file_util.h" 5 #include "base/file_util.h"
6 #include "base/run_loop.h" 6 #include "base/run_loop.h"
7 #include "content/browser/tracing/tracing_controller_impl.h" 7 #include "content/browser/tracing/tracing_controller_impl.h"
8 #include "content/public/test/browser_test_utils.h" 8 #include "content/public/test/browser_test_utils.h"
9 #include "content/shell/browser/shell.h" 9 #include "content/shell/browser/shell.h"
10 #include "content/test/content_browser_test.h" 10 #include "content/test/content_browser_test.h"
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 void EnableRecordingDoneCallbackTest(base::Closure quit_callback) { 44 void EnableRecordingDoneCallbackTest(base::Closure quit_callback) {
45 enable_recording_done_callback_count_++; 45 enable_recording_done_callback_count_++;
46 quit_callback.Run(); 46 quit_callback.Run();
47 } 47 }
48 48
49 void DisableRecordingDoneCallbackTest(base::Closure quit_callback, 49 void DisableRecordingDoneCallbackTest(base::Closure quit_callback,
50 const base::FilePath& file_path) { 50 const base::FilePath& file_path) {
51 disable_recording_done_callback_count_++; 51 disable_recording_done_callback_count_++;
52 EXPECT_TRUE(PathExists(file_path)); 52 EXPECT_TRUE(PathExists(file_path));
53 int64 file_size; 53 int64 file_size;
54 file_util::GetFileSize(file_path, &file_size); 54 base::GetFileSize(file_path, &file_size);
55 EXPECT_TRUE(file_size > 0); 55 EXPECT_TRUE(file_size > 0);
56 quit_callback.Run(); 56 quit_callback.Run();
57 last_actual_recording_file_path_ = file_path; 57 last_actual_recording_file_path_ = file_path;
58 } 58 }
59 59
60 void EnableMonitoringDoneCallbackTest(base::Closure quit_callback) { 60 void EnableMonitoringDoneCallbackTest(base::Closure quit_callback) {
61 enable_monitoring_done_callback_count_++; 61 enable_monitoring_done_callback_count_++;
62 quit_callback.Run(); 62 quit_callback.Run();
63 } 63 }
64 64
65 void DisableMonitoringDoneCallbackTest(base::Closure quit_callback) { 65 void DisableMonitoringDoneCallbackTest(base::Closure quit_callback) {
66 disable_monitoring_done_callback_count_++; 66 disable_monitoring_done_callback_count_++;
67 quit_callback.Run(); 67 quit_callback.Run();
68 } 68 }
69 69
70 void CaptureMonitoringSnapshotDoneCallbackTest( 70 void CaptureMonitoringSnapshotDoneCallbackTest(
71 base::Closure quit_callback, const base::FilePath& file_path) { 71 base::Closure quit_callback, const base::FilePath& file_path) {
72 capture_monitoring_snapshot_done_callback_count_++; 72 capture_monitoring_snapshot_done_callback_count_++;
73 EXPECT_TRUE(PathExists(file_path)); 73 EXPECT_TRUE(PathExists(file_path));
74 int64 file_size; 74 int64 file_size;
75 file_util::GetFileSize(file_path, &file_size); 75 base::GetFileSize(file_path, &file_size);
76 EXPECT_TRUE(file_size > 0); 76 EXPECT_TRUE(file_size > 0);
77 quit_callback.Run(); 77 quit_callback.Run();
78 last_actual_monitoring_file_path_ = file_path; 78 last_actual_monitoring_file_path_ = file_path;
79 } 79 }
80 80
81 int get_categories_done_callback_count() const { 81 int get_categories_done_callback_count() const {
82 return get_categories_done_callback_count_; 82 return get_categories_done_callback_count_;
83 } 83 }
84 84
85 int enable_recording_done_callback_count() const { 85 int enable_recording_done_callback_count() const {
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
261 TracingController::EnableMonitoringDoneCallback())); 261 TracingController::EnableMonitoringDoneCallback()));
262 controller->CaptureMonitoringSnapshot( 262 controller->CaptureMonitoringSnapshot(
263 base::FilePath(), TracingController::TracingFileResultCallback()); 263 base::FilePath(), TracingController::TracingFileResultCallback());
264 base::RunLoop().RunUntilIdle(); 264 base::RunLoop().RunUntilIdle();
265 EXPECT_TRUE(controller->DisableMonitoring( 265 EXPECT_TRUE(controller->DisableMonitoring(
266 TracingController::DisableMonitoringDoneCallback())); 266 TracingController::DisableMonitoringDoneCallback()));
267 base::RunLoop().RunUntilIdle(); 267 base::RunLoop().RunUntilIdle();
268 } 268 }
269 269
270 } // namespace content 270 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/net/sqlite_persistent_cookie_store.cc ('k') | content/common/mac/font_loader.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698