mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-23 21:01:08 +00:00
7d6e26c06c
Introduces MockDragService as a subclass/implementation of nsBaseDragService. This class is based on the Windows implementation of nsBaseDragService. The service is created with a MockDragServiceController that JS can use to initiate drag events that would normally come from the system. Native drag-and-drop is not permitted in automation because it puts the browser into a state where, if anything goes wrong (e.g. a test failure), it cannot be killed without manual intervention. This allows us to avoid that limitation while still testing most of the browser's drag-and-drop behavior, including the (substantial and complex) nsBaseDragService base-class that is common to all platforms. Differential Revision: https://phabricator.services.mozilla.com/D205640
30 lines
796 B
C++
30 lines
796 B
C++
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
|
|
#ifndef MockDragServiceController_h__
|
|
#define MockDragServiceController_h__
|
|
|
|
#include "nsIMockDragServiceController.h"
|
|
|
|
namespace mozilla::test {
|
|
|
|
class MockDragService;
|
|
|
|
class MockDragServiceController : public nsIMockDragServiceController {
|
|
public:
|
|
MockDragServiceController();
|
|
|
|
NS_DECL_ISUPPORTS
|
|
NS_DECL_NSIMOCKDRAGSERVICECONTROLLER
|
|
|
|
private:
|
|
virtual ~MockDragServiceController();
|
|
RefPtr<MockDragService> mDragService;
|
|
};
|
|
|
|
} // namespace mozilla::test
|
|
|
|
#endif // MockDragServiceController_h__
|