summaryrefslogtreecommitdiffstats
path: root/chrome/test
diff options
context:
space:
mode:
authorjcampan@chromium.org <jcampan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-25 02:02:46 +0000
committerjcampan@chromium.org <jcampan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-25 02:02:46 +0000
commit1e187afa75fe66d8525651c1f395c40e8227844d (patch)
tree28a2f0ea9a7c27305af52e8382b471a321a9af8b /chrome/test
parent67a54912d23c2a0c87065e9a876971fda54edf70 (diff)
downloadchromium_src-1e187afa75fe66d8525651c1f395c40e8227844d.zip
chromium_src-1e187afa75fe66d8525651c1f395c40e8227844d.tar.gz
chromium_src-1e187afa75fe66d8525651c1f395c40e8227844d.tar.bz2
Reverting 10318.
Reverting again... Review URL: http://codereview.chromium.org/28106 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10321 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.vcproj113
-rw-r--r--chrome/test/ui_test_utils.cc4
-rw-r--r--chrome/test/unit/chrome_test_suite.h4
-rw-r--r--chrome/test/unit/unittests.vcproj4
6 files changed, 8 insertions, 147 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 ee5907e..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"
@@ -86,7 +77,7 @@
<Configuration
Name="Release|Win32"
ConfigurationType="1"
- InheritedPropertySheets="$(SolutionDir)..\build\common.vsprops;$(SolutionDir)..\build\release.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\release.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"
@@ -95,9 +86,6 @@
Name="VCCustomBuildTool"
/>
<Tool
- Name="Version"
- />
- <Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
@@ -114,7 +102,6 @@
/>
<Tool
Name="VCResourceCompilerTool"
- AdditionalIncludeDirectories="$(SolutionDir)..;&quot;$(IntDir)&quot;;&quot;$(IntDir)&quot;;&quot;$(SolutionDir)&quot;;&quot;$(IntDir)\..\&quot;"
/>
<Tool
Name="VCPreLinkEventTool"
@@ -156,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>
@@ -212,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>
@@ -229,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_
diff --git a/chrome/test/unit/unittests.vcproj b/chrome/test/unit/unittests.vcproj
index fbc182b..3011530 100644
--- a/chrome/test/unit/unittests.vcproj
+++ b/chrome/test/unit/unittests.vcproj
@@ -999,10 +999,6 @@
>
</File>
</Filter>
- <File
- RelativePath="..\..\browser\browser_focus_uitest.cc"
- >
- </File>
</Files>
<Globals>
</Globals>