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

Side by Side Diff: third_party/WebKit/Source/core/paint/FirstMeaningfulPaintDetectorTest.cpp

Issue 2742573005: Avoid to include IDL-generated headers from EventTarget.h and Node.h (Closed)
Patch Set: . 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 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "core/paint/FirstMeaningfulPaintDetector.h" 5 #include "core/paint/FirstMeaningfulPaintDetector.h"
6 6
7 #include "core/paint/PaintTiming.h" 7 #include "core/paint/PaintTiming.h"
8 #include "core/testing/DummyPageHolder.h" 8 #include "core/testing/DummyPageHolder.h"
9 #include "testing/gtest/include/gtest/gtest.h" 9 #include "testing/gtest/include/gtest/gtest.h"
10 #include "wtf/text/StringBuilder.h"
10 11
11 namespace blink { 12 namespace blink {
12 13
13 class FirstMeaningfulPaintDetectorTest : public testing::Test { 14 class FirstMeaningfulPaintDetectorTest : public testing::Test {
14 protected: 15 protected:
15 void SetUp() override { 16 void SetUp() override {
16 m_dummyPageHolder = DummyPageHolder::create(IntSize(800, 600)); 17 m_dummyPageHolder = DummyPageHolder::create(IntSize(800, 600));
17 s_timeElapsed = 0.0; 18 s_timeElapsed = 0.0;
18 m_originalTimeFunction = setTimeFunctionsForTesting(returnMockTime); 19 m_originalTimeFunction = setTimeFunctionsForTesting(returnMockTime);
19 } 20 }
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 FirstMeaningfulPaintShouldNotBeBeforeFirstContentfulPaint) { 121 FirstMeaningfulPaintShouldNotBeBeforeFirstContentfulPaint) {
121 paintTiming().markFirstPaint(); 122 paintTiming().markFirstPaint();
122 simulateLayoutAndPaint(10); 123 simulateLayoutAndPaint(10);
123 paintTiming().markFirstContentfulPaint(); 124 paintTiming().markFirstContentfulPaint();
124 simulateNetworkStable(); 125 simulateNetworkStable();
125 EXPECT_GE(paintTiming().firstMeaningfulPaint(), 126 EXPECT_GE(paintTiming().firstMeaningfulPaint(),
126 paintTiming().firstContentfulPaint()); 127 paintTiming().firstContentfulPaint());
127 } 128 }
128 129
129 } // namespace blink 130 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutMedia.h ('k') | third_party/WebKit/Source/core/paint/PaintInvalidator.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698