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

Side by Side Diff: content/renderer/render_view_browsertest.cc

Issue 2253143002: Revert of cc: Move data to LayerTree from LayerTreeHost. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@layer_tree_change
Patch Set: Created 4 years, 4 months 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 // 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 505 matching lines...) Expand 10 before | Expand all | Expand 10 after
516 params.viewSize.height = height; 516 params.viewSize.height = height;
517 params.deviceScaleFactor = dpr; 517 params.deviceScaleFactor = dpr;
518 view()->OnEnableDeviceEmulation(params); 518 view()->OnEnableDeviceEmulation(params);
519 EXPECT_TRUE(ExecuteJavaScriptAndReturnIntValue(get_width, &emulated_width)); 519 EXPECT_TRUE(ExecuteJavaScriptAndReturnIntValue(get_width, &emulated_width));
520 EXPECT_EQ(width, emulated_width); 520 EXPECT_EQ(width, emulated_width);
521 EXPECT_TRUE(ExecuteJavaScriptAndReturnIntValue(get_height, 521 EXPECT_TRUE(ExecuteJavaScriptAndReturnIntValue(get_height,
522 &emulated_height)); 522 &emulated_height));
523 EXPECT_EQ(height, emulated_height); 523 EXPECT_EQ(height, emulated_height);
524 EXPECT_TRUE(ExecuteJavaScriptAndReturnIntValue(get_dpr, &emulated_dpr)); 524 EXPECT_TRUE(ExecuteJavaScriptAndReturnIntValue(get_dpr, &emulated_dpr));
525 EXPECT_EQ(static_cast<int>(dpr * 10), emulated_dpr); 525 EXPECT_EQ(static_cast<int>(dpr * 10), emulated_dpr);
526 EXPECT_EQ(compositor_dsf, view() 526 EXPECT_EQ(compositor_dsf,
527 ->compositor() 527 view()->compositor()->layer_tree_host()->device_scale_factor());
528 ->layer_tree_host()
529 ->GetLayerTree()
530 ->device_scale_factor());
531 } 528 }
532 }; 529 };
533 530
534 // Ensure that the main RenderFrame is deleted and cleared from the RenderView 531 // Ensure that the main RenderFrame is deleted and cleared from the RenderView
535 // after closing it. 532 // after closing it.
536 TEST_F(RenderViewImplTest, RenderFrameClearedAfterClose) { 533 TEST_F(RenderViewImplTest, RenderFrameClearedAfterClose) {
537 // Create a new main frame RenderFrame so that we don't interfere with the 534 // Create a new main frame RenderFrame so that we don't interfere with the
538 // shutdown of frame() in RenderViewTest.TearDown. 535 // shutdown of frame() in RenderViewTest.TearDown.
539 blink::WebURLRequest popup_request(GURL("http://foo.com")); 536 blink::WebURLRequest popup_request(GURL("http://foo.com"));
540 blink::WebView* new_web_view = view()->createView( 537 blink::WebView* new_web_view = view()->createView(
(...skipping 1942 matching lines...) Expand 10 before | Expand all | Expand 10 after
2483 ExpectPauseAndResume(3); 2480 ExpectPauseAndResume(3);
2484 blink::WebScriptSource source2( 2481 blink::WebScriptSource source2(
2485 WebString::fromUTF8("function func2() { func1(); }; func2();")); 2482 WebString::fromUTF8("function func2() { func1(); }; func2();"));
2486 frame()->GetWebFrame()->executeScriptInIsolatedWorld(17, &source2, 1, 1); 2483 frame()->GetWebFrame()->executeScriptInIsolatedWorld(17, &source2, 1, 1);
2487 2484
2488 EXPECT_FALSE(IsPaused()); 2485 EXPECT_FALSE(IsPaused());
2489 Detach(); 2486 Detach();
2490 } 2487 }
2491 2488
2492 } // namespace content 2489 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698