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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
54 #include "content/renderer/history_entry.h" | 54 #include "content/renderer/history_entry.h" |
55 #include "content/renderer/history_serialization.h" | 55 #include "content/renderer/history_serialization.h" |
56 #include "content/renderer/navigation_state_impl.h" | 56 #include "content/renderer/navigation_state_impl.h" |
57 #include "content/renderer/render_frame_proxy.h" | 57 #include "content/renderer/render_frame_proxy.h" |
58 #include "content/renderer/render_process.h" | 58 #include "content/renderer/render_process.h" |
59 #include "content/renderer/render_view_impl.h" | 59 #include "content/renderer/render_view_impl.h" |
60 #include "content/shell/browser/shell.h" | 60 #include "content/shell/browser/shell.h" |
61 #include "content/shell/browser/shell_browser_context.h" | 61 #include "content/shell/browser/shell_browser_context.h" |
62 #include "content/test/mock_keyboard.h" | 62 #include "content/test/mock_keyboard.h" |
63 #include "content/test/test_render_frame.h" | 63 #include "content/test/test_render_frame.h" |
| 64 #include "gin/v8_initializer.h" |
64 #include "net/base/net_errors.h" | 65 #include "net/base/net_errors.h" |
65 #include "net/cert/cert_status_flags.h" | 66 #include "net/cert/cert_status_flags.h" |
66 #include "testing/gtest/include/gtest/gtest.h" | 67 #include "testing/gtest/include/gtest/gtest.h" |
67 #include "third_party/WebKit/public/platform/WebData.h" | 68 #include "third_party/WebKit/public/platform/WebData.h" |
68 #include "third_party/WebKit/public/platform/WebHTTPBody.h" | 69 #include "third_party/WebKit/public/platform/WebHTTPBody.h" |
69 #include "third_party/WebKit/public/platform/WebString.h" | 70 #include "third_party/WebKit/public/platform/WebString.h" |
70 #include "third_party/WebKit/public/platform/WebURLResponse.h" | 71 #include "third_party/WebKit/public/platform/WebURLResponse.h" |
71 #include "third_party/WebKit/public/platform/modules/serviceworker/WebServiceWor
kerNetworkProvider.h" | 72 #include "third_party/WebKit/public/platform/modules/serviceworker/WebServiceWor
kerNetworkProvider.h" |
72 #include "third_party/WebKit/public/web/WebDataSource.h" | 73 #include "third_party/WebKit/public/web/WebDataSource.h" |
73 #include "third_party/WebKit/public/web/WebDeviceEmulationParams.h" | 74 #include "third_party/WebKit/public/web/WebDeviceEmulationParams.h" |
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
212 return params; | 213 return params; |
213 } | 214 } |
214 | 215 |
215 } // namespace | 216 } // namespace |
216 | 217 |
217 class RenderViewImplTest : public RenderViewTest { | 218 class RenderViewImplTest : public RenderViewTest { |
218 public: | 219 public: |
219 RenderViewImplTest() { | 220 RenderViewImplTest() { |
220 // Attach a pseudo keyboard device to this object. | 221 // Attach a pseudo keyboard device to this object. |
221 mock_keyboard_.reset(new MockKeyboard()); | 222 mock_keyboard_.reset(new MockKeyboard()); |
| 223 gin::V8Initializer::LoadV8Context(); |
222 } | 224 } |
223 | 225 |
224 ~RenderViewImplTest() override {} | 226 ~RenderViewImplTest() override {} |
225 | 227 |
226 void SetUp() override { | 228 void SetUp() override { |
227 // Enable Blink's experimental and test only features so that test code | 229 // Enable Blink's experimental and test only features so that test code |
228 // does not have to bother enabling each feature. | 230 // does not have to bother enabling each feature. |
229 WebRuntimeFeatures::EnableExperimentalFeatures(true); | 231 WebRuntimeFeatures::EnableExperimentalFeatures(true); |
230 WebRuntimeFeatures::EnableTestOnlyFeatures(true); | 232 WebRuntimeFeatures::EnableTestOnlyFeatures(true); |
231 WebRuntimeFeatures::EnableOverlayScrollbars( | 233 WebRuntimeFeatures::EnableOverlayScrollbars( |
(...skipping 2359 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2591 ExpectPauseAndResume(3); | 2593 ExpectPauseAndResume(3); |
2592 blink::WebScriptSource source2( | 2594 blink::WebScriptSource source2( |
2593 WebString::FromUTF8("function func2() { func1(); }; func2();")); | 2595 WebString::FromUTF8("function func2() { func1(); }; func2();")); |
2594 frame()->GetWebFrame()->ExecuteScriptInIsolatedWorld(17, &source2, 1); | 2596 frame()->GetWebFrame()->ExecuteScriptInIsolatedWorld(17, &source2, 1); |
2595 | 2597 |
2596 EXPECT_FALSE(IsPaused()); | 2598 EXPECT_FALSE(IsPaused()); |
2597 Detach(); | 2599 Detach(); |
2598 } | 2600 } |
2599 | 2601 |
2600 } // namespace content | 2602 } // namespace content |
OLD | NEW |