In http://crrev.com/823e14d71a44eeeda943e6a13d0b2a97739cbee2 I added the ability to change the value of RuntimeEnabledFlags::CSSAdditiveAnimations/WebAnimationsAPI inside LayoutTests. This was an attempt to test different configurations of flags and their effects.
It turns out that two nasty things can coalesce to make such an ability
dangerous:
1. The bindings code caches which RuntimeEnabledFeatures are enabled the
very first time a V8 object is instantiated. This cache is kept for
the lifetime of the renderer.
2. A single content_shell instance may be reused for multiple
LayoutTests.
For example:
$ ./out/Release/content_shell --run-layout-test --enable-experimental-web-platform-features animations/keyframe-effect-options-composite-parsing.html animations/multiple-same-name-css-animations.html
Content-Type: text/plain
This is a testharness.js-based test.
PASS In stable Chrome, valid composite values should not throw
PASS When just CSSAdditiveAnimations is enabled, valid composite values should not throw
PASS When just WebAnimationsAPI is enabled, valid composite values should not throw
Harness: the test ran to completion.
#EOF
#EOF
#EOF
Content-Type: text/plain
This is a testharness.js-based test.
FAIL Multiple same animation names should start multiple animations. Cannot read property 'timing' of undefined
FAIL Multiple same animation names should persist with animation timing updates. Cannot read property 'timing' of undefined
FAIL Mixed multiple same animation names should persist based on their same name relative position Cannot read property 'timing' of undefined
FAIL Removing same animation names should cancel animations from the end of the name list. Cannot read property 'timing' of undefined
FAIL Adding same animation names should start additional animations from the end of the name list. Cannot read property 'timing' of undefined
Harness: the test ran to completion.
#EOF
#EOF
#EOF
The first test eliminated 'anim.effect', so the second test starts to fail.
Since mutating these runtime flags causes unpredictable failures, we shouldn't be doing that.
Comment 1 by bugdroid1@chromium.org
, Feb 12 2018