OLD | NEW |
---|---|
(Empty) | |
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 | |
3 // found in the LICENSE file. | |
4 | |
5 #include "chrome/test/base/chrome_histogram_tester.h" | |
6 | |
7 #include "base/bind.h" | |
8 #include "base/test/test_timeouts.h" | |
9 #include "chrome/test/base/ui_test_utils.h" | |
10 #include "content/public/browser/histogram_fetcher.h" | |
11 | |
12 ChromeHistogramTester::ChromeHistogramTester() { | |
13 } | |
14 | |
15 ChromeHistogramTester::~ChromeHistogramTester() { | |
16 } | |
17 | |
18 void ChromeHistogramTester::FetchTestingSnapshot() { | |
19 scoped_refptr<content::MessageLoopRunner> runner = | |
20 new content::MessageLoopRunner; | |
21 | |
22 content::FetchHistogramsAsynchronously( | |
23 base::MessageLoop::current(), | |
24 runner->QuitClosure(), | |
25 // If this call times out, it means that a child process is not | |
26 // responding, which is something we should not ignore. The timeout is | |
27 // set to be longer than the normal browser test timeout so that it will | |
28 // be prempted by the normal timeout. | |
29 TestTimeouts::action_max_timeout() * 2); | |
30 runner->Run(); | |
31 } | |
Ilya Sherman
2014/07/16 20:01:12
It's interesting to note that this method does not
Mike Lerman
2014/07/17 15:04:18
I was hoping to have something I could add under /
Ilya Sherman
2014/07/17 18:35:09
I don't think the comment is needed, for two reaso
| |
OLD | NEW |