diff options
author | bartfab@chromium.org <bartfab@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-05-02 20:48:35 +0000 |
---|---|---|
committer | bartfab@chromium.org <bartfab@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-05-02 20:48:35 +0000 |
commit | 9fc4dabfb2dd3f2f7e9da2af8ae9f41b469e68f9 (patch) | |
tree | 3fd3f6a5d05d6c8755b8658a22de2b2a8acbfdd4 /chrome/test/base/ui_test_utils.cc | |
parent | bfde7449259ccf84393fd6751fca30ea36eb0368 (diff) | |
download | chromium_src-9fc4dabfb2dd3f2f7e9da2af8ae9f41b469e68f9.zip chromium_src-9fc4dabfb2dd3f2f7e9da2af8ae9f41b469e68f9.tar.gz chromium_src-9fc4dabfb2dd3f2f7e9da2af8ae9f41b469e68f9.tar.bz2 |
Make the Geoposition helper struct public
This CL moves the Geoposition struct from content/common to public/content/common.h so that it can be shared by content and browser. The struct is placed in the |content| namespace and as required by the style guide, all methods except the constructor and Validate() are removed.
This paves the way for a follow-up CL in which the content will provide geolocation information to the browser.
BUG=chromium-os:22036
TEST=Chrome and tests build, run
Review URL: http://codereview.chromium.org/10316007
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@134989 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test/base/ui_test_utils.cc')
-rw-r--r-- | chrome/test/base/ui_test_utils.cc | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/chrome/test/base/ui_test_utils.cc b/chrome/test/base/ui_test_utils.cc index 3bb8ad3..272f4a0 100644 --- a/chrome/test/base/ui_test_utils.cc +++ b/chrome/test/base/ui_test_utils.cc @@ -23,6 +23,7 @@ #include "base/rand_util.h" #include "base/string_number_conversions.h" #include "base/test/test_timeouts.h" +#include "base/time.h" #include "base/utf_string_conversions.h" #include "base/values.h" #include "chrome/browser/bookmarks/bookmark_model.h" @@ -57,6 +58,7 @@ #include "content/public/browser/web_contents.h" #include "content/public/browser/web_contents_observer.h" #include "content/public/browser/web_contents_view.h" +#include "content/public/common/geoposition.h" #include "content/test/test_navigation_observer.h" #include "googleurl/src/gurl.h" #include "net/base/net_util.h" @@ -1192,8 +1194,14 @@ bool TakeEntirePageSnapshot(RenderViewHost* rvh, SkBitmap* bitmap) { } void OverrideGeolocation(double latitude, double longitude) { - content::OverrideLocationForTesting( - latitude, longitude, 0, base::Bind(MessageLoop::QuitClosure())); + content::Geoposition position; + position.latitude = latitude; + position.longitude = longitude; + position.altitude = 0.; + position.accuracy = 0.; + position.timestamp = base::Time::Now(); + content::OverrideLocationForTesting(position, + base::Bind(MessageLoop::QuitClosure())); RunMessageLoop(); } |