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

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

Issue 2970833002: Be explicit about namespace testing to not mix it with blink::testing (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 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 "platform/testing/TestingPlatformSupport.h" 9 #include "platform/testing/TestingPlatformSupport.h"
10 #include "platform/wtf/text/StringBuilder.h" 10 #include "platform/wtf/text/StringBuilder.h"
11 #include "testing/gtest/include/gtest/gtest.h" 11 #include "testing/gtest/include/gtest/gtest.h"
12 12
13 namespace blink { 13 namespace blink {
14 14
15 class FirstMeaningfulPaintDetectorTest : public testing::Test { 15 class FirstMeaningfulPaintDetectorTest : public ::testing::Test {
16 protected: 16 protected:
17 void SetUp() override { 17 void SetUp() override {
18 platform_->AdvanceClockSeconds(1); 18 platform_->AdvanceClockSeconds(1);
19 dummy_page_holder_ = DummyPageHolder::Create(IntSize(800, 600)); 19 dummy_page_holder_ = DummyPageHolder::Create(IntSize(800, 600));
20 } 20 }
21 21
22 double AdvanceClockAndGetTime() { 22 double AdvanceClockAndGetTime() {
23 platform_->AdvanceClockSeconds(1); 23 platform_->AdvanceClockSeconds(1);
24 return MonotonicallyIncreasingTime(); 24 return MonotonicallyIncreasingTime();
25 } 25 }
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after
262 262
263 TEST_F(FirstMeaningfulPaintDetectorTest, UserInteractionBeforeFirstPaint) { 263 TEST_F(FirstMeaningfulPaintDetectorTest, UserInteractionBeforeFirstPaint) {
264 SimulateUserInput(); 264 SimulateUserInput();
265 GetPaintTiming().MarkFirstContentfulPaint(); 265 GetPaintTiming().MarkFirstContentfulPaint();
266 SimulateLayoutAndPaint(10); 266 SimulateLayoutAndPaint(10);
267 SimulateNetworkStable(); 267 SimulateNetworkStable();
268 EXPECT_NE(GetPaintTiming().FirstMeaningfulPaint(), 0.0); 268 EXPECT_NE(GetPaintTiming().FirstMeaningfulPaint(), 0.0);
269 } 269 }
270 270
271 } // namespace blink 271 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698