Chromium Code Reviews| Index: chrome/browser/images_uitest.cc |
| diff --git a/chrome/browser/images_uitest.cc b/chrome/browser/images_uitest.cc |
| index 054ca6ea15e7374d1b94990c4c55703fd18f7750..db813a9d8e0016d0546d496d517bf43d23497304 100644 |
| --- a/chrome/browser/images_uitest.cc |
| +++ b/chrome/browser/images_uitest.cc |
| @@ -5,30 +5,22 @@ |
| #include "base/basictypes.h" |
| #include "base/file_path.h" |
| #include "base/platform_thread.h" |
| +#include "net/base/net_util.h" |
| #include "chrome/test/ui/ui_test.h" |
| class ImagesTest : public UITest { |
|
sky
2010/03/25 22:08:06
typedef UITest ImagesTest;
|
| - 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"; |
| + FilePath test_file(test_data_directory_); |
| + test_file = test_file.AppendASCII("animated-gifs.html"); |
| + NavigateToURL(net::FilePathToFileURL(test_file)); |
| // Let the GIFs fully animate. |
| - for (int i = 0; i < 10; ++i) { |
| - PlatformThread::Sleep(sleep_timeout_ms()); |
| - if (page_title == GetActiveTabTitle()) |
| - break; |
| - } |
| + PlatformThread::Sleep(sleep_timeout_ms()); |
| - // Make sure the navigation succeeded. |
| + std::wstring page_title = L"animated gif test"; |
| EXPECT_EQ(page_title, GetActiveTabTitle()); |
| - // Tau will check if this crashed. |
| + // UI test framework will check if this crashed. |
| } |