Commit 929ed58b authored by Peter Kasting's avatar Peter Kasting Committed by Commit Bot

Move views-specific test code in chrome/test/base/ to c/b/ui/views/test/.

Bug: none
Change-Id: I4a5cffd410d1f87431b7705a6ef5bb94955f6813
Reviewed-on: https://chromium-review.googlesource.com/c/1483830
Commit-Queue: Scott Violet <sky@chromium.org>
Reviewed-by: default avatarScott Violet <sky@chromium.org>
Auto-Submit: Peter Kasting <pkasting@chromium.org>
Cr-Commit-Position: refs/heads/master@{#634857}
parent 12c3b65c
......@@ -27,6 +27,7 @@
#include "chrome/browser/ui/tabs/tab_strip_model.h"
#include "chrome/browser/ui/views/chrome_constrained_window_views_client.h"
#include "chrome/browser/ui/views/chrome_layout_provider.h"
#include "chrome/browser/ui/views/test/view_event_test_base.h"
#include "chrome/common/chrome_content_client.h"
#include "chrome/test/base/interactive_test_utils.h"
#include "chrome/test/base/scoped_testing_local_state.h"
......@@ -34,7 +35,6 @@
#include "chrome/test/base/testing_browser_process.h"
#include "chrome/test/base/testing_profile.h"
#include "chrome/test/base/ui_test_utils.h"
#include "chrome/test/base/view_event_test_base.h"
#include "components/bookmarks/browser/bookmark_model.h"
#include "components/bookmarks/common/bookmark_pref_names.h"
#include "components/bookmarks/test/bookmark_test_helpers.h"
......
......@@ -10,9 +10,9 @@
#include "base/single_thread_task_runner.h"
#include "base/strings/utf_string_conversions.h"
#include "base/threading/thread_task_runner_handle.h"
#include "chrome/browser/ui/views/test/view_event_test_base.h"
#include "chrome/test/base/interactive_test_utils.h"
#include "chrome/test/base/ui_test_utils.h"
#include "chrome/test/base/view_event_test_base.h"
#include "ui/base/models/menu_model.h"
#include "ui/base/test/ui_controls.h"
#include "ui/views/controls/button/menu_button.h"
......
......@@ -9,7 +9,7 @@
#include "base/callback.h"
#include "base/macros.h"
#include "chrome/test/base/view_event_test_base.h"
#include "chrome/browser/ui/views/test/view_event_test_base.h"
#include "ui/events/keycodes/keyboard_codes.h"
#include "ui/views/controls/button/menu_button_listener.h"
#include "ui/views/controls/menu/menu_delegate.h"
......
include_rules = [
"+mojo/core/embedder",
]
\ No newline at end of file
pkasting@chromium.org
sky@chromium.org
\ No newline at end of file
......@@ -2,17 +2,17 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chrome/test/base/view_event_test_base.h"
#include "chrome/browser/ui/views/test/view_event_test_base.h"
#include "base/bind.h"
#include "base/location.h"
#include "base/macros.h"
#include "base/single_thread_task_runner.h"
#include "base/threading/thread_task_runner_handle.h"
#include "chrome/browser/ui/views/test/view_event_test_platform_part.h"
#include "chrome/test/base/chrome_unit_test_suite.h"
#include "chrome/test/base/interactive_test_utils.h"
#include "chrome/test/base/testing_browser_process.h"
#include "chrome/test/base/view_event_test_platform_part.h"
#include "mojo/core/embedder/embedder.h"
#include "ui/base/clipboard/clipboard.h"
#include "ui/base/ime/input_method_initializer.h"
......@@ -59,9 +59,7 @@ class TestView : public views::View {
} // namespace
ViewEventTestBase::ViewEventTestBase()
: window_(NULL),
content_view_(NULL) {
ViewEventTestBase::ViewEventTestBase() : window_(NULL), content_view_(NULL) {
// The TestingBrowserProcess must be created in the constructor because there
// are tests that require it before SetUp() is called.
TestingBrowserProcess::CreateInstance();
......
......@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef CHROME_TEST_BASE_VIEW_EVENT_TEST_BASE_H_
#define CHROME_TEST_BASE_VIEW_EVENT_TEST_BASE_H_
#ifndef CHROME_BROWSER_UI_VIEWS_TEST_VIEW_EVENT_TEST_BASE_H_
#define CHROME_BROWSER_UI_VIEWS_TEST_VIEW_EVENT_TEST_BASE_H_
// We only want to use ViewEventTestBase in test targets which properly
// isolate each test case by running each test in a separate process.
......@@ -73,8 +73,7 @@ class ViewEventTestPlatformPart;
// // Then schedule another mouse move to finish it.
// ScheduleMouseMoveInBackground(loc.x, loc.y);
class ViewEventTestBase : public views::WidgetDelegate,
public testing::Test {
class ViewEventTestBase : public views::WidgetDelegate, public testing::Test {
public:
ViewEventTestBase();
......@@ -161,10 +160,8 @@ class ViewEventTestBase : public views::WidgetDelegate,
// Convenience macro for defining a ViewEventTestBase. See class description
// of ViewEventTestBase for details.
#define VIEW_TEST(test_class, name) \
TEST_F(test_class, name) {\
StartMessageLoopAndRunTest();\
}
TEST_F(test_class, name) { StartMessageLoopAndRunTest(); }
#endif // defined(HAS_OUT_OF_PROC_TEST_RUNNER)
#endif // CHROME_TEST_BASE_VIEW_EVENT_TEST_BASE_H_
#endif // CHROME_BROWSER_UI_VIEWS_TEST_VIEW_EVENT_TEST_BASE_H_
......@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef CHROME_TEST_BASE_VIEW_EVENT_TEST_PLATFORM_PART_H_
#define CHROME_TEST_BASE_VIEW_EVENT_TEST_PLATFORM_PART_H_
#ifndef CHROME_BROWSER_UI_VIEWS_TEST_VIEW_EVENT_TEST_PLATFORM_PART_H_
#define CHROME_BROWSER_UI_VIEWS_TEST_VIEW_EVENT_TEST_PLATFORM_PART_H_
#include "base/macros.h"
#include "ui/gfx/native_widget_types.h"
......@@ -11,7 +11,7 @@
namespace ui {
class ContextFactory;
class ContextFactoryPrivate;
}
} // namespace ui
// A helper class owned by tests that performs platform specific initialization.
// ViewEventTestPlatformPart behaves a bit like views::ViewsTestHelper, but on
......@@ -38,4 +38,4 @@ class ViewEventTestPlatformPart {
DISALLOW_COPY_AND_ASSIGN(ViewEventTestPlatformPart);
};
#endif // CHROME_TEST_BASE_VIEW_EVENT_TEST_PLATFORM_PART_H_
#endif // CHROME_BROWSER_UI_VIEWS_TEST_VIEW_EVENT_TEST_PLATFORM_PART_H_
......@@ -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/base/view_event_test_platform_part.h"
#include "chrome/browser/ui/views/test/view_event_test_platform_part.h"
#include <memory>
#include <utility>
......
......@@ -2,11 +2,12 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chrome/browser/ui/views/test/view_event_test_platform_part.h"
#include <memory>
#include "base/macros.h"
#include "build/build_config.h"
#include "chrome/test/base/view_event_test_platform_part.h"
#include "ui/aura/env.h"
#include "ui/display/screen.h"
#include "ui/views/widget/desktop_aura/desktop_screen.h"
......
......@@ -4,7 +4,7 @@
#include "chrome/browser/ui/views/toolbar/toolbar_button.h"
#include "chrome/test/base/view_event_test_base.h"
#include "chrome/browser/ui/views/test/view_event_test_base.h"
#include "ui/base/models/simple_menu_model.h"
#include "ui/views/controls/menu/menu_runner.h"
......
......@@ -4,8 +4,8 @@
#include "base/run_loop.h"
#include "base/win/windows_version.h"
#include "chrome/browser/ui/views/test/view_event_test_base.h"
#include "chrome/test/base/testing_profile.h"
#include "chrome/test/base/view_event_test_base.h"
#include "ui/aura/env.h"
#include "ui/aura/test/env_test_helper.h"
#include "ui/aura/window.h"
......
......@@ -4972,9 +4972,6 @@ if (!is_android) {
"base/interactive_ui_tests_main.cc",
"base/save_desktop_snapshot_win.cc",
"base/save_desktop_snapshot_win.h",
"base/view_event_test_platform_part.h",
"base/view_event_test_platform_part_chromeos.cc",
"base/view_event_test_platform_part_default.cc",
"ppapi/ppapi_interactive_browsertest.cc",
]
......@@ -5117,13 +5114,16 @@ if (!is_android) {
"../browser/ui/views/status_icons/status_tray_state_changer_interactive_uitest_win.cc",
"../browser/ui/views/tabs/tab_drag_controller_interactive_uitest.cc",
"../browser/ui/views/tabs/tab_drag_controller_interactive_uitest.h",
"../browser/ui/views/test/view_event_test_base.cc",
"../browser/ui/views/test/view_event_test_base.h",
"../browser/ui/views/test/view_event_test_platform_part.h",
"../browser/ui/views/test/view_event_test_platform_part_chromeos.cc",
"../browser/ui/views/test/view_event_test_platform_part_default.cc",
"../browser/ui/views/toolbar/toolbar_action_view_interactive_uitest.cc",
"../browser/ui/views/toolbar/toolbar_button_interactive_uitest.cc",
"../browser/ui/views/toolbar/toolbar_view_interactive_uitest.cc",
"../browser/ui/views/translate/translate_bubble_test_utils_views.cc",
"base/interactive_test_utils_views.cc",
"base/view_event_test_base.cc",
"base/view_event_test_base.h",
]
deps += [
"//ui/views",
......@@ -5164,7 +5164,7 @@ if (!is_android) {
"../browser/ui/signin_view_controller_interactive_uitest.cc",
# Use only the _chromeos version on Ash / Chrome OS.
"base/view_event_test_platform_part_default.cc",
"../browser/ui/views/test/view_event_test_platform_part_default.cc",
]
} else { # ! is_chromeos
# Non-ChromeOS notifications tests.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment