summaryrefslogtreecommitdiffstats
path: root/ash/drag_drop
diff options
context:
space:
mode:
authorjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-03-18 04:25:35 +0000
committerjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-03-18 04:25:35 +0000
commita88f63686baa4751ab6638413ca7b62f8a3c2738 (patch)
tree0b8a7e13326055789131f47ef4dd60ba707d33f7 /ash/drag_drop
parentd75d14350f6875855cc465ba06a2e3807b879269 (diff)
downloadchromium_src-a88f63686baa4751ab6638413ca7b62f8a3c2738.zip
chromium_src-a88f63686baa4751ab6638413ca7b62f8a3c2738.tar.gz
chromium_src-a88f63686baa4751ab6638413ca7b62f8a3c2738.tar.bz2
Run ContentMain in a browser_test's browser process. This removes duplication of code in the browser test harness for setting up the browser process, and also ensures that initialization code in ContentMainRunner runs.
Most of the changes are to unit tests which run in browser test executables. These were getting all the setup that these binaries did for browser tests even though they were unit tests. Now they have to explicitly setup objects that they need. This would be done automatically if they were in a unit test binary and therefore using the unit test harness. The goal should be to move these tests to unit test binaries, and make them support launching some tests in separate processes building on the work that Pawel did. BUG=350550 R=sky@chromium.org Review URL: https://codereview.chromium.org/190663012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@257597 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash/drag_drop')
-rw-r--r--ash/drag_drop/drag_drop_interactive_uitest.cc25
1 files changed, 24 insertions, 1 deletions
diff --git a/ash/drag_drop/drag_drop_interactive_uitest.cc b/ash/drag_drop/drag_drop_interactive_uitest.cc
index bf20f70..f9b3cee 100644
--- a/ash/drag_drop/drag_drop_interactive_uitest.cc
+++ b/ash/drag_drop/drag_drop_interactive_uitest.cc
@@ -8,10 +8,14 @@
#include "ash/test/ash_test_base.h"
#include "base/bind.h"
#include "base/message_loop/message_loop.h"
+#include "base/path_service.h"
#include "base/strings/utf_string_conversions.h"
#include "ui/aura/window_event_dispatcher.h"
#include "ui/base/dragdrop/drag_drop_types.h"
+#include "ui/base/resource/resource_bundle.h"
#include "ui/base/test/ui_controls.h"
+#include "ui/base/ui_base_paths.h"
+#include "ui/gl/gl_surface.h"
#include "ui/views/view.h"
#include "ui/views/widget/widget.h"
@@ -118,7 +122,26 @@ void DragDropAcrossMultiDisplay_Step1() {
} // namespace
-typedef test::AshTestBase DragDropTest;
+class DragDropTest : public test::AshTestBase {
+ public:
+ DragDropTest() {}
+ virtual ~DragDropTest() {}
+
+ virtual void SetUp() OVERRIDE {
+ gfx::GLSurface::InitializeOneOffForTests();
+
+ ui::RegisterPathProvider();
+ ResourceBundle::InitSharedInstanceWithLocale("en-US", NULL);
+ base::FilePath resources_pack_path;
+ PathService::Get(base::DIR_MODULE, &resources_pack_path);
+ resources_pack_path =
+ resources_pack_path.Append(FILE_PATH_LITERAL("resources.pak"));
+ ResourceBundle::GetSharedInstance().AddDataPackFromPath(
+ resources_pack_path, ui::SCALE_FACTOR_NONE);
+
+ test::AshTestBase::SetUp();
+ }
+};
#if defined(OS_WIN)
#define MAYBE_DragDropAcrossMultiDisplay DISABLED_DragDropAcrossMultiDisplay