Index: content/test/layout_browsertest.cc |
=================================================================== |
--- content/test/layout_browsertest.cc (revision 129871) |
+++ content/test/layout_browsertest.cc (working copy) |
@@ -84,14 +84,14 @@ |
InProcessBrowserLayoutTest::InProcessBrowserLayoutTest( |
const FilePath& test_parent_dir, const FilePath& test_case_dir) |
: test_parent_dir_(test_parent_dir), test_case_dir_(test_case_dir), |
- port_(-2) { |
+ port_(-2), wait_until_done_(true) { |
EnableDOMAutomation(); |
} |
InProcessBrowserLayoutTest::InProcessBrowserLayoutTest( |
const FilePath& test_parent_dir, const FilePath& test_case_dir, int port) |
: test_parent_dir_(test_parent_dir), test_case_dir_(test_case_dir), |
- port_(port) { |
+ port_(port), wait_until_done_(true) { |
EnableDOMAutomation(); |
} |
@@ -180,10 +180,13 @@ |
ui_test_utils::TitleWatcher title_watcher( |
browser()->GetSelectedWebContents(), expected_title); |
ui_test_utils::NavigateToURL(browser(), url); |
- LOG(INFO) << "Navigation completed, now waiting for title."; |
- string16 final_title = title_watcher.WaitAndGetTitle(); |
- EXPECT_EQ(expected_title, final_title); |
+ if (wait_until_done_) { |
+ LOG(INFO) << "Navigation completed, now waiting for notifyDone."; |
+ string16 final_title = title_watcher.WaitAndGetTitle(); |
+ EXPECT_EQ(expected_title, final_title); |
+ } |
+ |
std::string actual_text; |
ScrapeResultFromBrowser(browser(), &actual_text); |
ReplaceSubstringsAfterOffset(&actual_text, 0, "\r", ""); |