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

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

Issue 10855151: Gradient overlay for constrained window (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix chromeos 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
« no previous file with comments | « chrome/renderer/webview_animating_overlay.cc ('k') | content/public/renderer/render_view.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "chrome/test/base/chrome_render_view_test.h"
8 #include "skia/ext/platform_canvas.h"
9 #include "webkit/glue/webkit_glue.h"
10
11 typedef ChromeRenderViewTest 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 }
OLDNEW
« no previous file with comments | « chrome/renderer/webview_animating_overlay.cc ('k') | content/public/renderer/render_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698