license.bot | bf09a50 | 2008-08-24 00:55:55 | [diff] [blame] | 1 | // Copyright (c) 2006-2008 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. |
initial.commit | 09911bf | 2008-07-26 23:55:29 | [diff] [blame] | 4 | |
| 5 | #include "base/basictypes.h" |
| 6 | #include "base/file_util.h" |
| 7 | #include "chrome/test/ui/ui_test.h" |
| 8 | |
| 9 | class ImagesTest : public UITest { |
| 10 | protected: |
| 11 | ImagesTest() : UITest() { |
| 12 | launch_arguments_ = test_data_directory_; |
| 13 | file_util::AppendToPath(&launch_arguments_, L"animated-gifs.html"); |
| 14 | } |
| 15 | }; |
| 16 | |
| 17 | TEST_F(ImagesTest, AnimatedGIFs) { |
| 18 | std::wstring page_title = L"animated gif test"; |
| 19 | |
| 20 | // Let the GIFs fully animate. |
| 21 | for (int i = 0; i < 10; ++i) { |
| 22 | Sleep(kWaitForActionMaxMsec / 10); |
| 23 | if (page_title == GetActiveTabTitle()) |
| 24 | break; |
| 25 | } |
| 26 | |
| 27 | // Make sure the navigation succeeded. |
| 28 | EXPECT_EQ(page_title, GetActiveTabTitle()); |
| 29 | |
| 30 | // Tau will check if this crashed. |
| 31 | } |
license.bot | bf09a50 | 2008-08-24 00:55:55 | [diff] [blame] | 32 | |