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

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

Issue 2678143003: Move CSS animations use counters to UseCounter (Closed)
Patch Set: Rebase incl FrameHost->Page change, tweak test Created 3 years, 9 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 3054 matching lines...) Expand 10 before | Expand all | Expand 10 after
3065 return false; 3065 return false;
3066 return UseCounter::isCounted(*document, 3066 return UseCounter::isCounted(*document,
3067 static_cast<UseCounter::Feature>(feature)); 3067 static_cast<UseCounter::Feature>(feature));
3068 } 3068 }
3069 3069
3070 bool Internals::isCSSPropertyUseCounted(Document* document, 3070 bool Internals::isCSSPropertyUseCounted(Document* document,
3071 const String& propertyName) { 3071 const String& propertyName) {
3072 return UseCounter::isCounted(*document, propertyName); 3072 return UseCounter::isCounted(*document, propertyName);
3073 } 3073 }
3074 3074
3075 bool Internals::isAnimatedCSSPropertyUseCounted(Document* document,
3076 const String& propertyName) {
3077 return UseCounter::isCountedAnimatedCSS(*document, propertyName);
3078 }
3079
3075 ScriptPromise Internals::observeUseCounter(ScriptState* scriptState, 3080 ScriptPromise Internals::observeUseCounter(ScriptState* scriptState,
3076 Document* document, 3081 Document* document,
3077 uint32_t feature) { 3082 uint32_t feature) {
3078 ScriptPromiseResolver* resolver = ScriptPromiseResolver::create(scriptState); 3083 ScriptPromiseResolver* resolver = ScriptPromiseResolver::create(scriptState);
3079 ScriptPromise promise = resolver->promise(); 3084 ScriptPromise promise = resolver->promise();
3080 if (feature >= UseCounter::NumberOfFeatures) { 3085 if (feature >= UseCounter::NumberOfFeatures) {
3081 resolver->reject(); 3086 resolver->reject();
3082 return promise; 3087 return promise;
3083 } 3088 }
3084 3089
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
3176 3181
3177 void Internals::crash() { 3182 void Internals::crash() {
3178 CHECK(false) << "Intentional crash"; 3183 CHECK(false) << "Intentional crash";
3179 } 3184 }
3180 3185
3181 void Internals::setIsLowEndDevice(bool isLowEndDevice) { 3186 void Internals::setIsLowEndDevice(bool isLowEndDevice) {
3182 MemoryCoordinator::setIsLowEndDeviceForTesting(isLowEndDevice); 3187 MemoryCoordinator::setIsLowEndDeviceForTesting(isLowEndDevice);
3183 } 3188 }
3184 3189
3185 } // namespace blink 3190 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/testing/Internals.h ('k') | third_party/WebKit/Source/core/testing/Internals.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698