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

Unified Diff: content/test/browser_test_utils.cc

Issue 10820007: Move all the layout tests that ran under browser_tests to run under content_browsertests. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: fix mac Created 8 years, 5 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
Index: content/test/browser_test_utils.cc
===================================================================
--- content/test/browser_test_utils.cc (revision 148205)
+++ content/test/browser_test_utils.cc (working copy)
@@ -12,6 +12,7 @@
#include "base/string_number_conversions.h"
#include "base/test/test_timeouts.h"
#include "base/utf_string_conversions.h"
+#include "net/base/net_util.h"
#include "content/public/browser/dom_operation_notification_details.h"
#include "content/public/browser/notification_types.h"
#include "content/public/browser/render_view_host.h"
@@ -146,6 +147,18 @@
} // namespace
+
+GURL GetFileUrlWithQuery(const FilePath& path,
+ const std::string& query_string) {
+ GURL url = net::FilePathToFileURL(path);
+ if (!query_string.empty()) {
+ GURL::Replacements replacements;
+ replacements.SetQueryStr(query_string);
+ return url.ReplaceComponents(replacements);
+ }
+ return url;
+}
+
void SimulateMouseClick(WebContents* web_contents) {
int x = web_contents->GetView()->GetContainerSize().width() / 2;
int y = web_contents->GetView()->GetContainerSize().height() / 2;

Powered by Google App Engine
This is Rietveld 408576698