summaryrefslogtreecommitdiffstats
path: root/chrome/test
diff options
context:
space:
mode:
authorjcampan@chromium.org <jcampan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-24 22:23:23 +0000
committerjcampan@chromium.org <jcampan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-24 22:23:23 +0000
commit8890152cfef0f04a00a06f7bc789a09677f22ac0 (patch)
tree765d3065aaa5258f74989ad9f9e4137b5fcbbb63 /chrome/test
parentf580476269c13a0c10f454d9175ef9cc45e066f5 (diff)
downloadchromium_src-8890152cfef0f04a00a06f7bc789a09677f22ac0.zip
chromium_src-8890152cfef0f04a00a06f7bc789a09677f22ac0.tar.gz
chromium_src-8890152cfef0f04a00a06f7bc789a09677f22ac0.tar.bz2
Reverting 10295.
Reverting my last CL Review URL: http://codereview.chromium.org/28095 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10297 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test')
-rw-r--r--chrome/test/in_process_browser_test.cc16
-rw-r--r--chrome/test/in_process_browser_test.h14
-rw-r--r--chrome/test/interactive_ui/interactive_ui.vcproj110
-rw-r--r--chrome/test/ui_test_utils.cc4
-rw-r--r--chrome/test/unit/chrome_test_suite.h4
5 files changed, 7 insertions, 141 deletions
diff --git a/chrome/test/in_process_browser_test.cc b/chrome/test/in_process_browser_test.cc
index aae695b..dd1f919 100644
--- a/chrome/test/in_process_browser_test.cc
+++ b/chrome/test/in_process_browser_test.cc
@@ -12,7 +12,6 @@
#include "chrome/browser/browser_shutdown.h"
#include "chrome/browser/profile.h"
#include "chrome/browser/profile_manager.h"
-#include "chrome/browser/renderer_host/render_process_host.h"
#include "chrome/browser/views/frame/browser_view.h"
#include "chrome/common/chrome_constants.h"
#include "chrome/common/chrome_paths.h"
@@ -44,10 +43,7 @@ bool DieFileDie(const std::wstring& file, bool recurse) {
} // namespace
-InProcessBrowserTest::InProcessBrowserTest()
- : browser_(NULL),
- show_window_(false),
- dom_automation_enabled_(false) {
+InProcessBrowserTest::InProcessBrowserTest() : browser_(NULL) {
}
void InProcessBrowserTest::SetUp() {
@@ -72,23 +68,15 @@ void InProcessBrowserTest::SetUp() {
CommandLine* command_line = CommandLine::ForCurrentProcessMutable();
// Hide windows on show.
- if (!command_line->HasSwitch(kUnitTestShowWindows) && !show_window_)
+ if (!command_line->HasSwitch(kUnitTestShowWindows))
BrowserView::SetShowState(SW_HIDE);
- if (dom_automation_enabled_)
- command_line->AppendSwitch(switches::kDomAutomationController);
-
command_line->AppendSwitchWithValue(switches::kUserDataDir, user_data_dir);
// For some reason the sandbox wasn't happy running in test mode. These
// tests aren't intended to test the sandbox, so we turn it off.
command_line->AppendSwitch(switches::kNoSandbox);
- // Single-process mode is not set in BrowserMain so it needs to be processed
- // explicitlty.
- if (command_line->HasSwitch(switches::kSingleProcess))
- RenderProcessHost::set_run_renderer_in_process(true);
-
// Explicitly set the path of the exe used for the renderer, otherwise it'll
// try to use unit_test.exe.
std::wstring renderer_path;
diff --git a/chrome/test/in_process_browser_test.h b/chrome/test/in_process_browser_test.h
index 90dcdc9..230b8df 100644
--- a/chrome/test/in_process_browser_test.h
+++ b/chrome/test/in_process_browser_test.h
@@ -5,6 +5,7 @@
#ifndef CHROME_TEST_IN_PROCESS_BROWSER_TEST_H_
#define CHROME_TEST_IN_PROCESS_BROWSER_TEST_H_
+#include "chrome/app/scoped_ole_initializer.h"
#include "chrome/common/notification_registrar.h"
#include "chrome/common/notification_observer.h"
#include "net/url_request/url_request_unittest.h"
@@ -73,11 +74,6 @@ class InProcessBrowserTest : public testing::Test, public NotificationObserver {
// This is invoked from Setup.
virtual Browser* CreateBrowser(Profile* profile);
- // Sets some test states (see below for comments). Call this in your test
- // constructor.
- void set_show_window(bool show) { show_window_ = show; }
- void EnableDOMAutomation() { dom_automation_enabled_ = true; }
-
private:
// Invokes CreateBrowser to create a browser, then RunTestOnMainThread, and
// destroys the browser.
@@ -92,13 +88,7 @@ class InProcessBrowserTest : public testing::Test, public NotificationObserver {
// HTTPServer, created when StartHTTPServer is invoked.
scoped_refptr<HTTPTestServer> http_server_;
- // Whether this test requires the browser windows to be shown (interactive
- // tests for example need the windows shown).
- bool show_window_;
-
- // Whether the JavaScript can access the DOMAutomationController (a JS object
- // that can send messages back to the browser).
- bool dom_automation_enabled_;
+ ScopedOleInitializer ole_initializer_;
DISALLOW_COPY_AND_ASSIGN(InProcessBrowserTest);
};
diff --git a/chrome/test/interactive_ui/interactive_ui.vcproj b/chrome/test/interactive_ui/interactive_ui.vcproj
index 5047175..a4863ee 100644
--- a/chrome/test/interactive_ui/interactive_ui.vcproj
+++ b/chrome/test/interactive_ui/interactive_ui.vcproj
@@ -12,16 +12,12 @@
/>
</Platforms>
<ToolFiles>
- <ToolFile
- RelativePath="..\..\tools\build\win\version.rules"
- />
</ToolFiles>
<Configurations>
<Configuration
Name="Debug|Win32"
- OutputDirectory="$(SolutionDir)$(ConfigurationName)"
ConfigurationType="1"
- InheritedPropertySheets="$(SolutionDir)..\build\common.vsprops;$(SolutionDir)..\build\debug.vsprops;..\..\tools\build\win\precompiled_wtl.vsprops;..\..\tools\build\win\unit_test.vsprops;$(SolutionDir)..\third_party\libpng\using_libpng.vsprops;$(SolutionDir)..\third_party\zlib\using_zlib.vsprops;$(SolutionDir)..\skia\using_skia.vsprops;$(SolutionDir)..\third_party\libxml\build\using_libxml.vsprops;$(SolutionDir)..\third_party\icu38\build\using_icu.vsprops;$(SolutionDir)..\testing\using_gtest.vsprops;..\..\third_party\hunspell\using_hunspell.vsprops;..\..\installer\util\using_util.vsprops;..\..\..\third_party\npapi\using_npapi.vsprops"
+ InheritedPropertySheets="$(SolutionDir)..\build\common.vsprops;$(SolutionDir)..\build\debug.vsprops;..\..\tools\build\win\precompiled_wtl.vsprops;..\..\tools\build\win\unit_test.vsprops;$(SolutionDir)..\third_party\libpng\using_libpng.vsprops;$(SolutionDir)..\third_party\zlib\using_zlib.vsprops;$(SolutionDir)..\skia\using_skia.vsprops;$(SolutionDir)..\third_party\libxml\build\using_libxml.vsprops;..\..\..\third_party\icu38\build\using_icu.vsprops;$(SolutionDir)..\testing\using_gtest.vsprops;..\..\third_party\hunspell\using_hunspell.vsprops"
>
<Tool
Name="VCPreBuildEventTool"
@@ -30,9 +26,6 @@
Name="VCCustomBuildTool"
/>
<Tool
- Name="Version"
- />
- <Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
@@ -49,14 +42,12 @@
/>
<Tool
Name="VCResourceCompilerTool"
- AdditionalIncludeDirectories="$(SolutionDir)..;&quot;$(IntDir)&quot;;&quot;$(IntDir)&quot;;&quot;$(SolutionDir)&quot;;&quot;$(IntDir)\..\&quot;"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
- AdditionalDependencies="winmm.lib"
/>
<Tool
Name="VCALinkTool"
@@ -95,9 +86,6 @@
Name="VCCustomBuildTool"
/>
<Tool
- Name="Version"
- />
- <Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
@@ -155,14 +143,6 @@
Name="Common"
>
<File
- RelativePath="..\in_process_browser_test.cc"
- >
- </File>
- <File
- RelativePath="..\in_process_browser_test.h"
- >
- </File>
- <File
RelativePath="..\ui\npapi_test_helper.cc"
>
</File>
@@ -211,14 +191,6 @@
>
</File>
<File
- RelativePath="..\ui_test_utils.cc"
- >
- </File>
- <File
- RelativePath="..\ui_test_utils.h"
- >
- </File>
- <File
RelativePath=".\view_event_test_base.cc"
>
</File>
@@ -228,86 +200,6 @@
</File>
</Filter>
<Filter
- Name="resources"
- >
- <File
- RelativePath="..\..\..\webkit\glue\resources\aliasb.cur"
- >
- </File>
- <File
- RelativePath="$(OutDir)\grit_derived_sources\browser_resources.rc"
- >
- </File>
- <File
- RelativePath="..\..\..\webkit\glue\resources\cell.cur"
- >
- </File>
- <File
- RelativePath="..\..\app\chrome_dll.rc"
- >
- </File>
- <File
- RelativePath="..\..\app\chrome_dll_resource.h"
- >
- </File>
- <File
- RelativePath="..\..\app\chrome_dll_version.rc.version"
- >
- </File>
- <File
- RelativePath="..\..\..\webkit\glue\resources\col_resize.cur"
- >
- </File>
- <File
- RelativePath="$(OutDir)\grit_derived_sources\common_resources.rc"
- >
- </File>
- <File
- RelativePath="..\..\..\webkit\glue\resources\copy.cur"
- >
- </File>
- <File
- RelativePath="$(OutDir)\grit_derived_sources\debugger_resources.rc"
- >
- </File>
- <File
- RelativePath="$(OutDir)\grit_derived_sources\net_resources.rc"
- >
- </File>
- <File
- RelativePath="$(OutDir)\grit_derived_sources\renderer_resources.rc"
- >
- </File>
- <File
- RelativePath="..\data\resource.h"
- >
- </File>
- <File
- RelativePath="..\data\resource.rc"
- >
- </File>
- <File
- RelativePath="..\..\..\webkit\glue\resources\row_resize.cur"
- >
- </File>
- <File
- RelativePath="..\..\..\webkit\glue\resources\vertical_text.cur"
- >
- </File>
- <File
- RelativePath="$(OutDir)\grit_derived_sources\webkit_resources.rc"
- >
- </File>
- <File
- RelativePath="..\..\..\webkit\glue\resources\zoom_in.cur"
- >
- </File>
- <File
- RelativePath="..\..\..\webkit\glue\resources\zoom_out.cur"
- >
- </File>
- </Filter>
- <Filter
Name="TestBookmarkBarView"
>
<File
diff --git a/chrome/test/ui_test_utils.cc b/chrome/test/ui_test_utils.cc
index 7471711..1293f72 100644
--- a/chrome/test/ui_test_utils.cc
+++ b/chrome/test/ui_test_utils.cc
@@ -10,7 +10,6 @@
#include "chrome/browser/tab_contents/web_contents.h"
#include "chrome/common/notification_registrar.h"
#include "chrome/common/notification_service.h"
-#include "chrome/views/accelerator_handler.h"
#include "googleurl/src/gurl.h"
namespace ui_test_utils {
@@ -60,8 +59,7 @@ void RunMessageLoop() {
MessageLoopForUI* loop = MessageLoopForUI::current();
bool did_allow_task_nesting = loop->NestableTasksAllowed();
loop->SetNestableTasksAllowed(true);
- views::AcceleratorHandler handler;
- loop->Run(&handler);
+ loop->Run(NULL);
loop->SetNestableTasksAllowed(did_allow_task_nesting);
}
diff --git a/chrome/test/unit/chrome_test_suite.h b/chrome/test/unit/chrome_test_suite.h
index 3382d972..79c5e19 100644
--- a/chrome/test/unit/chrome_test_suite.h
+++ b/chrome/test/unit/chrome_test_suite.h
@@ -12,7 +12,6 @@
#include "base/path_service.h"
#include "base/scoped_nsautorelease_pool.h"
#include "base/test_suite.h"
-#include "chrome/app/scoped_ole_initializer.h"
#include "chrome/browser/browser_process.h"
#include "chrome/common/chrome_paths.h"
#include "chrome/common/chrome_switches.h"
@@ -79,12 +78,11 @@ protected:
// Tear down shared StatsTable; prevents unit_tests from leaking it.
StatsTable::set_current(NULL);
delete stats_table_;
-
+
TestSuite::Shutdown();
}
StatsTable* stats_table_;
- ScopedOleInitializer ole_initializer_;
};
#endif // CHROME_TEST_UNIT_CHROME_TEST_SUITE_H_