| Index: chrome/renderer/webview_animating_overlay_browsertest.cc | 
| diff --git a/chrome/renderer/webview_animating_overlay_browsertest.cc b/chrome/renderer/webview_animating_overlay_browsertest.cc | 
| new file mode 100644 | 
| index 0000000000000000000000000000000000000000..19ebb44350ea201506d335b77d9b94a1f2abf0bc | 
| --- /dev/null | 
| +++ b/chrome/renderer/webview_animating_overlay_browsertest.cc | 
| @@ -0,0 +1,32 @@ | 
| +// Copyright (c) 2012 The Chromium Authors. All rights reserved. | 
| +// Use of this source code is governed by a BSD-style license that can be | 
| +// found in the LICENSE file. | 
| + | 
| +#include "chrome/renderer/webview_animating_overlay.h" | 
| + | 
| +#include "chrome/test/base/chrome_render_view_test.h" | 
| +#include "skia/ext/platform_canvas.h" | 
| +#include "webkit/glue/webkit_glue.h" | 
| + | 
| +typedef ChromeRenderViewTest WebViewAnimatingOverlayTest; | 
| + | 
| +TEST_F(WebViewAnimatingOverlayTest, ShowHide) { | 
| +  WebViewAnimatingOverlay overlay(view_); | 
| +  EXPECT_EQ(overlay.state(), WebViewAnimatingOverlay::HIDDEN); | 
| +  overlay.Show(); | 
| +  EXPECT_EQ(overlay.state(), WebViewAnimatingOverlay::ANIMATING_IN); | 
| +  overlay.Hide(); | 
| +  EXPECT_EQ(overlay.state(), WebViewAnimatingOverlay::ANIMATING_OUT); | 
| +} | 
| + | 
| +TEST_F(WebViewAnimatingOverlayTest, Paint) { | 
| +  gfx::Size view_size(100, 100); | 
| +  Resize(view_size, gfx::Rect(), false); | 
| + | 
| +  WebViewAnimatingOverlay overlay(view_); | 
| +  overlay.Show(); | 
| + | 
| +  skia::PlatformCanvas canvas; | 
| +  ASSERT_TRUE(canvas.initialize(view_size.width(), view_size.height(), true)); | 
| +  overlay.paintPageOverlay(webkit_glue::ToWebCanvas(&canvas)); | 
| +} | 
|  |