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

Side by Side Diff: third_party/WebKit/Source/web/tests/ScrollingCoordinatorTest.cpp

Issue 2165573003: Simplify tests by using Web*Impl types directly. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 /* 1 /*
2 * Copyright (C) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 WebLayer* getRootScrollLayer() 91 WebLayer* getRootScrollLayer()
92 { 92 {
93 PaintLayerCompositor* compositor = frame()->contentLayoutItem().composit or(); 93 PaintLayerCompositor* compositor = frame()->contentLayoutItem().composit or();
94 DCHECK(compositor); 94 DCHECK(compositor);
95 DCHECK(compositor->scrollLayer()); 95 DCHECK(compositor->scrollLayer());
96 96
97 WebLayer* webScrollLayer = compositor->scrollLayer()->platformLayer(); 97 WebLayer* webScrollLayer = compositor->scrollLayer()->platformLayer();
98 return webScrollLayer; 98 return webScrollLayer;
99 } 99 }
100 100
101 WebViewImpl* webViewImpl() const { return m_helper.webViewImpl(); } 101 WebViewImpl* webViewImpl() const { return m_helper.webView(); }
102 LocalFrame* frame() const { return m_helper.webViewImpl()->mainFrameImpl()-> frame(); } 102 LocalFrame* frame() const { return m_helper.webView()->mainFrameImpl()->fram e(); }
103 103
104 WebLayerTreeView* webLayerTreeView() const { return webViewImpl()->layerTree View(); } 104 WebLayerTreeView* webLayerTreeView() const { return webViewImpl()->layerTree View(); }
105 105
106 protected: 106 protected:
107 std::string m_baseURL; 107 std::string m_baseURL;
108 FrameTestHelpers::TestWebViewClient m_mockWebViewClient; 108 FrameTestHelpers::TestWebViewClient m_mockWebViewClient;
109 109
110 private: 110 private:
111 static void configureSettings(WebSettings* settings) 111 static void configureSettings(WebSettings* settings)
112 { 112 {
(...skipping 564 matching lines...) Expand 10 before | Expand all | Expand 10 after
677 // remove custom scrollbar class, the scrollbar is expected to scroll on 677 // remove custom scrollbar class, the scrollbar is expected to scroll on
678 // impl thread as it is an overlay scrollbar. 678 // impl thread as it is an overlay scrollbar.
679 container->removeAttribute("class"); 679 container->removeAttribute("class");
680 forceFullCompositingUpdate(); 680 forceFullCompositingUpdate();
681 scrollbarGraphicsLayer = compositedLayerMapping->layerForVerticalScrollbar() ; 681 scrollbarGraphicsLayer = compositedLayerMapping->layerForVerticalScrollbar() ;
682 ASSERT_FALSE(scrollbarGraphicsLayer->platformLayer()->shouldScrollOnMainThre ad()); 682 ASSERT_FALSE(scrollbarGraphicsLayer->platformLayer()->shouldScrollOnMainThre ad());
683 ASSERT_FALSE(scrollbarGraphicsLayer->platformLayer()->mainThreadScrollingRea sons() & MainThreadScrollingReason::kCustomScrollbarScrolling); 683 ASSERT_FALSE(scrollbarGraphicsLayer->platformLayer()->mainThreadScrollingRea sons() & MainThreadScrollingReason::kCustomScrollbarScrolling);
684 } 684 }
685 685
686 } // namespace blink 686 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698