blob: 054ca6ea15e7374d1b94990c4c55703fd18f7750 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
// Copyright (c) 2006-2008 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 "base/basictypes.h"
#include "base/file_path.h"
#include "base/platform_thread.h"
#include "chrome/test/ui/ui_test.h"
class ImagesTest : public UITest {
protected:
ImagesTest() : UITest() {
FilePath path(test_data_directory_);
path = path.AppendASCII("animated-gifs.html");
launch_arguments_ = CommandLine(CommandLine::ARGUMENTS_ONLY);
launch_arguments_.AppendLooseValue(path.ToWStringHack());
}
};
TEST_F(ImagesTest, AnimatedGIFs) {
std::wstring page_title = L"animated gif test";
// Let the GIFs fully animate.
for (int i = 0; i < 10; ++i) {
PlatformThread::Sleep(sleep_timeout_ms());
if (page_title == GetActiveTabTitle())
break;
}
// Make sure the navigation succeeded.
EXPECT_EQ(page_title, GetActiveTabTitle());
// Tau will check if this crashed.
}
|