blob: 6cb03db7d24a04f9b8f5da759bbeaaaf94cf5b7c [file] [log] [blame]
license.botbf09a502008-08-24 00:55:551// 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.commit09911bf2008-07-26 23:55:294
5#include "base/basictypes.h"
6#include "base/file_util.h"
7#include "chrome/test/ui/ui_test.h"
8
9class 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
17TEST_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.botbf09a502008-08-24 00:55:5532