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

Unified Diff: third_party/WebKit/Source/core/frame/UseCounterTest.cpp

Issue 2894063002: Expose UseCounter::Feature enum out of blink as WebFeature (Closed)
Patch Set: Rebase update Created 3 years, 7 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: third_party/WebKit/Source/core/frame/UseCounterTest.cpp
diff --git a/third_party/WebKit/Source/core/frame/UseCounterTest.cpp b/third_party/WebKit/Source/core/frame/UseCounterTest.cpp
index 2afa3c1669da88c53f3abbedeb73e78995c50dc2..9c4a3301d9664468228b633f44f6d80b07452042 100644
--- a/third_party/WebKit/Source/core/frame/UseCounterTest.cpp
+++ b/third_party/WebKit/Source/core/frame/UseCounterTest.cpp
@@ -153,16 +153,14 @@ void HistogramBasicTest(const std::string& histogram,
TEST(UseCounterTest, RecordingFeatures) {
UseCounter use_counter;
- HistogramBasicTest<UseCounter::Feature>(
- kFeaturesHistogramName, kLegacyFeaturesHistogramName, UseCounter::kFetch,
- UseCounter::kFetchBodyStream,
- [&](UseCounter::Feature feature) -> bool {
+ HistogramBasicTest<WebFeature>(
+ kFeaturesHistogramName, kLegacyFeaturesHistogramName, WebFeature::kFetch,
+ WebFeature::kFetchBodyStream,
+ [&](WebFeature feature) -> bool {
return use_counter.HasRecordedMeasurement(feature);
},
- [&](UseCounter::Feature feature) {
- use_counter.RecordMeasurement(feature);
- },
- [](UseCounter::Feature feature) -> int { return feature; },
+ [&](WebFeature feature) { use_counter.RecordMeasurement(feature); },
+ [](WebFeature feature) -> int { return static_cast<int>(feature); },
[&](KURL kurl) { use_counter.DidCommitLoad(kurl); }, kHttpsUrl);
}
@@ -199,32 +197,28 @@ TEST(UseCounterTest, RecordingAnimatedCSSProperties) {
TEST(UseCounterTest, RecordingExtensions) {
UseCounter use_counter(UseCounter::kExtensionContext);
- HistogramBasicTest<UseCounter::Feature>(
+ HistogramBasicTest<WebFeature>(
kExtensionFeaturesHistogramName, kLegacyFeaturesHistogramName,
- UseCounter::kFetch, UseCounter::kFetchBodyStream,
- [&](UseCounter::Feature feature) -> bool {
+ WebFeature::kFetch, WebFeature::kFetchBodyStream,
+ [&](WebFeature feature) -> bool {
return use_counter.HasRecordedMeasurement(feature);
},
- [&](UseCounter::Feature feature) {
- use_counter.RecordMeasurement(feature);
- },
- [](UseCounter::Feature feature) -> int { return feature; },
+ [&](WebFeature feature) { use_counter.RecordMeasurement(feature); },
+ [](WebFeature feature) -> int { return static_cast<int>(feature); },
[&](KURL kurl) { use_counter.DidCommitLoad(kurl); }, kExtensionUrl);
}
TEST(UseCounterTest, SVGImageContextFeatures) {
UseCounter use_counter(UseCounter::kSVGImageContext);
- HistogramBasicTest<UseCounter::Feature>(
+ HistogramBasicTest<WebFeature>(
kSVGFeaturesHistogramName, kLegacyFeaturesHistogramName,
- UseCounter::kSVGSMILAdditiveAnimation,
- UseCounter::kSVGSMILAnimationElementTiming,
- [&](UseCounter::Feature feature) -> bool {
+ WebFeature::kSVGSMILAdditiveAnimation,
+ WebFeature::kSVGSMILAnimationElementTiming,
+ [&](WebFeature feature) -> bool {
return use_counter.HasRecordedMeasurement(feature);
},
- [&](UseCounter::Feature feature) {
- use_counter.RecordMeasurement(feature);
- },
- [](UseCounter::Feature feature) -> int { return feature; },
+ [&](WebFeature feature) { use_counter.RecordMeasurement(feature); },
+ [](WebFeature feature) -> int { return static_cast<int>(feature); },
[&](KURL kurl) { use_counter.DidCommitLoad(kurl); }, kSvgUrl);
}
« no previous file with comments | « third_party/WebKit/Source/core/frame/UseCounter.cpp ('k') | third_party/WebKit/Source/core/testing/Internals.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698