| Index: chrome/test/nacl/nacl_browsertest_uma.cc
|
| diff --git a/chrome/test/nacl/nacl_browsertest_uma.cc b/chrome/test/nacl/nacl_browsertest_uma.cc
|
| index fb7a463f7dd8417966533eb8ffae7596fad7706e..8b941bc02ef87af761321e76fcf030202c02501c 100644
|
| --- a/chrome/test/nacl/nacl_browsertest_uma.cc
|
| +++ b/chrome/test/nacl/nacl_browsertest_uma.cc
|
| @@ -2,7 +2,7 @@
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| -#include "chrome/test/base/uma_histogram_helper.h"
|
| +#include "chrome/test/base/chrome_histogram_tester.h"
|
| #include "chrome/test/nacl/nacl_browsertest_util.h"
|
| #include "components/nacl/browser/nacl_browser.h"
|
| #include "native_client/src/trusted/service_runtime/nacl_error_code.h"
|
| @@ -11,13 +11,13 @@
|
| namespace {
|
|
|
| NACL_BROWSER_TEST_F(NaClBrowserTest, SuccessfulLoadUMA, {
|
| + ChromeHistogramTester histograms;
|
| // Load a NaCl module to generate UMA data.
|
| RunLoadTest(FILE_PATH_LITERAL("nacl_load_test.html"));
|
|
|
| // Make sure histograms from child processes have been accumulated in the
|
| // browser brocess.
|
| - UMAHistogramHelper histograms;
|
| - histograms.Fetch();
|
| + histograms.FetchTestingSnapshot();
|
|
|
| // Did the plugin report success?
|
| histograms.ExpectUniqueSample("NaCl.LoadStatus.Plugin",
|
| @@ -88,6 +88,7 @@ class NaClBrowserTestVcacheExtension:
|
|
|
| IN_PROC_BROWSER_TEST_F(NaClBrowserTestVcacheExtension,
|
| ValidationCacheOfMainNexe) {
|
| + ChromeHistogramTester histograms;
|
| // Hardcoded extension AppID that corresponds to the hardcoded
|
| // public key in the manifest.json file. We need to load the extension
|
| // nexe from the same origin, so we can't just try to load the extension
|
| @@ -99,8 +100,7 @@ IN_PROC_BROWSER_TEST_F(NaClBrowserTestVcacheExtension,
|
|
|
| // Make sure histograms from child processes have been accumulated in the
|
| // browser brocess.
|
| - UMAHistogramHelper histograms;
|
| - histograms.Fetch();
|
| + histograms.FetchTestingSnapshot();
|
| // Should have received 2 validation queries (one for IRT and one for NEXE),
|
| // and responded with a miss.
|
| histograms.ExpectBucketCount("NaCl.ValidationCache.Query",
|
| @@ -113,7 +113,7 @@ IN_PROC_BROWSER_TEST_F(NaClBrowserTestVcacheExtension,
|
|
|
| // Load it again to hit the cache.
|
| RunNaClIntegrationTest(full_url, true);
|
| - histograms.Fetch();
|
| + histograms.FetchTestingSnapshot();
|
| // Should have received 2 more validation queries later (IRT and NEXE),
|
| // and responded with a hit.
|
| histograms.ExpectBucketCount("NaCl.ValidationCache.Query",
|
| @@ -127,11 +127,11 @@ IN_PROC_BROWSER_TEST_F(NaClBrowserTestVcacheExtension,
|
| // Test that validation for the 2 PNaCl translator nexes can be cached.
|
| IN_PROC_BROWSER_TEST_F(NaClBrowserTestPnacl,
|
| ValidationCacheOfTranslatorNexes) {
|
| + ChromeHistogramTester histograms;
|
| // Run a load test w/ one pexe cache identity.
|
| RunLoadTest(FILE_PATH_LITERAL("pnacl_options.html?use_nmf=o_0"));
|
|
|
| - UMAHistogramHelper histograms;
|
| - histograms.Fetch();
|
| + histograms.FetchTestingSnapshot();
|
| // Should have received 3 validation queries:
|
| // - One for IRT for actual application
|
| // - Two for two translator nexes
|
|
|