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

Side by Side Diff: android_webview/browser/test/rendering_test.cc

Issue 1002013003: Unit Test for WebView animating in and out of screen (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: comments Created 5 years, 9 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "android_webview/browser/test/rendering_test.h" 5 #include "android_webview/browser/test/rendering_test.h"
6 6
7 #include "android_webview/browser/browser_view_renderer.h" 7 #include "android_webview/browser/browser_view_renderer.h"
8 #include "android_webview/browser/child_frame.h"
8 #include "base/message_loop/message_loop.h" 9 #include "base/message_loop/message_loop.h"
9 #include "content/public/test/test_synchronous_compositor_android.h" 10 #include "content/public/test/test_synchronous_compositor_android.h"
10 11
11 namespace android_webview { 12 namespace android_webview {
12 13
13 RenderingTest::RenderingTest() : message_loop_(new base::MessageLoop) { 14 RenderingTest::RenderingTest() : message_loop_(new base::MessageLoop) {
14 ui_proxy_ = base::MessageLoopProxy::current(); 15 ui_proxy_ = base::MessageLoopProxy::current();
15 } 16 }
16 17
17 RenderingTest::~RenderingTest() { 18 RenderingTest::~RenderingTest() {
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 void RenderingTest::QuitMessageLoop() { 60 void RenderingTest::QuitMessageLoop() {
60 DCHECK_EQ(base::MessageLoop::current(), message_loop_.get()); 61 DCHECK_EQ(base::MessageLoop::current(), message_loop_.get());
61 message_loop_->QuitWhenIdle(); 62 message_loop_->QuitWhenIdle();
62 } 63 }
63 64
64 bool RenderingTest::RequestDrawGL(bool wait_for_completion) { 65 bool RenderingTest::RequestDrawGL(bool wait_for_completion) {
65 window_->RequestDrawGL(wait_for_completion); 66 window_->RequestDrawGL(wait_for_completion);
66 return true; 67 return true;
67 } 68 }
68 69
70 bool RenderingTest::WillDrawOnRT(SharedRendererState* functor,
71 AwDrawGLInfo* draw_info) {
72 draw_info->width = window_->surface_size().width();
73 draw_info->height = window_->surface_size().height();
74 draw_info->is_layer = false;
75 gfx::Transform transform;
76 transform.matrix().asColMajorf(draw_info->transform);
77 return true;
78 }
79
69 void RenderingTest::OnNewPicture() { 80 void RenderingTest::OnNewPicture() {
70 } 81 }
71 82
72 void RenderingTest::PostInvalidate() { 83 void RenderingTest::PostInvalidate() {
73 window_->PostInvalidate(); 84 window_->PostInvalidate();
74 } 85 }
75 86
76 void RenderingTest::DetachFunctorFromView() { 87 void RenderingTest::DetachFunctorFromView() {
77 } 88 }
78 89
79 gfx::Point RenderingTest::GetLocationOnScreen() { 90 gfx::Point RenderingTest::GetLocationOnScreen() {
80 return gfx::Point(); 91 return gfx::Point();
81 } 92 }
82 93
83 bool RenderingTest::IsFlingActive() const { 94 bool RenderingTest::IsFlingActive() const {
84 return false; 95 return false;
85 } 96 }
86 97
87 } // namespace android_webview 98 } // namespace android_webview
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698