diff options
author | isherman@chromium.org <isherman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-09-30 21:50:05 +0000 |
---|---|---|
committer | isherman@chromium.org <isherman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-09-30 21:50:05 +0000 |
commit | 9fabbf77b5b467003287b055aece906a4330de86 (patch) | |
tree | 3727f1d511342a55c9ece39c7a7b264f027081f8 /chrome/browser/geolocation/geolocation_browsertest.cc | |
parent | ee520884a87f24a5e34ef660657d49f2ec993f6e (diff) | |
download | chromium_src-9fabbf77b5b467003287b055aece906a4330de86.zip chromium_src-9fabbf77b5b467003287b055aece906a4330de86.tar.gz chromium_src-9fabbf77b5b467003287b055aece906a4330de86.tar.bz2 |
Make ui_test_utils::ExecuteJavaScript() friendlier to use. Also, add WARN_UNUSED_RESULT to make it less likely that callers ignore failures.
BUG=57216
TEST=tests should still run
Review URL: http://codereview.chromium.org/3569005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@61119 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/geolocation/geolocation_browsertest.cc')
-rw-r--r-- | chrome/browser/geolocation/geolocation_browsertest.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/chrome/browser/geolocation/geolocation_browsertest.cc b/chrome/browser/geolocation/geolocation_browsertest.cc index 382b614..6617f90 100644 --- a/chrome/browser/geolocation/geolocation_browsertest.cc +++ b/chrome/browser/geolocation/geolocation_browsertest.cc @@ -62,9 +62,9 @@ class IFrameLoader : public NotificationObserver { script = StringPrintf( "window.domAutomationController.send(getIFrameSrc(%d))", iframe_id); std::string iframe_src; - ui_test_utils::ExecuteJavaScriptAndExtractString( + EXPECT_TRUE(ui_test_utils::ExecuteJavaScriptAndExtractString( browser->GetSelectedTabContents()->render_view_host(), - L"", UTF8ToWide(script), &iframe_src); + L"", UTF8ToWide(script), &iframe_src)); iframe_url_ = GURL(iframe_src); } @@ -321,9 +321,9 @@ class GeolocationBrowserTest : public InProcessBrowserTest { std::string script = StringPrintf( "window.domAutomationController.send(%s)", function.c_str()); std::string result; - ui_test_utils::ExecuteJavaScriptAndExtractString( + ASSERT_TRUE(ui_test_utils::ExecuteJavaScriptAndExtractString( tab_contents->render_view_host(), - iframe_xpath_, UTF8ToWide(script), &result); + iframe_xpath_, UTF8ToWide(script), &result)); EXPECT_EQ(expected, result); } |