OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "base/basictypes.h" | 5 #include "base/basictypes.h" |
6 #include "base/file_path.h" | 6 #include "base/file_path.h" |
7 #include "base/test/test_timeouts.h" | 7 #include "base/test/test_timeouts.h" |
8 #include "base/threading/platform_thread.h" | 8 #include "base/threading/platform_thread.h" |
9 #include "net/base/net_util.h" | 9 #include "net/base/net_util.h" |
10 #include "chrome/test/ui/ui_test.h" | 10 #include "chrome/test/ui/ui_test.h" |
11 | 11 |
12 typedef UITest ImagesTest; | 12 typedef UITest ImagesTest; |
13 | 13 |
14 TEST_F(ImagesTest, AnimatedGIFs) { | 14 TEST_F(ImagesTest, AnimatedGIFs) { |
15 FilePath test_file(test_data_directory_); | 15 FilePath test_file(test_data_directory_); |
16 test_file = test_file.AppendASCII("animated-gifs.html"); | 16 test_file = test_file.AppendASCII("animated-gifs.html"); |
17 NavigateToURL(net::FilePathToFileURL(test_file)); | 17 NavigateToURL(net::FilePathToFileURL(test_file)); |
18 | 18 |
19 // Let the GIFs fully animate. | 19 // Let the GIFs fully animate. |
20 base::PlatformThread::Sleep(TestTimeouts::action_timeout_ms()); | 20 base::PlatformThread::Sleep(TestTimeouts::action_timeout()); |
21 | 21 |
22 std::wstring page_title = L"animated gif test"; | 22 std::wstring page_title = L"animated gif test"; |
23 EXPECT_EQ(page_title, GetActiveTabTitle()); | 23 EXPECT_EQ(page_title, GetActiveTabTitle()); |
24 | 24 |
25 // UI test framework will check if this crashed. | 25 // UI test framework will check if this crashed. |
26 } | 26 } |
OLD | NEW |