Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2467)

Unified Diff: content/test/layout_browsertest.cc

Issue 9959028: Convert the media and audio UI test to a browser_test. browser_tests are sharded and run quicker, a… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/browser/media_browsertest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/test/layout_browsertest.cc
===================================================================
--- content/test/layout_browsertest.cc (revision 129871)
+++ content/test/layout_browsertest.cc (working copy)
@@ -68,15 +68,23 @@
static const std::string preamble =
"\n<script>\n"
"function LayoutTestController() {\n"
+ " this.wait_until_done_ = false;\n"
" this.dumpAsText = function () {};\n"
- " this.waitUntilDone = function () {};\n"
+ " this.waitUntilDone = function () {\n"
+ " this.wait_until_done_ = true;\n"
+ " }\n"
" this.notifyDone = function () {\n"
" document.title = 'done';\n"
" }\n"
" this.overridePreference = function () {}\n"
+ " this.OnEvent = function () {\n"
+ " if (!layoutTestController.wait_until_done_)\n"
+ " layoutTestController.notifyDone();\n"
+ " }\n"
" this.workerThreadCount = 0; \n"
"}\n"
"window.layoutTestController = new LayoutTestController();\n"
+ "window.addEventListener('load', layoutTestController.OnEvent, false);\n"
"</script>";
}
@@ -180,6 +188,7 @@
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);
« no previous file with comments | « content/browser/media_browsertest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698