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

Side by Side Diff: third_party/WebKit/Source/core/loader/ProgressTrackerTest.cpp

Issue 2469873002: [ImageResource 4] Split ImageResource into Resource and Image parts (Closed)
Patch Set: style Created 4 years 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/loader/ProgressTracker.h" 5 #include "core/loader/ProgressTracker.h"
6 6
7 #include "core/frame/Settings.h" 7 #include "core/frame/Settings.h"
8 #include "core/loader/EmptyClients.h" 8 #include "core/loader/EmptyClients.h"
9 #include "core/testing/DummyPageHolder.h" 9 #include "core/testing/DummyPageHolder.h"
10 #include "platform/network/ResourceResponse.h"
10 #include "testing/gtest/include/gtest/gtest.h" 11 #include "testing/gtest/include/gtest/gtest.h"
11 12
12 namespace blink { 13 namespace blink {
13 14
14 class ProgressClient : public EmptyFrameLoaderClient { 15 class ProgressClient : public EmptyFrameLoaderClient {
15 public: 16 public:
16 ProgressClient() : m_lastProgress(0.0) {} 17 ProgressClient() : m_lastProgress(0.0) {}
17 18
18 void progressEstimateChanged(double progressEstimate) override { 19 void progressEstimateChanged(double progressEstimate) override {
19 m_lastProgress = progressEstimate; 20 m_lastProgress = progressEstimate;
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 // .2 for finishing parsing, .5 for all bytes received. 117 // .2 for finishing parsing, .5 for all bytes received.
117 // Medium priority resource is ignored. 118 // Medium priority resource is ignored.
118 progress().completeProgress(1ul); 119 progress().completeProgress(1ul);
119 EXPECT_EQ(0.7, lastProgress()); 120 EXPECT_EQ(0.7, lastProgress());
120 121
121 progress().finishedParsing(); 122 progress().finishedParsing();
122 EXPECT_EQ(1.0, lastProgress()); 123 EXPECT_EQ(1.0, lastProgress());
123 } 124 }
124 125
125 } // namespace blink 126 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698