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

Unified Diff: content/public/test/browser_test_utils.cc

Issue 379283002: Rework UMAHistogramHelper and StatisticsDeltaReader into [Chrome]HistogramTester. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 6 years, 4 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
« no previous file with comments | « content/public/test/browser_test_utils.h ('k') | net/spdy/spdy_session_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/public/test/browser_test_utils.cc
diff --git a/content/public/test/browser_test_utils.cc b/content/public/test/browser_test_utils.cc
index 079312c193298fc1eac96914d97999ea78376c53..d28b8aae295261942f8ddfa6b54bbc6b942928f1 100644
--- a/content/public/test/browser_test_utils.cc
+++ b/content/public/test/browser_test_utils.cc
@@ -4,6 +4,7 @@
#include "content/public/test/browser_test_utils.h"
+#include "base/bind.h"
#include "base/command_line.h"
#include "base/json/json_reader.h"
#include "base/path_service.h"
@@ -19,6 +20,7 @@
#include "content/common/input/synthetic_web_input_event_builders.h"
#include "content/public/browser/browser_context.h"
#include "content/public/browser/dom_operation_notification_details.h"
+#include "content/public/browser/histogram_fetcher.h"
#include "content/public/browser/notification_service.h"
#include "content/public/browser/notification_types.h"
#include "content/public/browser/render_frame_host.h"
@@ -586,6 +588,20 @@ bool SetCookie(BrowserContext* browser_context,
return result;
}
+void FetchHistogramsFromChildProcesses() {
+ scoped_refptr<content::MessageLoopRunner> runner = new MessageLoopRunner;
+
+ FetchHistogramsAsynchronously(
+ base::MessageLoop::current(),
+ runner->QuitClosure(),
+ // If this call times out, it means that a child process is not
+ // responding, which is something we should not ignore. The timeout is
+ // set to be longer than the normal browser test timeout so that it will
+ // be prempted by the normal timeout.
+ TestTimeouts::action_max_timeout());
+ runner->Run();
+}
+
TitleWatcher::TitleWatcher(WebContents* web_contents,
const base::string16& expected_title)
: WebContentsObserver(web_contents),
« no previous file with comments | « content/public/test/browser_test_utils.h ('k') | net/spdy/spdy_session_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698