OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |