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

Side by Side Diff: trunk/src/content/browser/media/webrtc_browsertest.cc

Issue 122053002: Revert 242671 "Implement sampling profiler (chromium side change)" (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 6 years, 11 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 "base/command_line.h" 5 #include "base/command_line.h"
6 #include "base/debug/trace_event_impl.h" 6 #include "base/debug/trace_event_impl.h"
7 #include "base/json/json_reader.h" 7 #include "base/json/json_reader.h"
8 #include "base/strings/stringprintf.h" 8 #include "base/strings/stringprintf.h"
9 #include "base/strings/utf_string_conversions.h" 9 #include "base/strings/utf_string_conversions.h"
10 #include "base/values.h" 10 #include "base/values.h"
(...skipping 399 matching lines...) Expand 10 before | Expand all | Expand 10 after
410 GURL url(embedded_test_server()->GetURL("/media/getusermedia.html")); 410 GURL url(embedded_test_server()->GetURL("/media/getusermedia.html"));
411 NavigateToURL(shell(), url); 411 NavigateToURL(shell(), url);
412 // Put getUserMedia to work and let it run for a couple of seconds. 412 // Put getUserMedia to work and let it run for a couple of seconds.
413 EXPECT_TRUE(ExecuteJavascript(base::StringPrintf( 413 EXPECT_TRUE(ExecuteJavascript(base::StringPrintf(
414 "%s({video: true}, 10);", kGetUserMediaAndWaitAndStop))); 414 "%s({video: true}, 10);", kGetUserMediaAndWaitAndStop)));
415 415
416 // Make sure the stream is up and running, then start collecting traces. 416 // Make sure the stream is up and running, then start collecting traces.
417 ExpectTitle("Running..."); 417 ExpectTitle("Running...");
418 base::debug::TraceLog* trace_log = base::debug::TraceLog::GetInstance(); 418 base::debug::TraceLog* trace_log = base::debug::TraceLog::GetInstance();
419 trace_log->SetEnabled(base::debug::CategoryFilter("video"), 419 trace_log->SetEnabled(base::debug::CategoryFilter("video"),
420 base::debug::TraceLog::RECORDING_MODE,
421 base::debug::TraceLog::ENABLE_SAMPLING); 420 base::debug::TraceLog::ENABLE_SAMPLING);
422 // Check that we are indeed recording. 421 // Check that we are indeed recording.
423 EXPECT_EQ(trace_log->GetNumTracesRecorded(), 1); 422 EXPECT_EQ(trace_log->GetNumTracesRecorded(), 1);
424 423
425 // Wait until the page title changes to "OK". Do not sleep() here since that 424 // Wait until the page title changes to "OK". Do not sleep() here since that
426 // would stop both this code and the browser underneath. 425 // would stop both this code and the browser underneath.
427 ExpectTitle("OK"); 426 ExpectTitle("OK");
428 427
429 // Note that we need to stop the trace recording before flushing the data. 428 // Note that we need to stop the trace recording before flushing the data.
430 trace_log->SetDisabled(); 429 trace_log->SetDisabled();
(...skipping 460 matching lines...) Expand 10 before | Expand all | Expand 10 after
891 EXPECT_TRUE(base::PathExists(dump_file)); 890 EXPECT_TRUE(base::PathExists(dump_file));
892 int64 file_size = 0; 891 int64 file_size = 0;
893 EXPECT_TRUE(base::GetFileSize(dump_file, &file_size)); 892 EXPECT_TRUE(base::GetFileSize(dump_file, &file_size));
894 EXPECT_EQ(0, file_size); 893 EXPECT_EQ(0, file_size);
895 894
896 base::DeleteFile(dump_file, false); 895 base::DeleteFile(dump_file, false);
897 } 896 }
898 897
899 898
900 } // namespace content 899 } // namespace content
OLDNEW
« no previous file with comments | « trunk/src/content/app/content_main_runner.cc ('k') | trunk/src/content/browser/tracing/tracing_controller_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698