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

Side by Side Diff: third_party/WebKit/Source/core/frame/UseCounterTest.cpp

Issue 2528493003: Correctly disable UseCounterTest.InspectorDisablesMeasurement (Closed)
Patch Set: Created 4 years 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "testing/gtest/include/gtest/gtest.h" 10 #include "testing/gtest/include/gtest/gtest.h"
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after
243 histogramTester.expectTotalCount(kFeaturesHistogramName, 0); 243 histogramTester.expectTotalCount(kFeaturesHistogramName, 0);
244 } 244 }
245 245
246 // Failing on Android: crbug.com/667913 246 // Failing on Android: crbug.com/667913
247 #if OS(ANDROID) 247 #if OS(ANDROID)
248 #define MAYBE_InspectorDisablesMeasurement DISABLED_InspectorDisablesMeasurement 248 #define MAYBE_InspectorDisablesMeasurement DISABLED_InspectorDisablesMeasurement
249 #else 249 #else
250 #define MAYBE_InspectorDisablesMeasurement InspectorDisablesMeasurement 250 #define MAYBE_InspectorDisablesMeasurement InspectorDisablesMeasurement
251 #endif 251 #endif
252 252
253 TEST(UseCounterTest, InspectorDisablesMeasurement) { 253 TEST(UseCounterTest, MAYBE_InspectorDisablesMeasurement) {
254 UseCounter useCounter; 254 UseCounter useCounter;
255 HistogramTester histogramTester; 255 HistogramTester histogramTester;
256 256
257 // The specific feature we use here isn't important. 257 // The specific feature we use here isn't important.
258 UseCounter::Feature feature = UseCounter::Feature::SVGSMILElementInDocument; 258 UseCounter::Feature feature = UseCounter::Feature::SVGSMILElementInDocument;
259 CSSPropertyID property = CSSPropertyFontWeight; 259 CSSPropertyID property = CSSPropertyFontWeight;
260 CSSParserMode parserMode = HTMLStandardMode; 260 CSSParserMode parserMode = HTMLStandardMode;
261 261
262 EXPECT_FALSE(useCounter.hasRecordedMeasurement(feature)); 262 EXPECT_FALSE(useCounter.hasRecordedMeasurement(feature));
263 263
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
338 338
339 m_deprecation.unmuteForInspector(); 339 m_deprecation.unmuteForInspector();
340 Deprecation::warnOnDeprecatedProperties(frame(), property); 340 Deprecation::warnOnDeprecatedProperties(frame(), property);
341 // TODO: use the actually deprecated property to get a deprecation message. 341 // TODO: use the actually deprecated property to get a deprecation message.
342 EXPECT_FALSE(m_deprecation.isSuppressed(property)); 342 EXPECT_FALSE(m_deprecation.isSuppressed(property));
343 Deprecation::countDeprecation(frame(), feature); 343 Deprecation::countDeprecation(frame(), feature);
344 EXPECT_TRUE(m_useCounter.hasRecordedMeasurement(feature)); 344 EXPECT_TRUE(m_useCounter.hasRecordedMeasurement(feature));
345 } 345 }
346 346
347 } // namespace blink 347 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698