Commit b6160c86 authored by Scott Violet's avatar Scott Violet Committed by Commit Bot

Revert "Ignore window [de]activation in content_browsertests."

This reverts commit 901d5088.

Reason for revert: Didn't address concerns of where this API should live. In particular DNWA isn't the right place, it should be on Widget.

Original change's description:
> Ignore window [de]activation in content_browsertests.
> 
> These events can happen when another test starts or finishes and cause
> frame/widget focus state changes, breaking some tests.
> 
> Bug: 695054
> Change-Id: I9ab6b3887c00421d4c6f96dd508e912b23706176
> Reviewed-on: https://chromium-review.googlesource.com/926368
> Reviewed-by: John Abd-El-Malek <jam@chromium.org>
> Commit-Queue: Alexander Semashko <ahest@yandex-team.ru>
> Cr-Commit-Position: refs/heads/master@{#543328}

TBR=sky@chromium.org,dcheng@chromium.org,jam@chromium.org,dpranke@chromium.org,ahest@yandex-team.ru

Change-Id: Ia3b8b9eabb4463ddcd22e81cec1f5ee7fffa639e
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 695054
Reviewed-on: https://chromium-review.googlesource.com/963658Reviewed-by: default avatarScott Violet <sky@chromium.org>
Commit-Queue: Scott Violet <sky@chromium.org>
Cr-Commit-Position: refs/heads/master@{#543378}
parent fa9989eb
......@@ -23,7 +23,4 @@ specific_include_rules = {
"+third_party/iaccessible2",
"+ui/base/resource/resource_bundle.h",
],
"content_browser_test.cc": [
"+ui/views/widget/desktop_aura/desktop_native_widget_aura.h"
],
}
......@@ -30,10 +30,6 @@
#include "ui/base/ime/input_method_initializer.h"
#endif
#if defined(USE_AURA)
#include "ui/views/widget/desktop_aura/desktop_native_widget_aura.h" // nogncheck
#endif
namespace content {
ContentBrowserTest::ContentBrowserTest() {
......@@ -85,13 +81,6 @@ void ContentBrowserTest::SetUp() {
subprocess_path);
#endif
#if defined(USE_AURA)
// https://crbug.com/695054: Ignore window activation/deactivation to make
// the Chrome-internal focus unaffected by OS events caused by running tests
// in parallel.
views::DesktopNativeWidgetAura::DisableActivationChangeHandlingForTests();
#endif
// LinuxInputMethodContextFactory has to be initialized.
#if !defined(OS_CHROMEOS) && defined(OS_LINUX)
ui::InitializeInputMethodForTesting();
......
......@@ -538,10 +538,6 @@ jumbo_static_library("browsertest_support") {
deps += [ "//content/public/browser" ]
}
if (use_aura) {
deps += [ "//ui/views" ]
}
configs += [ "//v8:external_startup_data" ]
}
......
......@@ -72,8 +72,6 @@ DEFINE_UI_CLASS_PROPERTY_KEY(DesktopNativeWidgetAura*,
namespace {
bool g_disable_activation_change_handling_ = false;
// This class provides functionality to create a top level widget to host a
// child window.
class DesktopNativeWidgetTopLevelHandler : public aura::WindowObserver {
......@@ -238,11 +236,6 @@ DesktopNativeCursorManager* DesktopNativeWidgetAura::native_cursor_manager_ =
NULL;
wm::CursorManager* DesktopNativeWidgetAura::cursor_manager_ = NULL;
// static
void DesktopNativeWidgetAura::DisableActivationChangeHandlingForTests() {
g_disable_activation_change_handling_ = true;
}
DesktopNativeWidgetAura::DesktopNativeWidgetAura(
internal::NativeWidgetDelegate* delegate)
: desktop_window_tree_host_(NULL),
......@@ -355,9 +348,6 @@ void DesktopNativeWidgetAura::OnDesktopWindowTreeHostDestroyed(
}
void DesktopNativeWidgetAura::HandleActivationChanged(bool active) {
if (g_disable_activation_change_handling_)
return;
native_widget_delegate_->OnNativeWidgetActivationChanged(active);
wm::ActivationClient* activation_client =
wm::GetActivationClient(host_->window());
......
......@@ -100,10 +100,6 @@ class VIEWS_EXPORT DesktopNativeWidgetAura
// Overridden from internal::NativeWidgetPrivate:
gfx::NativeWindow GetNativeWindow() const override;
// Forces HandleActivationChanged to do nothing, making Chrome-internal notion
// of focused and active windows independent from the OS.
static void DisableActivationChangeHandlingForTests();
protected:
// Overridden from internal::NativeWidgetPrivate:
void InitNativeWidget(const Widget::InitParams& params) override;
......
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