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

Unified Diff: test/cctest/test-profile-generator.cc

Issue 1635005: Allow new CPU profiling subsystem to coexist nicely with the old one. (Closed)
Patch Set: Fix TickSampleEvent Created 10 years, 8 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 side-by-side diff with in-line comments
Download patch
Index: test/cctest/test-profile-generator.cc
diff --git a/test/cctest/test-profile-generator.cc b/test/cctest/test-profile-generator.cc
index 2e45994064239e4eb0174516c82fd45b589dfec9..15a5b5af7273926e1c73d45ef77ad44efa162fa1 100644
--- a/test/cctest/test-profile-generator.cc
+++ b/test/cctest/test-profile-generator.cc
@@ -367,7 +367,27 @@ TEST(CodeMapMoveAndDeleteCode) {
}
+namespace {
+
+class TestSetup {
+ public:
+ TestSetup()
+ : old_flag_prof_browser_mode_(i::FLAG_prof_browser_mode) {
+ i::FLAG_prof_browser_mode = false;
+ }
+
+ ~TestSetup() {
+ i::FLAG_prof_browser_mode = old_flag_prof_browser_mode_;
+ }
+
+ private:
+ bool old_flag_prof_browser_mode_;
+};
+
+} // namespace
+
TEST(RecordTickSample) {
+ TestSetup test_setup;
CpuProfilesCollection profiles;
profiles.StartProfiling("", 1);
ProfileGenerator generator(&profiles);
« src/cpu-profiler-inl.h ('K') | « test/cctest/test-cpu-profiler.cc ('k') | tools/gyp/v8.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698