summaryrefslogtreecommitdiffstats
path: root/content/test/content_browser_test_utils.h
diff options
context:
space:
mode:
authorjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-07-19 06:11:28 +0000
committerjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-07-19 06:11:28 +0000
commit78089f0bfcb2e2760db01191ceb0165d9517b154 (patch)
treee371ab6d6bedc40421d351648bfb5e68235d8dff /content/test/content_browser_test_utils.h
parent39e12cb553cf861ab0b34b3ccd82baa3dd82be7f (diff)
downloadchromium_src-78089f0bfcb2e2760db01191ceb0165d9517b154.zip
chromium_src-78089f0bfcb2e2760db01191ceb0165d9517b154.tar.gz
chromium_src-78089f0bfcb2e2760db01191ceb0165d9517b154.tar.bz2
Get content_browsertest working. I've added a simple test for now, and will convert the tests in src/content in future changes.
BUG=90448 Review URL: https://chromiumcodereview.appspot.com/10803026 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@147404 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/test/content_browser_test_utils.h')
-rw-r--r--content/test/content_browser_test_utils.h38
1 files changed, 38 insertions, 0 deletions
diff --git a/content/test/content_browser_test_utils.h b/content/test/content_browser_test_utils.h
new file mode 100644
index 0000000..5957d11
--- /dev/null
+++ b/content/test/content_browser_test_utils.h
@@ -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_