diff options
author | phajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-26 16:12:10 +0000 |
---|---|---|
committer | phajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-26 16:12:10 +0000 |
commit | 9d6dcdf0882b57fbb0825ab880f321d7682bad4a (patch) | |
tree | 57bad051c7aa8c37234256a7bf163f71741b1098 /chrome/browser/images_uitest.cc | |
parent | c9b19949487f406436c9f5cdfdf35ce3bd805d67 (diff) | |
download | chromium_src-9d6dcdf0882b57fbb0825ab880f321d7682bad4a.zip chromium_src-9d6dcdf0882b57fbb0825ab880f321d7682bad4a.tar.gz chromium_src-9d6dcdf0882b57fbb0825ab880f321d7682bad4a.tar.bz2 |
[GTTF] Various ui tests cleanups:
- unify timeout handling
- remove unneccessary assertions that clutter the code
They were mostly there because earlier the automation
framework was less reliable. Now the same checks (or
equivalent) are always done in the framework itself.
TEST=none
BUG=none
Review URL: http://codereview.chromium.org/1377001
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@42767 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/images_uitest.cc')
-rw-r--r-- | chrome/browser/images_uitest.cc | 25 |
1 files changed, 8 insertions, 17 deletions
diff --git a/chrome/browser/images_uitest.cc b/chrome/browser/images_uitest.cc index 054ca6e..2c67437 100644 --- a/chrome/browser/images_uitest.cc +++ b/chrome/browser/images_uitest.cc @@ -5,30 +5,21 @@ #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 { - 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()); - } -}; +typedef UITest ImagesTest; 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. } |