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

Unified Diff: content/test/content_browser_test_utils.h

Issue 10803026: Get content_browsertest working. I've added a simple test for now, and will convert the tests in sr… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: get it working on mac + linux, fix unittests crash, and fix unittest link error and add missing dep… 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
« no previous file with comments | « content/test/content_browser_test_test.cc ('k') | content/test/content_browser_test_utils.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/test/content_browser_test_utils.h
===================================================================
--- content/test/content_browser_test_utils.h (revision 0)
+++ content/test/content_browser_test_utils.h (revision 0)
@@ -0,0 +1,38 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CONTENT_TEST_CONTENT_BROWSER_TEST_UTILS_H_
+#define CONTENT_TEST_CONTENT_BROWSER_TEST_UTILS_H_
+
+#include "googleurl/src/gurl.h"
+
+class FilePath;
+
+// A collections of functions designed for use with content_browsertests.
+// Note: if a function here also works with browser_tests, it should be in
+// content\public\test\browser_test_utils.h
+
+namespace content {
+
+class Shell;
+
+// Generate the file path for testing a particular test.
+// The file for the tests is all located in
+// content/test/data/dir/<file>
+// The returned path is FilePath format.
+FilePath GetTestFilePath(const char* dir, const char* file);
+
+// Generate the URL for testing a particular test.
+// HTML for the tests is all located in
+// test_root_directory/dir/<file>
+// The returned path is GURL format.
+GURL GetTestUrl(const char* dir, const char* file);
+
+// Navigates the selected tab of |window| to |url|, blocking until the
+// navigation finishes.
+void NavigateToURL(Shell* window, const GURL& url);
+
+} // namespace content
+
+#endif // CONTENT_TEST_CONTENT_BROWSER_TEST_UTILS_H_
« no previous file with comments | « content/test/content_browser_test_test.cc ('k') | content/test/content_browser_test_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698