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

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: Remove the ChromeHistogramHelper Created 6 years, 5 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: 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 0af7c636bc733af8f87b95e5a560e1bba92b43a1..7580824c42c02aa09a1b21bf44b2715bdac3f4c9 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"
@@ -594,6 +596,21 @@ bool SetCookie(BrowserContext* browser_context,
return result;
}
+void FetchHistogramsData() {
+ scoped_refptr<content::MessageLoopRunner> runner =
+ new content::MessageLoopRunner;
+
+ content::FetchHistogramsAsynchronously(
Ilya Sherman 2014/07/17 18:35:09 nit: No need for the "content::" namespace prefix
Mike Lerman 2014/07/18 13:58:23 Done.
+ 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() * 2);
+ runner->Run();
+}
+
TitleWatcher::TitleWatcher(WebContents* web_contents,
const base::string16& expected_title)
: WebContentsObserver(web_contents),

Powered by Google App Engine
This is Rietveld 408576698