New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 769541 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner: ----
Closed: Nov 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

Use scoped RuntimeEnabledFeature setters for tests to ensure settings are restored for other tests

Project Member Reported by pdr@chromium.org, Sep 27 2017

Issue description

It is not safe to use RuntimeEnabledFeatures::Set*Enabled in tests because these settings are not cleaned up between test runs. We should use scoped setters (see: RuntimeEnabledFeaturesTestHelpers.h), or ideally add DCHECKs to prevent this class of bugs entirely.

Better:
TEST_F(LayoutObjectTest, Test1) {
  ScopedSlimmingPaintV2ForTest enabler(true);
  ...
}

Bad:
TEST_F(LayoutObjectTest, Test1) {
  RuntimeEnabledFeatures::SetSlimmingPaintV2Enabled(true);
  ...
}

Here's proof that this is a bad pattern:
TEST_F(LayoutObjectTest, Test1) {
  RuntimeEnabledFeatures::SetSlimmingPaintV2Enabled(true);
}
TEST_F(LayoutObjectTest, Test2) {
  LOG(ERROR) << RuntimeEnabledFeatures::SlimmingPaintV2Enabled();
}
When run in webkit_unit_tests --gtest_filter=LayoutObjectTest.Test, Test2 will print "1" while it may not expect SPv2 enabled.

 
Project Member

Comment 1 by bugdroid1@chromium.org, Sep 28 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/b21dfe253a0542cad5f5a5300769903df199a80a

commit b21dfe253a0542cad5f5a5300769903df199a80a
Author: Philip Rogers <pdr@chromium.org>
Date: Thu Sep 28 02:57:25 2017

Use scoped runtime enabled settings in paint tests

This patch removes calls to RuntimeEnabledFeatures::Set*Enabled and
instead uses scoped settings setters to ensure test settings are not
used in future tests.

Bug:  769541 
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: I9411afa2e7522748e9f1446f515cae07e220738d
Reviewed-on: https://chromium-review.googlesource.com/688817
Commit-Queue: Philip Rogers <pdr@chromium.org>
Commit-Queue: Xianzhu Wang <wangxianzhu@chromium.org>
Reviewed-by: Xianzhu Wang <wangxianzhu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#504878}
[modify] https://crrev.com/b21dfe253a0542cad5f5a5300769903df199a80a/third_party/WebKit/Source/core/paint/PaintLayerScrollableAreaTest.cpp
[modify] https://crrev.com/b21dfe253a0542cad5f5a5300769903df199a80a/third_party/WebKit/Source/core/paint/PaintLayerTest.cpp
[modify] https://crrev.com/b21dfe253a0542cad5f5a5300769903df199a80a/third_party/WebKit/Source/platform/testing/RuntimeEnabledFeaturesTestHelpers.h

Comment 2 by pdr@chromium.org, Sep 28 2017

Labels: Hotlist-GoodFirstBug
Opening this up as a good first bug. The above patch is an example of how to fix these issues.
I am working on this.

Comment 4 by pdr@chromium.org, Oct 9 2017

Shahriar is about to land a patch with this fixed: https://chromium-review.googlesource.com/c/chromium/src/+/696765

Idea for a followup: we could store the current RuntimeEnabledFeatures settings in the constructor of RendererTest and then DCHECK in the destructor that the current RuntimeEnabledFeatures settings are the same as the initial RuntimeEnabledFeatures settings. This would prevent changing RuntimeEnabledFeatures and not resetting it during RendererTest.

Another idea for a followup (courtesy Xianzhu): We could auto-generate the scoped feature objects in Source/build/scripts/make_runtime_features.py.
> we could store the current RuntimeEnabledFeatures settings in the constructor of RendererTest and then DCHECK in the destructor

If we do this, how about just allowing tests to set RuntimeEnabledFeatures freely, and restoring all features in the destructor using RuntimeEnabledFeautures::Backup::Restore()? As not all blink tests inherit from RenderingTest, we can put this code in a class such as BlinkTest and force all blink tests to inherit from it.
Regarding constructor/destructor solution:, whether we put it in RenderingTest or creating a new BlinkTest class, the limitation is these features set per test class and not test case.

Some of the tests require to enable/disable a runtime feature and restore it at the end or in the middle of the test case for not having side-effects on other test cases. Using constructor/destructor makes us to (again) manually handle these state changes where it is required.

Please take a look at:

https://chromium-review.googlesource.com/c/chromium/src/+/696765/5/third_party/WebKit/Source/platform/bindings/RuntimeCallStatsTest.cpp#241

https://chromium-review.googlesource.com/c/chromium/src/+/696765/5/third_party/WebKit/Source/platform/bindings/RuntimeCallStatsTest.cpp#255 

https://chromium-review.googlesource.com/c/chromium/src/+/696765/5/third_party/WebKit/Source/platform/loader/SubresourceIntegrityTest.cpp#330

As Xianzhu@ suggested, we can auto-generate these scoped features using the python script based on runtime_enabled_features.json5.


Project Member

Comment 7 by bugdroid1@chromium.org, Oct 12 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/3622b5267b1ddaa0d1b3de6586f5c4445a373179

commit 3622b5267b1ddaa0d1b3de6586f5c4445a373179
Author: shahriar rostami <shahriar.rostami@gmail.com>
Date: Thu Oct 12 19:44:58 2017

Use scoped RuntimeEnabledFeature setters for tests to ensure settings
are restored for other tests

Make changes to use scoped RuntimeEnabledFeature setters in almost all test
classes that used these setters.
It also modified/refactored existing workarounds/solutions which had implemented
differently. Now all places use the same style and these scoped
RuntimeEnabledFeatures are re-usable.

Bug:  769541 
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_layout_tests_layout_ng
Change-Id: I6d28512f9f0b5c0aef134555569a4f585b8f9d37
Reviewed-on: https://chromium-review.googlesource.com/696765
Commit-Queue: Philip Rogers <pdr@chromium.org>
Reviewed-by: Xianzhu Wang <wangxianzhu@chromium.org>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Reviewed-by: Philip Rogers <pdr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#508384}
[modify] https://crrev.com/3622b5267b1ddaa0d1b3de6586f5c4445a373179/third_party/WebKit/Source/bindings/core/v8/serialization/V8ScriptValueSerializerTest.cpp
[modify] https://crrev.com/3622b5267b1ddaa0d1b3de6586f5c4445a373179/third_party/WebKit/Source/core/animation/AnimationSimTest.cpp
[modify] https://crrev.com/3622b5267b1ddaa0d1b3de6586f5c4445a373179/third_party/WebKit/Source/core/css/parser/CSSPropertyParserTest.cpp
[modify] https://crrev.com/3622b5267b1ddaa0d1b3de6586f5c4445a373179/third_party/WebKit/Source/core/dom/DocumentTest.cpp
[modify] https://crrev.com/3622b5267b1ddaa0d1b3de6586f5c4445a373179/third_party/WebKit/Source/core/exported/WebFrameTest.cpp
[modify] https://crrev.com/3622b5267b1ddaa0d1b3de6586f5c4445a373179/third_party/WebKit/Source/core/exported/WebViewTest.cpp
[modify] https://crrev.com/3622b5267b1ddaa0d1b3de6586f5c4445a373179/third_party/WebKit/Source/core/frame/UseCounterTest.cpp
[modify] https://crrev.com/3622b5267b1ddaa0d1b3de6586f5c4445a373179/third_party/WebKit/Source/core/frame/VisualViewportTest.cpp
[modify] https://crrev.com/3622b5267b1ddaa0d1b3de6586f5c4445a373179/third_party/WebKit/Source/core/frame/csp/ContentSecurityPolicyTest.cpp
[modify] https://crrev.com/3622b5267b1ddaa0d1b3de6586f5c4445a373179/third_party/WebKit/Source/core/html/HTMLMediaElementEventListenersTest.cpp
[modify] https://crrev.com/3622b5267b1ddaa0d1b3de6586f5c4445a373179/third_party/WebKit/Source/core/html/media/MediaCustomControlsFullscreenDetectorTest.cpp
[modify] https://crrev.com/3622b5267b1ddaa0d1b3de6586f5c4445a373179/third_party/WebKit/Source/core/imagebitmap/ImageBitmapTest.cpp
[modify] https://crrev.com/3622b5267b1ddaa0d1b3de6586f5c4445a373179/third_party/WebKit/Source/core/layout/LayoutBlockTest.cpp
[modify] https://crrev.com/3622b5267b1ddaa0d1b3de6586f5c4445a373179/third_party/WebKit/Source/core/layout/LayoutCountTest.cpp
[modify] https://crrev.com/3622b5267b1ddaa0d1b3de6586f5c4445a373179/third_party/WebKit/Source/core/layout/ScrollAnchorTest.cpp
[modify] https://crrev.com/3622b5267b1ddaa0d1b3de6586f5c4445a373179/third_party/WebKit/Source/core/layout/ScrollbarsTest.cpp
[modify] https://crrev.com/3622b5267b1ddaa0d1b3de6586f5c4445a373179/third_party/WebKit/Source/core/layout/ng/NGInlineLayoutTest.cpp
[modify] https://crrev.com/3622b5267b1ddaa0d1b3de6586f5c4445a373179/third_party/WebKit/Source/core/loader/BaseFetchContextTest.cpp
[modify] https://crrev.com/3622b5267b1ddaa0d1b3de6586f5c4445a373179/third_party/WebKit/Source/core/loader/resource/ImageResourceTest.cpp
[modify] https://crrev.com/3622b5267b1ddaa0d1b3de6586f5c4445a373179/third_party/WebKit/Source/core/origin_trials/OriginTrialContextTest.cpp
[modify] https://crrev.com/3622b5267b1ddaa0d1b3de6586f5c4445a373179/third_party/WebKit/Source/core/page/scrolling/RootScrollerTest.cpp
[modify] https://crrev.com/3622b5267b1ddaa0d1b3de6586f5c4445a373179/third_party/WebKit/Source/core/page/scrolling/ScrollingCoordinatorTest.cpp
[modify] https://crrev.com/3622b5267b1ddaa0d1b3de6586f5c4445a373179/third_party/WebKit/Source/core/scheduler/FrameThrottlingTest.cpp
[modify] https://crrev.com/3622b5267b1ddaa0d1b3de6586f5c4445a373179/third_party/WebKit/Source/core/scheduler/ThrottlingTest.cpp
[modify] https://crrev.com/3622b5267b1ddaa0d1b3de6586f5c4445a373179/third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2DTest.cpp
[modify] https://crrev.com/3622b5267b1ddaa0d1b3de6586f5c4445a373179/third_party/WebKit/Source/modules/media_controls/MediaControlsImplTest.cpp
[modify] https://crrev.com/3622b5267b1ddaa0d1b3de6586f5c4445a373179/third_party/WebKit/Source/modules/media_controls/MediaControlsOrientationLockDelegateTest.cpp
[modify] https://crrev.com/3622b5267b1ddaa0d1b3de6586f5c4445a373179/third_party/WebKit/Source/modules/media_controls/MediaControlsRotateToFullscreenDelegateTest.cpp
[modify] https://crrev.com/3622b5267b1ddaa0d1b3de6586f5c4445a373179/third_party/WebKit/Source/modules/remoteplayback/RemotePlaybackTest.cpp
[modify] https://crrev.com/3622b5267b1ddaa0d1b3de6586f5c4445a373179/third_party/WebKit/Source/platform/animation/TimingFunctionTest.cpp
[modify] https://crrev.com/3622b5267b1ddaa0d1b3de6586f5c4445a373179/third_party/WebKit/Source/platform/bindings/RuntimeCallStatsTest.cpp
[modify] https://crrev.com/3622b5267b1ddaa0d1b3de6586f5c4445a373179/third_party/WebKit/Source/platform/graphics/BitmapImageTest.cpp
[modify] https://crrev.com/3622b5267b1ddaa0d1b3de6586f5c4445a373179/third_party/WebKit/Source/platform/graphics/Canvas2DLayerBridgeTest.cpp
[modify] https://crrev.com/3622b5267b1ddaa0d1b3de6586f5c4445a373179/third_party/WebKit/Source/platform/graphics/gpu/DrawingBufferTest.cpp
[modify] https://crrev.com/3622b5267b1ddaa0d1b3de6586f5c4445a373179/third_party/WebKit/Source/platform/loader/SubresourceIntegrityTest.cpp
[modify] https://crrev.com/3622b5267b1ddaa0d1b3de6586f5c4445a373179/third_party/WebKit/Source/platform/scroll/ScrollableAreaTest.cpp
[modify] https://crrev.com/3622b5267b1ddaa0d1b3de6586f5c4445a373179/third_party/WebKit/Source/platform/testing/RuntimeEnabledFeaturesTestHelpers.h
[modify] https://crrev.com/3622b5267b1ddaa0d1b3de6586f5c4445a373179/third_party/WebKit/Source/platform/weborigin/SecurityOriginTest.cpp

Project Member

Comment 8 by bugdroid1@chromium.org, Oct 13 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/5d729ebb2e2e018acb3165889d5765036743b466

commit 5d729ebb2e2e018acb3165889d5765036743b466
Author: Xiaocheng Hu <xiaochengh@chromium.org>
Date: Fri Oct 13 18:29:26 2017

Use scoped RuntimeEnabledFeature setters in LayoutTextTest

Since RuntimeEnabledFeature settings are not automatically reset
between tests, tests should use scoped setters so that they do not
introduce flakes.

Bug:  769541 , 771398
Change-Id: I98ceb13014f5a1a39e49227d1ecb1b209b673487
Reviewed-on: https://chromium-review.googlesource.com/716241
Reviewed-by: Koji Ishii <kojii@chromium.org>
Reviewed-by: Emil A Eklund <eae@chromium.org>
Commit-Queue: Emil A Eklund <eae@chromium.org>
Cr-Commit-Position: refs/heads/master@{#508762}
[modify] https://crrev.com/5d729ebb2e2e018acb3165889d5765036743b466/third_party/WebKit/Source/core/layout/LayoutTextTest.cpp
[modify] https://crrev.com/5d729ebb2e2e018acb3165889d5765036743b466/third_party/WebKit/Source/platform/testing/RuntimeEnabledFeaturesTestHelpers.h

Project Member

Comment 9 by bugdroid1@chromium.org, Oct 24 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/b1395c91b6ae35462b0b04795ac5707b4786661d

commit b1395c91b6ae35462b0b04795ac5707b4786661d
Author: Gyuyoung Kim <gyuyoung.kim@lge.com>
Date: Tue Oct 24 01:20:27 2017

Use scoped runtime enabled settings for TimerThrottlingForHiddenFrames test

As a step to remove uses of RuntimeEnabledFeatures::Set*Enabled, this CL changes
RuntimeEnabledFeatures::SetTimerThrottlingForHiddenFramesEnabled with
ScopedTimerThrottlingForHiddenFramesForTest.

Bug:  769541 
Change-Id: Iaed7014f51675f2f560dc34b221cdbb9bbe0237f
Reviewed-on: https://chromium-review.googlesource.com/732875
Reviewed-by: Sami Kyöstilä <skyostil@chromium.org>
Commit-Queue: Gyuyoung Kim <gyuyoung.kim@chromium.org>
Cr-Commit-Position: refs/heads/master@{#510983}
[modify] https://crrev.com/b1395c91b6ae35462b0b04795ac5707b4786661d/third_party/WebKit/Source/platform/scheduler/renderer/web_frame_scheduler_impl_unittest.cc
[modify] https://crrev.com/b1395c91b6ae35462b0b04795ac5707b4786661d/third_party/WebKit/Source/platform/testing/RuntimeEnabledFeaturesTestHelpers.h

Project Member

Comment 10 by bugdroid1@chromium.org, Oct 25 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/850d030fcd1f1d26086ae965d38d6794e3513830

commit 850d030fcd1f1d26086ae965d38d6794e3513830
Author: Gyuyoung Kim <gyuyoung.kim@lge.com>
Date: Wed Oct 25 05:41:48 2017

Use the scoped RuntimeEnabledFeature in ImageBitmapTest

Although  issue 696765  already changed the file to use ScopedExperimentalCanvasFeaturesForTest,
it looks there is still a use of RuntimeEnabledFeatures in PrepareBitmapOptionsAndSetRuntimeFlags.
This cl fixes it.

Bug:  769541 
Change-Id: Id714b78ebde577c2365628c4628ed342e927aa5a
Reviewed-on: https://chromium-review.googlesource.com/735280
Commit-Queue: Gyuyoung Kim <gyuyoung.kim@chromium.org>
Reviewed-by: Xianzhu Wang <wangxianzhu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#511384}
[modify] https://crrev.com/850d030fcd1f1d26086ae965d38d6794e3513830/third_party/WebKit/Source/core/imagebitmap/ImageBitmapTest.cpp

Project Member

Comment 11 by bugdroid1@chromium.org, Oct 25 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/6f4f1de55d5851726d377fc26605062c3d6604ca

commit 6f4f1de55d5851726d377fc26605062c3d6604ca
Author: Gyuyoung Kim <gyuyoung.kim@lge.com>
Date: Wed Oct 25 15:06:44 2017

Use ScopedRuntimeEnabledFeatureForTest in BitmapImageTestWithMockDecoder::FrameSkipTracking

This CL removes calls to RuntimeEnabledFeatures:::SetCompositorImageAnimationsEnabled
and instead uses scoped settings setters to ensure test settings aren't used in next tests.

Bug:  769541 
Change-Id: Iec8c228edaa37933460d2e19b8bff237301ae577
Reviewed-on: https://chromium-review.googlesource.com/737592
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Commit-Queue: Stephen Chenney <schenney@chromium.org>
Cr-Commit-Position: refs/heads/master@{#511461}
[modify] https://crrev.com/6f4f1de55d5851726d377fc26605062c3d6604ca/third_party/WebKit/Source/platform/graphics/BitmapImageTest.cpp

Project Member

Comment 12 by bugdroid1@chromium.org, Oct 31 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/adb73f3ceb63f70d495b000e85235c6719ff8de9

commit adb73f3ceb63f70d495b000e85235c6719ff8de9
Author: Gyuyoung Kim <gyuyoung.kim@lge.com>
Date: Tue Oct 31 07:50:37 2017

Introduce NGLayoutTest to use ScopedLayoutNGForTest for testing

This CL removes calls to RuntimeEnabledFeatures:::SetLayoutNGEnabled and instead uses scoped
settings setters to ensure test settings aren't used in next tests. To use that, this CL
introduces NGLayoutTest that inherits RenderingTest and ScopedLayoutNGForTest. Then child NGFooClass
inherit it instead of RenderingTest.

Bug:  769541 
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_layout_tests_layout_ng;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: I6f73077a694dd10750e458cd2bc619005cce1a42
Reviewed-on: https://chromium-review.googlesource.com/737597
Reviewed-by: Xianzhu Wang <wangxianzhu@chromium.org>
Commit-Queue: Xianzhu Wang <wangxianzhu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#512774}
[modify] https://crrev.com/adb73f3ceb63f70d495b000e85235c6719ff8de9/third_party/WebKit/Source/core/BUILD.gn
[modify] https://crrev.com/adb73f3ceb63f70d495b000e85235c6719ff8de9/third_party/WebKit/Source/core/layout/ng/inline/ng_inline_node_test.cc
[modify] https://crrev.com/adb73f3ceb63f70d495b000e85235c6719ff8de9/third_party/WebKit/Source/core/layout/ng/inline/ng_offset_mapping_test.cc
[modify] https://crrev.com/adb73f3ceb63f70d495b000e85235c6719ff8de9/third_party/WebKit/Source/core/layout/ng/ng_base_layout_algorithm_test.cc
[modify] https://crrev.com/adb73f3ceb63f70d495b000e85235c6719ff8de9/third_party/WebKit/Source/core/layout/ng/ng_base_layout_algorithm_test.h
[modify] https://crrev.com/adb73f3ceb63f70d495b000e85235c6719ff8de9/third_party/WebKit/Source/core/layout/ng/ng_block_child_iterator_test.cc
[modify] https://crrev.com/adb73f3ceb63f70d495b000e85235c6719ff8de9/third_party/WebKit/Source/core/layout/ng/ng_block_node_test.cc
[modify] https://crrev.com/adb73f3ceb63f70d495b000e85235c6719ff8de9/third_party/WebKit/Source/core/layout/ng/ng_constraint_space_builder_test.cc
[add] https://crrev.com/adb73f3ceb63f70d495b000e85235c6719ff8de9/third_party/WebKit/Source/core/layout/ng/ng_layout_test.h
[modify] https://crrev.com/adb73f3ceb63f70d495b000e85235c6719ff8de9/third_party/WebKit/Source/core/layout/ng/ng_out_of_flow_layout_part_test.cc
[modify] https://crrev.com/adb73f3ceb63f70d495b000e85235c6719ff8de9/third_party/WebKit/Source/core/paint/ng/ng_text_fragment_painter_test.cc

Project Member

Comment 13 by bugdroid1@chromium.org, Nov 1 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/6184c89f2e5c202606fe1c75982ba99b305ed113

commit 6184c89f2e5c202606fe1c75982ba99b305ed113
Author: Gyuyoung Kim <gyuyoung.kim@lge.com>
Date: Wed Nov 01 16:30:30 2017

Make NGTextFragmentPainterTest to use ScopedLayoutNGPaintFragmentsForTest

This CL removes calls to RuntimeEnabledFeatures:::SetLayoutNGPaintFragmentsEnabled
and instead make NGTextFragmentPainterTest to inherit ScopedLayoutNGPaintFragmentsForTest
in order to use scoped settings setters to ensure test settings aren't used in other tests.

Additionally this CL adds a description for NGLayoutTest class.

Bug:  769541 
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_layout_tests_layout_ng;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: I5ee63d6308f499e3de03e5ccbcdd9002592cdbd8
Reviewed-on: https://chromium-review.googlesource.com/748508
Reviewed-by: Xianzhu Wang <wangxianzhu@chromium.org>
Commit-Queue: Xianzhu Wang <wangxianzhu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#513147}
[modify] https://crrev.com/6184c89f2e5c202606fe1c75982ba99b305ed113/third_party/WebKit/Source/core/layout/ng/ng_layout_test.h
[modify] https://crrev.com/6184c89f2e5c202606fe1c75982ba99b305ed113/third_party/WebKit/Source/core/paint/ng/ng_text_fragment_painter_test.cc

Project Member

Comment 14 by bugdroid1@chromium.org, Nov 2 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/5206c50a1851aa794ba33739b7226c1734750df8

commit 5206c50a1851aa794ba33739b7226c1734750df8
Author: shahriar rostami <shahriar.rostami@gmail.com>
Date: Thu Nov 02 04:50:22 2017

Auto generating RuntimeEnabledFeaturesTestHelpers.h by make_runtime_features.py

To continue:
https://chromium-review.googlesource.com/c/chromium/src/+/696765

The RuntimeEnabledFeaturesTestHelpers.h file is now auto-generated to reduce
the manual work. Generated by  make_runtime_features.py and
RuntimeEnabledFeaturesTestHelpers.h.tmpl as a template.

Bug:  769541 
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: I2315ad4c5955a8c3573d4e51da684f0d97796e35
Reviewed-on: https://chromium-review.googlesource.com/740963
Commit-Queue: Xianzhu Wang <wangxianzhu@chromium.org>
Reviewed-by: Xianzhu Wang <wangxianzhu@chromium.org>
Reviewed-by: Philip Rogers <pdr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#513407}
[modify] https://crrev.com/5206c50a1851aa794ba33739b7226c1734750df8/third_party/WebKit/Source/build/scripts/make_runtime_features.py
[add] https://crrev.com/5206c50a1851aa794ba33739b7226c1734750df8/third_party/WebKit/Source/build/scripts/templates/RuntimeEnabledFeaturesTestHelpers.h.tmpl
[modify] https://crrev.com/5206c50a1851aa794ba33739b7226c1734750df8/third_party/WebKit/Source/core/animation/CompositorAnimationsTest.cpp
[modify] https://crrev.com/5206c50a1851aa794ba33739b7226c1734750df8/third_party/WebKit/Source/core/frame/VisualViewportTest.cpp
[modify] https://crrev.com/5206c50a1851aa794ba33739b7226c1734750df8/third_party/WebKit/Source/core/page/scrolling/RootScrollerTest.cpp
[modify] https://crrev.com/5206c50a1851aa794ba33739b7226c1734750df8/third_party/WebKit/Source/core/paint/compositing/CompositingReasonFinderTest.cpp
[modify] https://crrev.com/5206c50a1851aa794ba33739b7226c1734750df8/third_party/WebKit/Source/platform/BUILD.gn
[delete] https://crrev.com/9aac0afc8dccc9616edfb1710293757905611a0d/third_party/WebKit/Source/platform/testing/RuntimeEnabledFeaturesTestHelpers.h

Comment 15 by pdr@chromium.org, Nov 2 2017

Cc: shahriar...@gmail.com
Status: Fixed (was: Available)
Woohoo! I think this has been fixed.
Project Member

Comment 16 by bugdroid1@chromium.org, Nov 6 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/8ec459c83783d96959fdb0dbfb046faca01e4831

commit 8ec459c83783d96959fdb0dbfb046faca01e4831
Author: Gyuyoung Kim <gyuyoung.kim@lge.com>
Date: Mon Nov 06 17:04:17 2017

Make FlatTreeTraversalNgTest to use ScopedIncrementalShadowDOMForTest

This CL removes calls to RuntimeEnabledFeatures::
SetIncrementalShadowDOMEnabled in the constructor and destructor,
and instead make FlatTreeTraversalNgTest to inherit
ScopedIncrementalShadowDOMForTest in order to use scoped settings
setters.

Bug:  769541 
Change-Id: Iebfc398e5d704db6430c936f7b7348c558779b8d
Reviewed-on: https://chromium-review.googlesource.com/753170
Commit-Queue: Xianzhu Wang <wangxianzhu@chromium.org>
Reviewed-by: Xianzhu Wang <wangxianzhu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#514155}
[modify] https://crrev.com/8ec459c83783d96959fdb0dbfb046faca01e4831/third_party/WebKit/Source/core/dom/ng/flat_tree_traversal_ng_test.cc

Project Member

Comment 17 by bugdroid1@chromium.org, Nov 9 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/9d30e5e343d85ad29301796debb3d1666413c37b

commit 9d30e5e343d85ad29301796debb3d1666413c37b
Author: Gyuyoung Kim <gyuyoung.kim@lge.com>
Date: Thu Nov 09 08:35:14 2017

Make NGFooLayoutAlgorithmTest to use ScopedLayoutNGFragmentCachingForTest

NGColumnLayoutAlgorithmTest and NGBlockLayoutAlgorithmTest have been using
RuntimeEnabledFeatures::SetLayoutNGFragmentCachingEnabled for testing. This cl
removes the use of RuntimeEnabledFeatures, instead make them to use
ScopedLayoutNGPaintFragmentsForTest.

Bug:  769541 
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_layout_tests_layout_ng
Change-Id: I4794372fedbe4df6bdc0167487b95b4295970e2a
Reviewed-on: https://chromium-review.googlesource.com/758308
Commit-Queue: Gyuyoung Kim <gyuyoung.kim@chromium.org>
Reviewed-by: Xianzhu Wang <wangxianzhu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#515124}
[modify] https://crrev.com/9d30e5e343d85ad29301796debb3d1666413c37b/third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm_test.cc
[modify] https://crrev.com/9d30e5e343d85ad29301796debb3d1666413c37b/third_party/WebKit/Source/core/layout/ng/ng_column_layout_algorithm_test.cc

Project Member

Comment 18 by bugdroid1@chromium.org, Nov 13 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/23804a86d23e430156e96a8ee069503be0822012

commit 23804a86d23e430156e96a8ee069503be0822012
Author: Gyuyoung Kim <gyuyoung.kim@lge.com>
Date: Mon Nov 13 16:48:43 2017

Make RenderingTest to use ScopedOverlayScrollbarsForTest

RenderingTest::SetUp has been using RuntimeEnabledFeatures::SetOverlayScrollbarsEnabled
for testing. This CL remove the use, instead make it to use ScopedOverlayScrollbarsForTest.

Bug:  769541 
Change-Id: I7fa923adc379ad219065bdc57c54878dea637acd
Reviewed-on: https://chromium-review.googlesource.com/762968
Commit-Queue: Xianzhu Wang <wangxianzhu@chromium.org>
Reviewed-by: Xianzhu Wang <wangxianzhu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#515961}
[modify] https://crrev.com/23804a86d23e430156e96a8ee069503be0822012/third_party/WebKit/Source/core/frame/FrameTestHelpers.h
[modify] https://crrev.com/23804a86d23e430156e96a8ee069503be0822012/third_party/WebKit/Source/core/layout/LayoutTestHelper.cpp
[modify] https://crrev.com/23804a86d23e430156e96a8ee069503be0822012/third_party/WebKit/Source/core/layout/LayoutTestHelper.h
[modify] https://crrev.com/23804a86d23e430156e96a8ee069503be0822012/third_party/WebKit/Source/core/layout/ScrollbarsTest.cpp
[modify] https://crrev.com/23804a86d23e430156e96a8ee069503be0822012/third_party/WebKit/Source/platform/BUILD.gn
[add] https://crrev.com/23804a86d23e430156e96a8ee069503be0822012/third_party/WebKit/Source/platform/testing/UseMockScrollbarSettings.h

Sign in to add a comment