• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright (c) 2011 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.
4 
5 #include "base/basictypes.h"
6 #include "base/file_path.h"
7 #include "base/test/test_timeouts.h"
8 #include "base/threading/platform_thread.h"
9 #include "net/base/net_util.h"
10 #include "chrome/test/ui/ui_test.h"
11 
12 typedef UITest ImagesTest;
13 
TEST_F(ImagesTest,AnimatedGIFs)14 TEST_F(ImagesTest, AnimatedGIFs) {
15   FilePath test_file(test_data_directory_);
16   test_file = test_file.AppendASCII("animated-gifs.html");
17   NavigateToURL(net::FilePathToFileURL(test_file));
18 
19   // Let the GIFs fully animate.
20   base::PlatformThread::Sleep(TestTimeouts::action_timeout_ms());
21 
22   std::wstring page_title = L"animated gif test";
23   EXPECT_EQ(page_title, GetActiveTabTitle());
24 
25   // UI test framework will check if this crashed.
26 }
27