OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "base/test/histogram_tester.h" | 5 #include "base/test/histogram_tester.h" |
6 #include "chrome/test/nacl/nacl_browsertest_util.h" | 6 #include "chrome/test/nacl/nacl_browsertest_util.h" |
7 #include "components/nacl/browser/nacl_browser.h" | 7 #include "components/nacl/browser/nacl_browser.h" |
8 #include "content/public/test/browser_test_utils.h" | 8 #include "content/public/test/browser_test_utils.h" |
9 #include "native_client/src/trusted/service_runtime/nacl_error_code.h" | 9 #include "native_client/src/trusted/service_runtime/nacl_error_code.h" |
10 #include "ppapi/c/private/ppb_nacl_private.h" | 10 #include "ppapi/c/private/ppb_nacl_private.h" |
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
127 | 127 |
128 class NaClBrowserTestGLibcVcacheExtension: | 128 class NaClBrowserTestGLibcVcacheExtension: |
129 public NaClBrowserTestGLibcExtension { | 129 public NaClBrowserTestGLibcExtension { |
130 public: | 130 public: |
131 virtual base::FilePath::StringType Variant() override { | 131 virtual base::FilePath::StringType Variant() override { |
132 return FILE_PATH_LITERAL("extension_vcache_test/glibc"); | 132 return FILE_PATH_LITERAL("extension_vcache_test/glibc"); |
133 } | 133 } |
134 }; | 134 }; |
135 | 135 |
136 IN_PROC_BROWSER_TEST_F(NaClBrowserTestGLibcVcacheExtension, | 136 IN_PROC_BROWSER_TEST_F(NaClBrowserTestGLibcVcacheExtension, |
137 ValidationCacheOfMainNexe) { | 137 MAYBE_GLIBC(ValidationCacheOfMainNexe)) { |
138 // Make sure histograms from child processes have been accumulated in the | 138 // Make sure histograms from child processes have been accumulated in the |
139 // browser process. | 139 // browser process. |
140 base::HistogramTester histograms; | 140 base::HistogramTester histograms; |
141 // Hardcoded extension AppID that corresponds to the hardcoded | 141 // Hardcoded extension AppID that corresponds to the hardcoded |
142 // public key in the manifest.json file. We need to load the extension | 142 // public key in the manifest.json file. We need to load the extension |
143 // nexe from the same origin, so we can't just try to load the extension | 143 // nexe from the same origin, so we can't just try to load the extension |
144 // nexe as a mime-type handler from a non-extension URL. | 144 // nexe as a mime-type handler from a non-extension URL. |
145 base::FilePath::StringType full_url = | 145 base::FilePath::StringType full_url = |
146 FILE_PATH_LITERAL("chrome-extension://cbcdidchbppangcjoddlpdjlenngjldk/") | 146 FILE_PATH_LITERAL("chrome-extension://cbcdidchbppangcjoddlpdjlenngjldk/") |
147 FILE_PATH_LITERAL("extension_validation_cache.html"); | 147 FILE_PATH_LITERAL("extension_validation_cache.html"); |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
209 // No extra cache settings. | 209 // No extra cache settings. |
210 histograms.ExpectUniqueSample("NaCl.ValidationCache.Set", | 210 histograms.ExpectUniqueSample("NaCl.ValidationCache.Set", |
211 nacl::NaClBrowser::CACHE_HIT, 3); | 211 nacl::NaClBrowser::CACHE_HIT, 3); |
212 } | 212 } |
213 | 213 |
214 | 214 |
215 // TODO(ncbray) convert the rest of nacl_uma.py (currently in the NaCl repo.) | 215 // TODO(ncbray) convert the rest of nacl_uma.py (currently in the NaCl repo.) |
216 // Test validation failures and crashes. | 216 // Test validation failures and crashes. |
217 | 217 |
218 } // namespace | 218 } // namespace |
OLD | NEW |