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

Side by Side Diff: chrome/renderer/webview_animating_overlay_unittest.cc

Issue 10855151: Gradient overlay for constrained window (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: test Created 8 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 | Annotate | Revision Log
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "chrome/renderer/webview_animating_overlay.h"
6
7 #include "content/public/test/render_view_test.h"
8 #include "skia/ext/platform_canvas.h"
9 #include "webkit/glue/webkit_glue.h"
10
11 typedef content::RenderViewTest WebViewAnimatingOverlayTest;
12
13 TEST_F(WebViewAnimatingOverlayTest, ShowHide) {
14 WebViewAnimatingOverlay overlay(view_);
15 EXPECT_EQ(overlay.state(), WebViewAnimatingOverlay::HIDDEN);
16 overlay.Show();
17 EXPECT_EQ(overlay.state(), WebViewAnimatingOverlay::ANIMATING_IN);
18 overlay.Hide();
19 EXPECT_EQ(overlay.state(), WebViewAnimatingOverlay::ANIMATING_OUT);
20 }
21
22 TEST_F(WebViewAnimatingOverlayTest, Paint) {
23 gfx::Size view_size(100, 100);
24 Resize(view_size, gfx::Rect(), false);
25
26 WebViewAnimatingOverlay overlay(view_);
27 overlay.Show();
28
29 skia::PlatformCanvas canvas;
30 ASSERT_TRUE(canvas.initialize(view_size.width(), view_size.height(), true));
31 overlay.paintPageOverlay(webkit_glue::ToWebCanvas(&canvas));
32 }
Nico 2012/08/14 21:14:12 If it's not too difficult, a test that starts the
sail 2012/08/15 05:26:20 Eek. This will require a WebKit patch. If you stil
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698