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

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

Issue 1511003003: Use refs for non-null GraphicsContext, Scrollbar, etc. in scrollbar related code (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@ScrollbarRemove
Patch Set: yet another mac fix Created 5 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 /* 1 /*
2 * Copyright (C) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 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 are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 // WebViewHelper includes this, so this is only needed if a test doesn't use Web ViewHelper or the test 80 // WebViewHelper includes this, so this is only needed if a test doesn't use Web ViewHelper or the test
81 // needs a bigger scope of mock scrollbar settings than the scope of WebViewHelp er. 81 // needs a bigger scope of mock scrollbar settings than the scope of WebViewHelp er.
82 class UseMockScrollbarSettings { 82 class UseMockScrollbarSettings {
83 public: 83 public:
84 UseMockScrollbarSettings() 84 UseMockScrollbarSettings()
85 : m_originalMockScrollbarEnabled(Settings::mockScrollbarsEnabled()) 85 : m_originalMockScrollbarEnabled(Settings::mockScrollbarsEnabled())
86 , m_originalOverlayScrollbarsEnabled(RuntimeEnabledFeatures::overlayScro llbarsEnabled()) 86 , m_originalOverlayScrollbarsEnabled(RuntimeEnabledFeatures::overlayScro llbarsEnabled())
87 { 87 {
88 Settings::setMockScrollbarsEnabled(true); 88 Settings::setMockScrollbarsEnabled(true);
89 RuntimeEnabledFeatures::setOverlayScrollbarsEnabled(true); 89 RuntimeEnabledFeatures::setOverlayScrollbarsEnabled(true);
90 EXPECT_TRUE(ScrollbarTheme::theme()->usesOverlayScrollbars()); 90 EXPECT_TRUE(ScrollbarTheme::theme().usesOverlayScrollbars());
91 } 91 }
92 92
93 ~UseMockScrollbarSettings() 93 ~UseMockScrollbarSettings()
94 { 94 {
95 Settings::setMockScrollbarsEnabled(m_originalMockScrollbarEnabled); 95 Settings::setMockScrollbarsEnabled(m_originalMockScrollbarEnabled);
96 RuntimeEnabledFeatures::setOverlayScrollbarsEnabled(m_originalOverlayScr ollbarsEnabled); 96 RuntimeEnabledFeatures::setOverlayScrollbarsEnabled(m_originalOverlayScr ollbarsEnabled);
97 } 97 }
98 98
99 private: 99 private:
100 bool m_originalMockScrollbarEnabled; 100 bool m_originalMockScrollbarEnabled;
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 WebLayerTreeView* layerTreeView() override { return m_layerTreeView.get(); } 173 WebLayerTreeView* layerTreeView() override { return m_layerTreeView.get(); }
174 174
175 private: 175 private:
176 OwnPtr<WebLayerTreeView> m_layerTreeView; 176 OwnPtr<WebLayerTreeView> m_layerTreeView;
177 }; 177 };
178 178
179 } // namespace FrameTestHelpers 179 } // namespace FrameTestHelpers
180 } // namespace blink 180 } // namespace blink
181 181
182 #endif // FrameTestHelpers_h 182 #endif // FrameTestHelpers_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/mac/WebScrollbarTheme.mm ('k') | third_party/WebKit/public/platform/WebScrollbarThemePainter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698