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

Side by Side Diff: third_party/WebKit/Source/core/testing/Internals.cpp

Issue 2678143003: Move CSS animations use counters to UseCounter (Closed)
Patch Set: Replace FIXME with test expectation file Created 3 years, 10 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 Google Inc. All rights reserved.
3 * Copyright (C) 2013 Apple Inc. All rights reserved. 3 * Copyright (C) 2013 Apple Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 8 *
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 3025 matching lines...) Expand 10 before | Expand all | Expand 10 after
3036 return false; 3036 return false;
3037 return UseCounter::isCounted(*document, 3037 return UseCounter::isCounted(*document,
3038 static_cast<UseCounter::Feature>(feature)); 3038 static_cast<UseCounter::Feature>(feature));
3039 } 3039 }
3040 3040
3041 bool Internals::isCSSPropertyUseCounted(Document* document, 3041 bool Internals::isCSSPropertyUseCounted(Document* document,
3042 const String& propertyName) { 3042 const String& propertyName) {
3043 return UseCounter::isCounted(*document, propertyName); 3043 return UseCounter::isCounted(*document, propertyName);
3044 } 3044 }
3045 3045
3046 bool Internals::isAnimatedCSSPropertyUseCounted(Document* document,
3047 const String& propertyName) {
3048 return UseCounter::isCountedAnimatedCSS(*document, propertyName);
3049 }
3050
3046 ScriptPromise Internals::observeUseCounter(ScriptState* scriptState, 3051 ScriptPromise Internals::observeUseCounter(ScriptState* scriptState,
3047 Document* document, 3052 Document* document,
3048 uint32_t feature) { 3053 uint32_t feature) {
3049 ScriptPromiseResolver* resolver = ScriptPromiseResolver::create(scriptState); 3054 ScriptPromiseResolver* resolver = ScriptPromiseResolver::create(scriptState);
3050 ScriptPromise promise = resolver->promise(); 3055 ScriptPromise promise = resolver->promise();
3051 if (feature >= UseCounter::NumberOfFeatures) { 3056 if (feature >= UseCounter::NumberOfFeatures) {
3052 resolver->reject(); 3057 resolver->reject();
3053 return promise; 3058 return promise;
3054 } 3059 }
3055 3060
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
3147 3152
3148 void Internals::crash() { 3153 void Internals::crash() {
3149 CHECK(false) << "Intentional crash"; 3154 CHECK(false) << "Intentional crash";
3150 } 3155 }
3151 3156
3152 void Internals::setIsLowEndDevice(bool isLowEndDevice) { 3157 void Internals::setIsLowEndDevice(bool isLowEndDevice) {
3153 MemoryCoordinator::setIsLowEndDeviceForTesting(isLowEndDevice); 3158 MemoryCoordinator::setIsLowEndDeviceForTesting(isLowEndDevice);
3154 } 3159 }
3155 3160
3156 } // namespace blink 3161 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698