chromium/third_party/blink/renderer/core/dom/events/event_target_test.cc

// Copyright 2016 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "third_party/blink/renderer/core/dom/events/event_target.h"

#include "third_party/blink/renderer/bindings/core/v8/js_event_listener.h"
#include "third_party/blink/renderer/bindings/core/v8/v8_add_event_listener_options.h"
#include "third_party/blink/renderer/bindings/core/v8/v8_binding_for_testing.h"
#include "third_party/blink/renderer/bindings/core/v8/v8_observable_event_listener_options.h"
#include "third_party/blink/renderer/bindings/core/v8/v8_observer.h"
#include "third_party/blink/renderer/bindings/core/v8/v8_subscribe_options.h"
#include "third_party/blink/renderer/bindings/core/v8/v8_union_observer_observercallback.h"
#include "third_party/blink/renderer/core/dom/abort_controller.h"
#include "third_party/blink/renderer/core/dom/events/add_event_listener_options_resolved.h"
#include "third_party/blink/renderer/core/dom/observable.h"
#include "third_party/blink/renderer/core/frame/local_dom_window.h"
#include "third_party/blink/renderer/core/script/classic_script.h"
#include "third_party/blink/renderer/core/testing/core_unit_test_helper.h"
#include "third_party/blink/renderer/platform/heap/thread_state.h"

namespace blink {

class EventTargetTest : public RenderingTest {};

TEST_F(EventTargetTest, UseCountPassiveTouchEventListener) {}

TEST_F(EventTargetTest, UseCountNonPassiveTouchEventListener) {}

TEST_F(EventTargetTest, UseCountPassiveTouchEventListenerPassiveNotSpecified) {}

TEST_F(EventTargetTest, UseCountBeforematch) {}

TEST_F(EventTargetTest, UseCountAbortSignal) {}

TEST_F(EventTargetTest, UseCountScrollend) {}

// See https://crbug.com/1357453.
// Tests that we don't crash when adding a unload event handler to a target
// that has no ExecutionContext.
TEST_F(EventTargetTest, UnloadWithoutExecutionContext) {}

// See https://crbug.com/1472739.
// Tests that we don't crash if the abort algorithm for a destroyed EventTarget
// runs because the associated EventListener hasn't yet been GCed.
TEST_F(EventTargetTest, EventTargetWithAbortSignalDestroyed) {}

// EventTarget-constructed Observables add an event listener for each
// subscription. Ensure that when a subscription becomes inactive, the event
// listener is removed.
TEST_F(EventTargetTest,
       ObservableSubscriptionBecomingInactiveRemovesEventListener) {}

TEST_F(EventTargetTest, UseCountScrollsnapchanging) {}

TEST_F(EventTargetTest, UseCountScrollsnapchange) {}

}  // namespace blink