Chromium Code Reviews| Index: chrome/test/base/chrome_histogram_tester.h |
| diff --git a/chrome/test/base/chrome_histogram_tester.h b/chrome/test/base/chrome_histogram_tester.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..9ead7df473daadec17d3d38fab75fbc85f41d4c4 |
| --- /dev/null |
| +++ b/chrome/test/base/chrome_histogram_tester.h |
| @@ -0,0 +1,29 @@ |
| +// Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef CHROME_TEST_BASE_CHROME_HISTOGRAM_TESTER_H_ |
| +#define CHROME_TEST_BASE_CHROME_HISTOGRAM_TESTER_H_ |
| + |
| +#include "base/test/histogram_tester.h" |
| + |
| +// ChromeHistogramTester extends the base class by gathering in histogram data |
| +// from all other processes before performing assertions. |
|
Ilya Sherman
2014/07/16 20:01:13
IMO, it would be better to move this comment to be
Mike Lerman
2014/07/17 15:04:18
Done.
|
| +class ChromeHistogramTester : public base::HistogramTester { |
| + public: |
| + // ChromeHistogramTester should be created before the execution of the test |
| + // case. |
| + ChromeHistogramTester(); |
| + |
|
Ilya Sherman
2014/07/16 20:01:13
Optional nit: I'd omit this blank line.
Mike Lerman
2014/07/17 15:04:18
Ya, the standard seems to be constructor-destructo
|
| + ~ChromeHistogramTester(); |
| + |
| + // Fetch the values to be tested. This must be called after the test code has |
| + // been executed but before performing the necessary assertions. This may be |
| + // called multiple times. |
| + void FetchTestingSnapshot(); |
| + |
| + private: |
| + DISALLOW_COPY_AND_ASSIGN(ChromeHistogramTester); |
| +}; |
| + |
| +#endif // CHROME_TEST_BASE_CHROME_HISTOGRAM_TESTER_H_ |