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