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

Unified Diff: chrome/browser/ui/webui/web_ui_browsertest.cc

Issue 7193030: Revert 89453 - Support automatic javascript test registry in gtest when creating WebUI tests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 6 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 | « chrome/browser/ui/webui/web_ui_browsertest.h ('k') | chrome/chrome_tests.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/web_ui_browsertest.cc
===================================================================
--- chrome/browser/ui/webui/web_ui_browsertest.cc (revision 89459)
+++ chrome/browser/ui/webui/web_ui_browsertest.cc (working copy)
@@ -11,7 +11,6 @@
#include "base/utf_string_conversions.h"
#include "base/values.h"
#include "chrome/browser/ui/browser.h"
-#include "chrome/browser/ui/webui/test_chrome_web_ui_factory.h"
#include "chrome/common/chrome_paths.h"
#include "chrome/common/url_constants.h"
#include "chrome/test/ui_test_utils.h"
@@ -22,8 +21,9 @@
namespace {
-const FilePath::CharType kWebUILibraryJS[] = FILE_PATH_LITERAL("test_api.js");
-const FilePath::CharType kWebUITestFolder[] = FILE_PATH_LITERAL("webui");
+const FilePath::StringType kWebUILibraryJS =
+ FILE_PATH_LITERAL("test_api.js");
+const FilePath::StringType kWebUITestFolder = FILE_PATH_LITERAL("webui");
base::LazyInstance<std::vector<std::string> > error_messages_(
base::LINKER_INITIALIZED);
@@ -244,45 +244,3 @@
EXPECT_FATAL_FAILURE(RunJavascriptTestNoReturn("FAILS_BogusFunctionName"),
"WebUITestHandler::Observe");
}
-
-
-// This test framework is used in the generated tests, which are included
-// below. WebUIBrowserTest requires being on a page which is a WebUI page. Using
-// the TestChromeWebUIFactory, we use a dummy URL |kChromeTestBrowserTestPass|,
-// which we force to be a WebUI page.
-class WebUIBrowserTestPass
- : public WebUIBrowserTest,
- public TestChromeWebUIFactory::WebUIProvider {
- private:
- // TestChromeWebUIFactory::WebUIProvider:
- virtual WebUI* NewWebUI(TabContents* tab_contents,
- const GURL& url) OVERRIDE {
- return new WebUI(tab_contents);
- }
-
- // InProcessBrowserTest:
- virtual void SetUpOnMainThread() OVERRIDE {
- WebUIBrowserTest::SetUpOnMainThread();
- ui_test_utils::NavigateToURL(browser(),
- GURL(kChromeTestBrowserTestPass));
- }
-
- virtual void SetUpInProcessBrowserTestFixture() OVERRIDE {
- WebUIBrowserTest::SetUpInProcessBrowserTestFixture();
- TestChromeWebUIFactory::AddFactoryOverride(
- GURL(kChromeTestBrowserTestPass).host(), this);
- }
-
- virtual void TearDownInProcessBrowserTestFixture() OVERRIDE {
- WebUIBrowserTest::TearDownInProcessBrowserTestFixture();
- TestChromeWebUIFactory::RemoveFactoryOverride(
- GURL(kChromeTestBrowserTestPass).host());
- }
-
- static const char kChromeTestBrowserTestPass[];
-};
-
-const char WebUIBrowserTestPass::kChromeTestBrowserTestPass[] =
- "chrome://WebUIBrowserTestPass";
-
-#include "chrome/browser/ui/webui/web_ui_browsertest-inl.h"
« no previous file with comments | « chrome/browser/ui/webui/web_ui_browsertest.h ('k') | chrome/chrome_tests.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698