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

Unified Diff: third_party/WebKit/LayoutTests/animations/usecounter-tests/animated-css-property-usecounter-for-transitions.html

Issue 2971753002: Rename usecounter-tests directory to usecounters (Closed)
Patch Set: Created 3 years, 5 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/LayoutTests/animations/usecounter-tests/animated-css-property-usecounter-for-transitions.html
diff --git a/third_party/WebKit/LayoutTests/animations/usecounter-tests/animated-css-property-usecounter-for-transitions.html b/third_party/WebKit/LayoutTests/animations/usecounter-tests/animated-css-property-usecounter-for-transitions.html
deleted file mode 100644
index a37a2bc38e27d426dc8646e3d5724ce30861c608..0000000000000000000000000000000000000000
--- a/third_party/WebKit/LayoutTests/animations/usecounter-tests/animated-css-property-usecounter-for-transitions.html
+++ /dev/null
@@ -1,62 +0,0 @@
-<!DOCTYPE html>
-<script src="../../resources/testharness.js"></script>
-<script src="../../resources/testharnessreport.js"></script>
-
-<style>
-#target {
- width: 100px;
- height: 100px;
- transition: width 1s;
-}
-</style>
-
-<div id="target"></div>
-
-<script>
-'use strict';
-
-function waitForProgress() {
- var initialWidth = getComputedStyle(target).width;
- return new Promise(resolve => {
- function poll() {
- var width = getComputedStyle(target).width;
- if (width === initialWidth) {
- requestAnimationFrame(poll);
- } else {
- resolve();
- }
- }
- requestAnimationFrame(poll);
- });
-}
-
-async_test(t => {
- assert_true(
- internals.isCSSPropertyUseCounted(document, "width"),
- 'Usage of width in style causes it to be counted in normal CSS ' +
- 'property UseCounter');
- assert_true(
- internals.isCSSPropertyUseCounted(document, "height"),
- 'Usage of height in style causes it to be counted in normal CSS ' +
- 'property UseCounter');
-
- assert_false(
- internals.isAnimatedCSSPropertyUseCounted(document, "width"),
- 'Initially width animation has not been UseCounted');
- assert_false(
- internals.isAnimatedCSSPropertyUseCounted(document, "height"),
- 'Initially height animation has not been UseCounted');
-
- target.offsetTop; // force recalc
- target.style.width = '200px';
-
- waitForProgress().then(t.step_func_done(() => {
- assert_true(
- internals.isAnimatedCSSPropertyUseCounted(document, "width"),
- 'After triggering the transition, width has been counted');
- assert_false(
- internals.isAnimatedCSSPropertyUseCounted(document, "height"),
- 'Height is not animated, so not counted');
- }));
-}, 'Using CSS transitions causes UseCounter to be incremented.');
-</script>

Powered by Google App Engine
This is Rietveld 408576698