diff options
author | stuartmorgan@chromium.org <stuartmorgan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-07 22:31:47 +0000 |
---|---|---|
committer | stuartmorgan@chromium.org <stuartmorgan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-07 22:31:47 +0000 |
commit | 5c943180e410b2a4e76f93e1612985cdab407e8c (patch) | |
tree | 6aef67f089f4ecbd73fbdac524f7627ecfb6b6a2 /chrome/worker | |
parent | 23512f4ba83ab011aac513972290aa30b26785cd (diff) | |
download | chromium_src-5c943180e410b2a4e76f93e1612985cdab407e8c.zip chromium_src-5c943180e410b2a4e76f93e1612985cdab407e8c.tar.gz chromium_src-5c943180e410b2a4e76f93e1612985cdab407e8c.tar.bz2 |
Sprinkle some defensiveness into the UI tests so that they don't explode if the proxy doesn't respond (e.g., due to a timeout).
BUG=none
TEST=Hopefully the Mac valgrind bots will more reliably run all their tests (although there are likely more issues like this lurking).
Review URL: http://codereview.chromium.org/149281
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20096 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/worker')
-rw-r--r-- | chrome/worker/worker_uitest.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/chrome/worker/worker_uitest.cc b/chrome/worker/worker_uitest.cc index 2ef25a9..e664282b 100644 --- a/chrome/worker/worker_uitest.cc +++ b/chrome/worker/worker_uitest.cc @@ -69,6 +69,7 @@ WorkerTest::~WorkerTest() { void WorkerTest::RunTest(const std::wstring& test_case) { scoped_refptr<TabProxy> tab(GetActiveTab()); + ASSERT_TRUE(tab.get()); GURL url = GetTestUrl(L"workers", test_case); ASSERT_TRUE(tab->NavigateToURL(url)); @@ -206,6 +207,7 @@ void WorkerTest::RunLayoutTest(const std::string& test_case_file_name, // Runs the new layout test. scoped_refptr<TabProxy> tab(GetActiveTab()); + ASSERT_TRUE(tab.get()); ASSERT_TRUE(tab->NavigateToURL(*new_test_url.get())); std::string escaped_value = WaitUntilCookieNonEmpty(tab.get(), *new_test_url.get(), @@ -339,6 +341,7 @@ TEST_F(WorkerTest, LimitPerPage) { url = GURL(url.spec() + StringPrintf("?count=%d", max_workers_per_tab + 1)); scoped_refptr<TabProxy> tab(GetActiveTab()); + ASSERT_TRUE(tab.get()); ASSERT_TRUE(tab->NavigateToURL(url)); EXPECT_EQ(max_workers_per_tab + 1 + (UITest::in_process_renderer() ? 0 : 1), @@ -354,6 +357,7 @@ TEST_F(WorkerTest, LimitTotal) { url = GURL(url.spec() + StringPrintf("?count=%d", max_workers_per_tab)); scoped_refptr<TabProxy> tab(GetActiveTab()); + ASSERT_TRUE(tab.get()); ASSERT_TRUE(tab->NavigateToURL(url)); scoped_refptr<BrowserProxy> window(automation()->GetBrowserWindow(0)); for (int i = 1; i < tab_count; ++i) |