OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "core/frame/Deprecation.h" | 5 #include "core/frame/Deprecation.h" |
6 #include "core/frame/FrameHost.h" | 6 #include "core/frame/FrameHost.h" |
7 #include "core/frame/UseCounter.h" | 7 #include "core/frame/UseCounter.h" |
8 #include "core/testing/DummyPageHolder.h" | 8 #include "core/testing/DummyPageHolder.h" |
9 #include "platform/testing/HistogramTester.h" | 9 #include "platform/testing/HistogramTester.h" |
10 #include "platform/testing/URLTestHelpers.h" | 10 #include "platform/testing/URLTestHelpers.h" |
11 #include "platform/weborigin/KURL.h" | 11 #include "platform/weborigin/KURL.h" |
12 #include "testing/gtest/include/gtest/gtest.h" | 12 #include "testing/gtest/include/gtest/gtest.h" |
13 | 13 |
14 namespace { | 14 namespace { |
15 // Note that the new histogram names will change once the semantics stabilize; | 15 // Note that the new histogram names will change once the semantics stabilize; |
16 const char* const kFeaturesHistogramName = "WebCore.UseCounter_TEST.Features"; | 16 const char* const kFeaturesHistogramName = "Blink.UseCounter.Features"; |
17 const char* const kCSSHistogramName = "WebCore.UseCounter_TEST.CSSProperties"; | 17 const char* const kCSSHistogramName = "Blink.UseCounter.CSSProperties"; |
18 const char* const kSVGFeaturesHistogramName = | 18 const char* const kSVGFeaturesHistogramName = |
19 "WebCore.UseCounter_TEST.SVGImage.Features"; | 19 "Blink.UseCounter.SVGImage.Features"; |
20 const char* const kSVGCSSHistogramName = | 20 const char* const kSVGCSSHistogramName = |
21 "WebCore.UseCounter_TEST.SVGImage.CSSProperties"; | 21 "Blink.UseCounter.SVGImage.CSSProperties"; |
22 const char* const kLegacyFeaturesHistogramName = "WebCore.FeatureObserver"; | 22 const char* const kLegacyFeaturesHistogramName = "WebCore.FeatureObserver"; |
23 const char* const kLegacyCSSHistogramName = | 23 const char* const kLegacyCSSHistogramName = |
24 "WebCore.FeatureObserver.CSSProperties"; | 24 "WebCore.FeatureObserver.CSSProperties"; |
25 } | 25 } |
26 | 26 |
27 namespace blink { | 27 namespace blink { |
28 | 28 |
29 // Failing on Android: crbug.com/667913 | 29 // Failing on Android: crbug.com/667913 |
30 #if OS(ANDROID) | 30 #if OS(ANDROID) |
31 #define MAYBE_RecordingFeatures DISABLED_RecordingFeatures | 31 #define MAYBE_RecordingFeatures DISABLED_RecordingFeatures |
(...skipping 428 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
460 | 460 |
461 m_deprecation.unmuteForInspector(); | 461 m_deprecation.unmuteForInspector(); |
462 Deprecation::warnOnDeprecatedProperties(frame(), property); | 462 Deprecation::warnOnDeprecatedProperties(frame(), property); |
463 // TODO: use the actually deprecated property to get a deprecation message. | 463 // TODO: use the actually deprecated property to get a deprecation message. |
464 EXPECT_FALSE(m_deprecation.isSuppressed(property)); | 464 EXPECT_FALSE(m_deprecation.isSuppressed(property)); |
465 Deprecation::countDeprecation(frame(), feature); | 465 Deprecation::countDeprecation(frame(), feature); |
466 EXPECT_TRUE(m_useCounter.hasRecordedMeasurement(feature)); | 466 EXPECT_TRUE(m_useCounter.hasRecordedMeasurement(feature)); |
467 } | 467 } |
468 | 468 |
469 } // namespace blink | 469 } // namespace blink |
OLD | NEW |