summaryrefslogtreecommitdiffstats
path: root/chrome/test
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/test')
-rw-r--r--chrome/test/interactive_ui/interactive_ui.vcproj28
-rw-r--r--chrome/test/interactive_ui/view_event_test_base.cc (renamed from chrome/test/ui/view_event_test_base.cc)8
-rw-r--r--chrome/test/interactive_ui/view_event_test_base.h (renamed from chrome/test/ui/view_event_test_base.h)15
-rw-r--r--chrome/test/unit/unittests.vcproj16
4 files changed, 38 insertions, 29 deletions
diff --git a/chrome/test/interactive_ui/interactive_ui.vcproj b/chrome/test/interactive_ui/interactive_ui.vcproj
index 7be44ab..5449a05 100644
--- a/chrome/test/interactive_ui/interactive_ui.vcproj
+++ b/chrome/test/interactive_ui/interactive_ui.vcproj
@@ -17,7 +17,7 @@
<Configuration
Name="Debug|Win32"
ConfigurationType="1"
- InheritedPropertySheets="$(SolutionDir)..\build\common.vsprops;$(SolutionDir)..\build\debug.vsprops;..\..\tools\build\win\precompiled_wtl.vsprops;$(SolutionDir)..\third_party\libxml\build\using_libxml.vsprops;$(SolutionDir)..\third_party\libxslt\build\using_libxslt.vsprops;..\..\tools\build\win\unit_test.vsprops;..\..\tools\build\win\ui_test.vsprops;$(SolutionDir)..\skia\using_skia.vsprops;$(SolutionDir)..\testing\using_gtest.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"
@@ -77,7 +77,7 @@
<Configuration
Name="Release|Win32"
ConfigurationType="1"
- InheritedPropertySheets="$(SolutionDir)..\build\common.vsprops;$(SolutionDir)..\build\release.vsprops;$(SolutionDir)..\third_party\libxml\build\using_libxml.vsprops;$(SolutionDir)..\third_party\libxslt\build\using_libxslt.vsprops;..\..\tools\build\win\unit_test.vsprops;..\..\tools\build\win\ui_test.vsprops;$(SolutionDir)..\skia\using_skia.vsprops;$(SolutionDir)..\testing\using_gtest.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"
@@ -167,6 +167,14 @@
>
</File>
<File
+ RelativePath="..\testing_profile.cc"
+ >
+ </File>
+ <File
+ RelativePath="..\testing_profile.h"
+ >
+ </File>
+ <File
RelativePath="..\ui\ui_test.cc"
>
</File>
@@ -178,6 +186,22 @@
RelativePath="..\ui\ui_test_suite.cc"
>
</File>
+ <File
+ RelativePath=".\view_event_test_base.cc"
+ >
+ </File>
+ <File
+ RelativePath=".\view_event_test_base.h"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="TestBookmarkBarView"
+ >
+ <File
+ RelativePath="..\..\browser\views\bookmark_bar_view_test.cc"
+ >
+ </File>
</Filter>
<Filter
Name="TestFindInPage"
diff --git a/chrome/test/ui/view_event_test_base.cc b/chrome/test/interactive_ui/view_event_test_base.cc
index a702ea3..8cf9e61 100644
--- a/chrome/test/ui/view_event_test_base.cc
+++ b/chrome/test/interactive_ui/view_event_test_base.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chrome/test/ui/view_event_test_base.h"
+#include "chrome/test/interactive_ui/view_event_test_base.h"
#include "base/message_loop.h"
#include "chrome/browser/automation/ui_controls.h"
@@ -38,7 +38,10 @@ const int kMouseMoveDelayMS = 200;
// static
void ViewEventTestBase::Done() {
MessageLoop::current()->Quit();
- MessageLoop::current()->Quit();
+ // If we're in a nested message loop, as is the case with menus, we need
+ // to quit twice. The second quit does that for us.
+ MessageLoop::current()->PostDelayedTask(
+ FROM_HERE, new MessageLoop::QuitTask(), 0);
}
ViewEventTestBase::ViewEventTestBase() : window_(NULL), content_view_(NULL) { }
@@ -113,4 +116,3 @@ void ViewEventTestBase::RunTestMethod(Task* task) {
if (HasFatalFailure())
Done();
}
-
diff --git a/chrome/test/ui/view_event_test_base.h b/chrome/test/interactive_ui/view_event_test_base.h
index e89f734..28b5a5e 100644
--- a/chrome/test/ui/view_event_test_base.h
+++ b/chrome/test/interactive_ui/view_event_test_base.h
@@ -2,9 +2,10 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CHROME_TEST_UI_VIEW_EVENT_TEST_BASE_H_
-#define CHROME_TEST_UI_VIEW_EVENT_TEST_BASE_H_
+#ifndef CHROME_TEST_INTERACTIVE_UI_VIEW_EVENT_TEST_BASE_H_
+#define CHROME_TEST_INTERACTIVE_UI_VIEW_EVENT_TEST_BASE_H_
+#include "base/message_loop.h"
#include "base/thread.h"
#include "chrome/views/window_delegate.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -123,18 +124,16 @@ class ViewEventTestBase : public ChromeViews::WindowDelegate,
// Thread for posting background MouseMoves.
scoped_ptr<base::Thread> dnd_thread_;
+ MessageLoopForUI message_loop_;
+
DISALLOW_COPY_AND_ASSIGN(ViewEventTestBase);
};
// Convenience macro for defining a ViewEventTestBase. See class description
// of ViewEventTestBase for details.
-//
-// NOTE: These tests are disabled until we get a buildbot that is always logged
-// in and can run them.
#define VIEW_TEST(test_class, name) \
- TEST_F(test_class, DISABLED_name) {\
+ TEST_F(test_class, name) {\
StartMessageLoopAndRunTest();\
}
-#endif // CHROME_TEST_UI_VIEW_EVENT_TEST_BASE_H_
-
+#endif // CHROME_TEST_INTERACTIVE_UI_VIEW_EVENT_TEST_BASE_H_
diff --git a/chrome/test/unit/unittests.vcproj b/chrome/test/unit/unittests.vcproj
index c84a572..fee3966 100644
--- a/chrome/test/unit/unittests.vcproj
+++ b/chrome/test/unit/unittests.vcproj
@@ -209,14 +209,6 @@
RelativePath="..\..\..\net\url_request\url_request_test_job.h"
>
</File>
- <File
- RelativePath="..\ui\view_event_test_base.cc"
- >
- </File>
- <File
- RelativePath="..\ui\view_event_test_base.h"
- >
- </File>
</Filter>
<Filter
Name="TestBookmarkBarContextMenuController"
@@ -227,14 +219,6 @@
</File>
</Filter>
<Filter
- Name="TestBookmarkBarView"
- >
- <File
- RelativePath="..\..\browser\views\bookmark_bar_view_test.cc"
- >
- </File>
- </Filter>
- <Filter
Name="TestBookmarkEditorView"
>
<File