OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 <stddef.h> | 5 #include <stddef.h> |
6 #include <stdint.h> | 6 #include <stdint.h> |
7 #include <tuple> | 7 #include <tuple> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/callback.h" | 10 #include "base/callback.h" |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
77 #include "third_party/WebKit/public/web/WebPerformance.h" | 77 #include "third_party/WebKit/public/web/WebPerformance.h" |
78 #include "third_party/WebKit/public/web/WebRuntimeFeatures.h" | 78 #include "third_party/WebKit/public/web/WebRuntimeFeatures.h" |
79 #include "third_party/WebKit/public/web/WebScriptSource.h" | 79 #include "third_party/WebKit/public/web/WebScriptSource.h" |
80 #include "third_party/WebKit/public/web/WebSettings.h" | 80 #include "third_party/WebKit/public/web/WebSettings.h" |
81 #include "third_party/WebKit/public/web/WebView.h" | 81 #include "third_party/WebKit/public/web/WebView.h" |
82 #include "third_party/WebKit/public/web/WebWindowFeatures.h" | 82 #include "third_party/WebKit/public/web/WebWindowFeatures.h" |
83 #include "ui/events/event.h" | 83 #include "ui/events/event.h" |
84 #include "ui/events/keycodes/keyboard_codes.h" | 84 #include "ui/events/keycodes/keyboard_codes.h" |
85 #include "ui/gfx/codec/jpeg_codec.h" | 85 #include "ui/gfx/codec/jpeg_codec.h" |
86 #include "ui/gfx/range/range.h" | 86 #include "ui/gfx/range/range.h" |
| 87 #include "ui/native_theme/native_theme_switches.h" |
87 | 88 |
88 #if defined(USE_AURA) && defined(USE_X11) | 89 #if defined(USE_AURA) && defined(USE_X11) |
89 #include <X11/Xlib.h> | 90 #include <X11/Xlib.h> |
90 #include "ui/events/event_constants.h" | 91 #include "ui/events/event_constants.h" |
91 #include "ui/events/keycodes/keyboard_code_conversion.h" | 92 #include "ui/events/keycodes/keyboard_code_conversion.h" |
92 #include "ui/events/test/events_test_utils.h" | 93 #include "ui/events/test/events_test_utils.h" |
93 #include "ui/events/test/events_test_utils_x11.h" | 94 #include "ui/events/test/events_test_utils_x11.h" |
94 #endif | 95 #endif |
95 | 96 |
96 #if defined(USE_OZONE) | 97 #if defined(USE_OZONE) |
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
213 mock_keyboard_.reset(new MockKeyboard()); | 214 mock_keyboard_.reset(new MockKeyboard()); |
214 } | 215 } |
215 | 216 |
216 ~RenderViewImplTest() override {} | 217 ~RenderViewImplTest() override {} |
217 | 218 |
218 void SetUp() override { | 219 void SetUp() override { |
219 // Enable Blink's experimental and test only features so that test code | 220 // Enable Blink's experimental and test only features so that test code |
220 // does not have to bother enabling each feature. | 221 // does not have to bother enabling each feature. |
221 WebRuntimeFeatures::enableExperimentalFeatures(true); | 222 WebRuntimeFeatures::enableExperimentalFeatures(true); |
222 WebRuntimeFeatures::enableTestOnlyFeatures(true); | 223 WebRuntimeFeatures::enableTestOnlyFeatures(true); |
| 224 WebRuntimeFeatures::enableOverlayScrollbars( |
| 225 ui::IsOverlayScrollbarEnabled()); |
223 RenderViewTest::SetUp(); | 226 RenderViewTest::SetUp(); |
224 } | 227 } |
225 | 228 |
226 RenderViewImpl* view() { | 229 RenderViewImpl* view() { |
227 return static_cast<RenderViewImpl*>(view_); | 230 return static_cast<RenderViewImpl*>(view_); |
228 } | 231 } |
229 | 232 |
230 TestRenderFrame* frame() { | 233 TestRenderFrame* frame() { |
231 return static_cast<TestRenderFrame*>(view()->GetMainRenderFrame()); | 234 return static_cast<TestRenderFrame*>(view()->GetMainRenderFrame()); |
232 } | 235 } |
(...skipping 2256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2489 ExpectPauseAndResume(3); | 2492 ExpectPauseAndResume(3); |
2490 blink::WebScriptSource source2( | 2493 blink::WebScriptSource source2( |
2491 WebString::fromUTF8("function func2() { func1(); }; func2();")); | 2494 WebString::fromUTF8("function func2() { func1(); }; func2();")); |
2492 frame()->GetWebFrame()->executeScriptInIsolatedWorld(17, &source2, 1, 1); | 2495 frame()->GetWebFrame()->executeScriptInIsolatedWorld(17, &source2, 1, 1); |
2493 | 2496 |
2494 EXPECT_FALSE(IsPaused()); | 2497 EXPECT_FALSE(IsPaused()); |
2495 Detach(); | 2498 Detach(); |
2496 } | 2499 } |
2497 | 2500 |
2498 } // namespace content | 2501 } // namespace content |
OLD | NEW |