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

Side by Side Diff: base/debug/trace_event_unittest.cc

Issue 65813002: mac: Prepare most test code for -Wunused-functions too. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 1 month 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
« no previous file with comments | « no previous file | base/files/file_path_watcher_browsertest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "base/debug/trace_event_unittest.h" 5 #include "base/debug/trace_event_unittest.h"
6 6
7 #include <cstdlib> 7 #include <cstdlib>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 823 matching lines...) Expand 10 before | Expand all | Expand 10 after
834 } 834 }
835 835
836 EXPECT_FALSE(results[-1][-1]); 836 EXPECT_FALSE(results[-1][-1]);
837 for (int thread = 0; thread < num_threads; thread++) { 837 for (int thread = 0; thread < num_threads; thread++) {
838 for (int event = 0; event < num_events; event++) { 838 for (int event = 0; event < num_events; event++) {
839 EXPECT_TRUE(results[thread][event]); 839 EXPECT_TRUE(results[thread][event]);
840 } 840 }
841 } 841 }
842 } 842 }
843 843
844 void TraceCallsWithCachedCategoryPointersPointers(const char* name_str) {
845 TRACE_EVENT0("category name1", name_str);
846 TRACE_EVENT_INSTANT0("category name2", name_str, TRACE_EVENT_SCOPE_THREAD);
847 TRACE_EVENT_BEGIN0("category name3", name_str);
848 TRACE_EVENT_END0("category name4", name_str);
849 }
850
851 } // namespace 844 } // namespace
852 845
853 void HighResSleepForTraceTest(base::TimeDelta elapsed) { 846 void HighResSleepForTraceTest(base::TimeDelta elapsed) {
854 base::TimeTicks end_time = base::TimeTicks::HighResNow() + elapsed; 847 base::TimeTicks end_time = base::TimeTicks::HighResNow() + elapsed;
855 do { 848 do {
856 base::PlatformThread::Sleep(base::TimeDelta::FromMilliseconds(1)); 849 base::PlatformThread::Sleep(base::TimeDelta::FromMilliseconds(1));
857 } while (base::TimeTicks::HighResNow() < end_time); 850 } while (base::TimeTicks::HighResNow() < end_time);
858 } 851 }
859 852
860 // Simple Test for emitting data and validating it was received. 853 // Simple Test for emitting data and validating it was received.
(...skipping 1578 matching lines...) Expand 10 before | Expand all | Expand 10 after
2439 double timestamp; 2432 double timestamp;
2440 EXPECT_TRUE(item->GetDouble("ts", &timestamp)); 2433 EXPECT_TRUE(item->GetDouble("ts", &timestamp));
2441 EXPECT_GE(timestamp, last_timestamp); 2434 EXPECT_GE(timestamp, last_timestamp);
2442 EXPECT_LE(timestamp, end_time); 2435 EXPECT_LE(timestamp, end_time);
2443 last_timestamp = timestamp; 2436 last_timestamp = timestamp;
2444 } 2437 }
2445 } 2438 }
2446 2439
2447 } // namespace debug 2440 } // namespace debug
2448 } // namespace base 2441 } // namespace base
OLDNEW
« no previous file with comments | « no previous file | base/files/file_path_watcher_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698