11e9bf3e0803691d0a228da41fc608347b6db4340Torne (Richard Coles)// Copyright 2013 The Chromium Authors. All rights reserved. 21e9bf3e0803691d0a228da41fc608347b6db4340Torne (Richard Coles)// Use of this source code is governed by a BSD-style license that can be 31e9bf3e0803691d0a228da41fc608347b6db4340Torne (Richard Coles)// found in the LICENSE file. 41e9bf3e0803691d0a228da41fc608347b6db4340Torne (Richard Coles) 51e9bf3e0803691d0a228da41fc608347b6db4340Torne (Richard Coles)#include "chrome/browser/download/download_started_animation.h" 61e9bf3e0803691d0a228da41fc608347b6db4340Torne (Richard Coles)#include "chrome/browser/ui/browser.h" 71e9bf3e0803691d0a228da41fc608347b6db4340Torne (Richard Coles)#include "chrome/browser/ui/browser_commands.h" 81e9bf3e0803691d0a228da41fc608347b6db4340Torne (Richard Coles)#include "chrome/browser/ui/tabs/tab_strip_model.h" 91e9bf3e0803691d0a228da41fc608347b6db4340Torne (Richard Coles)#include "chrome/test/base/in_process_browser_test.h" 101e9bf3e0803691d0a228da41fc608347b6db4340Torne (Richard Coles) 111e9bf3e0803691d0a228da41fc608347b6db4340Torne (Richard Coles)class DownloadStartedAnimationTest : public InProcessBrowserTest { 121e9bf3e0803691d0a228da41fc608347b6db4340Torne (Richard Coles) public: 131e9bf3e0803691d0a228da41fc608347b6db4340Torne (Richard Coles) DownloadStartedAnimationTest() { 141e9bf3e0803691d0a228da41fc608347b6db4340Torne (Richard Coles) } 151e9bf3e0803691d0a228da41fc608347b6db4340Torne (Richard Coles) 161e9bf3e0803691d0a228da41fc608347b6db4340Torne (Richard Coles) private: 171e9bf3e0803691d0a228da41fc608347b6db4340Torne (Richard Coles) DISALLOW_COPY_AND_ASSIGN(DownloadStartedAnimationTest); 181e9bf3e0803691d0a228da41fc608347b6db4340Torne (Richard Coles)}; 191e9bf3e0803691d0a228da41fc608347b6db4340Torne (Richard Coles) 201e9bf3e0803691d0a228da41fc608347b6db4340Torne (Richard Coles)IN_PROC_BROWSER_TEST_F(DownloadStartedAnimationTest, 211e9bf3e0803691d0a228da41fc608347b6db4340Torne (Richard Coles) InstantiateAndImmediatelyClose) { 221e9bf3e0803691d0a228da41fc608347b6db4340Torne (Richard Coles) content::WebContents* web_contents = 231e9bf3e0803691d0a228da41fc608347b6db4340Torne (Richard Coles) browser()->tab_strip_model()->GetActiveWebContents(); 241e9bf3e0803691d0a228da41fc608347b6db4340Torne (Richard Coles) DownloadStartedAnimation::Show(web_contents); 251e9bf3e0803691d0a228da41fc608347b6db4340Torne (Richard Coles) chrome::CloseWindow(browser()); 261e9bf3e0803691d0a228da41fc608347b6db4340Torne (Richard Coles)} 27