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

Side by Side Diff: third_party/WebKit/Source/web/tests/sim/SimWebViewClient.h

Issue 1397713004: Don't bother layout until first navigation is done. Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: another attempt to fix tests Created 4 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
« no previous file with comments | « third_party/WebKit/Source/web/tests/sim/SimTest.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 #ifndef SimWebViewClient_h 5 #ifndef SimWebViewClient_h
6 #define SimWebViewClient_h 6 #define SimWebViewClient_h
7 7
8 #include "web/tests/FrameTestHelpers.h" 8 #include "web/tests/FrameTestHelpers.h"
9 9
10 namespace blink { 10 namespace blink {
11 11
12 class WebLayerTreeView; 12 class WebLayerTreeView;
13 13
14 class SimWebViewClient final : public FrameTestHelpers::TestWebViewClient { 14 class SimWebViewClient final : public FrameTestHelpers::TestWebViewClient {
15 public: 15 public:
16 explicit SimWebViewClient(WebLayerTreeView&); 16 explicit SimWebViewClient(WebLayerTreeView&);
17 17
18 WebLayerTreeView* layerTreeView() override { return m_layerTreeView; } 18 WebLayerTreeView* layerTreeView() override { return m_layerTreeView; }
19 void didUpdateLayout() override { m_hadFirstLayout = true; }
20
21 bool hadFirstLayout() const { return m_hadFirstLayout; }
19 22
20 int visuallyNonEmptyLayoutCount() const { return m_visuallyNonEmptyLayoutCou nt; } 23 int visuallyNonEmptyLayoutCount() const { return m_visuallyNonEmptyLayoutCou nt; }
21 int finishedParsingLayoutCount() const { return m_finishedParsingLayoutCount ; } 24 int finishedParsingLayoutCount() const { return m_finishedParsingLayoutCount ; }
22 int finishedLoadingLayoutCount() const { return m_finishedLoadingLayoutCount ; } 25 int finishedLoadingLayoutCount() const { return m_finishedLoadingLayoutCount ; }
23 26
24 private: 27 private:
25 // WebWidgetClient overrides. 28 // WebWidgetClient overrides.
26 void didMeaningfulLayout(WebMeaningfulLayout) override; 29 void didMeaningfulLayout(WebMeaningfulLayout) override;
27 30
28 int m_visuallyNonEmptyLayoutCount; 31 int m_visuallyNonEmptyLayoutCount;
29 int m_finishedParsingLayoutCount; 32 int m_finishedParsingLayoutCount;
30 int m_finishedLoadingLayoutCount; 33 int m_finishedLoadingLayoutCount;
31 34
32 WebLayerTreeView* m_layerTreeView; 35 WebLayerTreeView* m_layerTreeView;
36 bool m_hadFirstLayout = false;
33 }; 37 };
34 38
35 } // namespace blink 39 } // namespace blink
36 40
37 #endif 41 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/tests/sim/SimTest.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698