| 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" |
| 11 #include "base/command_line.h" | 11 #include "base/command_line.h" |
| 12 #include "base/json/json_reader.h" | 12 #include "base/json/json_reader.h" |
| 13 #include "base/json/json_writer.h" | 13 #include "base/json/json_writer.h" |
| 14 #include "base/location.h" | 14 #include "base/location.h" |
| 15 #include "base/macros.h" | 15 #include "base/macros.h" |
| 16 #include "base/single_thread_task_runner.h" | 16 #include "base/single_thread_task_runner.h" |
| 17 #include "base/strings/string_util.h" | 17 #include "base/strings/string_util.h" |
| 18 #include "base/strings/utf_string_conversions.h" | 18 #include "base/strings/utf_string_conversions.h" |
| 19 #include "base/threading/thread_task_runner_handle.h" | 19 #include "base/threading/thread_task_runner_handle.h" |
| 20 #include "base/time/time.h" | 20 #include "base/time/time.h" |
| 21 #include "base/values.h" | 21 #include "base/values.h" |
| 22 #include "build/build_config.h" | 22 #include "build/build_config.h" |
| 23 #include "cc/trees/layer_tree.h" | |
| 24 #include "cc/trees/layer_tree_host.h" | 23 #include "cc/trees/layer_tree_host.h" |
| 25 #include "content/child/request_extra_data.h" | 24 #include "content/child/request_extra_data.h" |
| 26 #include "content/child/service_worker/service_worker_network_provider.h" | 25 #include "content/child/service_worker/service_worker_network_provider.h" |
| 27 #include "content/common/content_switches_internal.h" | 26 #include "content/common/content_switches_internal.h" |
| 28 #include "content/common/frame_messages.h" | 27 #include "content/common/frame_messages.h" |
| 29 #include "content/common/frame_owner_properties.h" | 28 #include "content/common/frame_owner_properties.h" |
| 30 #include "content/common/frame_replication_state.h" | 29 #include "content/common/frame_replication_state.h" |
| 31 #include "content/common/renderer.mojom.h" | 30 #include "content/common/renderer.mojom.h" |
| 32 #include "content/common/site_isolation_policy.h" | 31 #include "content/common/site_isolation_policy.h" |
| 33 #include "content/common/view_messages.h" | 32 #include "content/common/view_messages.h" |
| (...skipping 516 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 550 EXPECT_TRUE(ExecuteJavaScriptAndReturnIntValue(get_width, &emulated_width)); | 549 EXPECT_TRUE(ExecuteJavaScriptAndReturnIntValue(get_width, &emulated_width)); |
| 551 EXPECT_EQ(width, emulated_width); | 550 EXPECT_EQ(width, emulated_width); |
| 552 EXPECT_TRUE(ExecuteJavaScriptAndReturnIntValue(get_height, | 551 EXPECT_TRUE(ExecuteJavaScriptAndReturnIntValue(get_height, |
| 553 &emulated_height)); | 552 &emulated_height)); |
| 554 EXPECT_EQ(height, emulated_height); | 553 EXPECT_EQ(height, emulated_height); |
| 555 EXPECT_TRUE(ExecuteJavaScriptAndReturnIntValue(get_dpr, &emulated_dpr)); | 554 EXPECT_TRUE(ExecuteJavaScriptAndReturnIntValue(get_dpr, &emulated_dpr)); |
| 556 EXPECT_EQ(static_cast<int>(dpr * 10), emulated_dpr); | 555 EXPECT_EQ(static_cast<int>(dpr * 10), emulated_dpr); |
| 557 EXPECT_EQ(compositor_dsf, view() | 556 EXPECT_EQ(compositor_dsf, view() |
| 558 ->compositor() | 557 ->compositor() |
| 559 ->layer_tree_host() | 558 ->layer_tree_host() |
| 560 ->GetLayerTree() | |
| 561 ->device_scale_factor()); | 559 ->device_scale_factor()); |
| 562 } | 560 } |
| 563 }; | 561 }; |
| 564 | 562 |
| 565 // Ensure that the main RenderFrame is deleted and cleared from the RenderView | 563 // Ensure that the main RenderFrame is deleted and cleared from the RenderView |
| 566 // after closing it. | 564 // after closing it. |
| 567 TEST_F(RenderViewImplTest, RenderFrameClearedAfterClose) { | 565 TEST_F(RenderViewImplTest, RenderFrameClearedAfterClose) { |
| 568 // Create a new main frame RenderFrame so that we don't interfere with the | 566 // Create a new main frame RenderFrame so that we don't interfere with the |
| 569 // shutdown of frame() in RenderViewTest.TearDown. | 567 // shutdown of frame() in RenderViewTest.TearDown. |
| 570 blink::WebURLRequest popup_request(GURL("http://foo.com")); | 568 blink::WebURLRequest popup_request(GURL("http://foo.com")); |
| (...skipping 1985 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2556 ExpectPauseAndResume(3); | 2554 ExpectPauseAndResume(3); |
| 2557 blink::WebScriptSource source2( | 2555 blink::WebScriptSource source2( |
| 2558 WebString::fromUTF8("function func2() { func1(); }; func2();")); | 2556 WebString::fromUTF8("function func2() { func1(); }; func2();")); |
| 2559 frame()->GetWebFrame()->executeScriptInIsolatedWorld(17, &source2, 1); | 2557 frame()->GetWebFrame()->executeScriptInIsolatedWorld(17, &source2, 1); |
| 2560 | 2558 |
| 2561 EXPECT_FALSE(IsPaused()); | 2559 EXPECT_FALSE(IsPaused()); |
| 2562 Detach(); | 2560 Detach(); |
| 2563 } | 2561 } |
| 2564 | 2562 |
| 2565 } // namespace content | 2563 } // namespace content |
| OLD | NEW |