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

Side by Side Diff: cc/output/delegating_renderer_unittest.cc

Issue 23171014: Fix UpdateTilePriorities viewport in Android WebView. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add tests Created 7 years, 3 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "cc/output/delegating_renderer.h" 5 #include "cc/output/delegating_renderer.h"
6 6
7 #include "cc/test/fake_output_surface.h" 7 #include "cc/test/fake_output_surface.h"
8 #include "cc/test/layer_tree_test.h" 8 #include "cc/test/layer_tree_test.h"
9 #include "cc/test/render_pass_test_common.h" 9 #include "cc/test/render_pass_test_common.h"
10 #include "cc/test/render_pass_test_utils.h" 10 #include "cc/test/render_pass_test_utils.h"
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 59
60 virtual void SwapBuffersOnThread(LayerTreeHostImpl* host_impl, 60 virtual void SwapBuffersOnThread(LayerTreeHostImpl* host_impl,
61 bool result) OVERRIDE { 61 bool result) OVERRIDE {
62 EXPECT_TRUE(result); 62 EXPECT_TRUE(result);
63 EXPECT_EQ(1u, output_surface_->num_sent_frames()); 63 EXPECT_EQ(1u, output_surface_->num_sent_frames());
64 64
65 const CompositorFrame& last_frame = output_surface_->last_sent_frame(); 65 const CompositorFrame& last_frame = output_surface_->last_sent_frame();
66 DelegatedFrameData* last_frame_data = last_frame.delegated_frame_data.get(); 66 DelegatedFrameData* last_frame_data = last_frame.delegated_frame_data.get();
67 ASSERT_TRUE(last_frame.delegated_frame_data); 67 ASSERT_TRUE(last_frame.delegated_frame_data);
68 EXPECT_FALSE(last_frame.gl_frame_data); 68 EXPECT_FALSE(last_frame.gl_frame_data);
69 EXPECT_EQ( 69 EXPECT_EQ(host_impl->DeviceViewport().ToString(),
70 gfx::Rect(host_impl->device_viewport_size()).ToString(), 70 last_frame_data->render_pass_list.back()->output_rect.ToString());
71 last_frame_data->render_pass_list.back()->output_rect.ToString());
72 EXPECT_EQ(0.5f, last_frame.metadata.min_page_scale_factor); 71 EXPECT_EQ(0.5f, last_frame.metadata.min_page_scale_factor);
73 EXPECT_EQ(4.f, last_frame.metadata.max_page_scale_factor); 72 EXPECT_EQ(4.f, last_frame.metadata.max_page_scale_factor);
74 73
75 EXPECT_EQ( 74 EXPECT_EQ(
76 0u, last_frame.delegated_frame_data->resource_list.size()); 75 0u, last_frame.delegated_frame_data->resource_list.size());
77 EXPECT_EQ(1u, last_frame.delegated_frame_data->render_pass_list.size()); 76 EXPECT_EQ(1u, last_frame.delegated_frame_data->render_pass_list.size());
78 77
79 EndTest(); 78 EndTest();
80 } 79 }
81 }; 80 };
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 22u, last_frame.delegated_frame_data->resource_list.size()); 136 22u, last_frame.delegated_frame_data->resource_list.size());
138 137
139 EndTest(); 138 EndTest();
140 } 139 }
141 }; 140 };
142 141
143 SINGLE_AND_MULTI_THREAD_DELEGATING_RENDERER_TEST_F( 142 SINGLE_AND_MULTI_THREAD_DELEGATING_RENDERER_TEST_F(
144 DelegatingRendererTestResources); 143 DelegatingRendererTestResources);
145 144
146 } // namespace cc 145 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698