Commit 9d30e5e3 authored by Gyuyoung Kim's avatar Gyuyoung Kim Committed by Commit Bot

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: default avatarXianzhu Wang <wangxianzhu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#515124}
parent eb2186f3
......@@ -18,7 +18,7 @@
#include "core/layout/ng/ng_physical_box_fragment.h"
#include "core/layout/ng/ng_physical_fragment.h"
#include "core/style/ComputedStyle.h"
#include "platform/runtime_enabled_features.h"
#include "platform/testing/RuntimeEnabledFeaturesTestHelpers.h"
#include "testing/gmock/include/gmock/gmock.h"
namespace blink {
......@@ -30,9 +30,6 @@ using ::testing::Pointee;
class NGBlockLayoutAlgorithmTest : public NGBaseLayoutAlgorithmTest {
protected:
void SetUp() override {
// Make sure to reset this, except for the one test that needs it.
RuntimeEnabledFeatures::SetLayoutNGFragmentCachingEnabled(false);
NGBaseLayoutAlgorithmTest::SetUp();
style_ = ComputedStyle::Create();
}
......@@ -89,7 +86,7 @@ TEST_F(NGBlockLayoutAlgorithmTest, FixedSize) {
}
TEST_F(NGBlockLayoutAlgorithmTest, Caching) {
RuntimeEnabledFeatures::SetLayoutNGFragmentCachingEnabled(true);
ScopedLayoutNGFragmentCachingForTest layout_ng_fragment_caching(true);
SetBodyInnerHTML(R"HTML(
<div id="box" style="width:30px; height:40px"></div>
......
......@@ -14,9 +14,6 @@ namespace {
class NGColumnLayoutAlgorithmTest : public NGBaseLayoutAlgorithmTest {
protected:
void SetUp() override {
// Make sure to reset this, except for the one test that needs it.
RuntimeEnabledFeatures::SetLayoutNGFragmentCachingEnabled(false);
NGBaseLayoutAlgorithmTest::SetUp();
style_ = ComputedStyle::Create();
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment