mirror of
https://github.com/linuxdeepin/dde-dock.git
synced 2025-06-04 17:33:05 +00:00

显示桌面,智能隐藏模式时,检查显示模式切换任务栏状态 Log: 添加显示模式切换任务栏状态检查单元测试 Task: https://pms.uniontech.com/zentao/task-view-35928.html Change-Id: I02eee88cdbfa463c998724537cd958591ea8fd76 Reviewed-on: http://gerrit.uniontech.com/c/dde-dock/+/6166 Reviewed-by: <mailman@uniontech.com> Reviewed-by: fanpengcheng <fanpengcheng@uniontech.com> Tested-by: <mailman@uniontech.com>
64 lines
2.6 KiB
C++
64 lines
2.6 KiB
C++
/*
|
|
* Copyright (C) 2018 ~ 2028 Uniontech Technology Co., Ltd.
|
|
*
|
|
* Author: fanpengcheng <fanpengcheng@uniontech.com>
|
|
*
|
|
* Maintainer: fanpengcheng <fanpengcheng@uniontech.com>
|
|
*
|
|
* This program is free software: you can redistribute it and/or modify
|
|
* it under the terms of the GNU General Public License as published by
|
|
* the Free Software Foundation, either version 3 of the License, or
|
|
* any later version.
|
|
*
|
|
* This program is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
* GNU General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU General Public License
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
*/
|
|
#ifndef DOCK_UNIT_TEST_H
|
|
#define DOCK_UNIT_TEST_H
|
|
#include <QObject>
|
|
|
|
#include <com_deepin_dde_daemon_dock.h>
|
|
|
|
#include "../interfaces/constants.h"
|
|
|
|
using DBusDock = com::deepin::dde::daemon::Dock;
|
|
|
|
class DockUnitTest : public QObject
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
DockUnitTest();
|
|
~DockUnitTest();
|
|
|
|
private:
|
|
QDBusInterface *m_dockInter;
|
|
DBusDock *m_daemonDockInter;
|
|
|
|
private:
|
|
const DockRect dockGeometry(); // 获取任务栏实际位置
|
|
const DockRect frontendWindowRect(); // 后端记录的任务栏前端界面位置(和实际位置不一定对应)
|
|
void setPosition(Dock::Position pos);
|
|
|
|
private slots:
|
|
void dock_defaultGsettings_check(); // 默认配置项检查
|
|
void dock_geometry_check(); // 显示区域
|
|
void dock_position_check(); // 位置检查
|
|
void dock_displayMode_check(); // 显示模式检查
|
|
void dock_appItemCount_check(); // 应用显示数量检查
|
|
void dock_defaultVolume_Check(float defaultVolume = 50.0f); // 设备默认音量检查
|
|
void dock_frontWindowRect_check(); // 检查FrontendWindowRect接口数据是否正确
|
|
void dock_multi_process(); // 检查是否正常启动
|
|
void dock_coreDump_check(); // dock是否一直崩溃
|
|
void dock_appIconSize_check(); // 图标大小检查
|
|
void dock_appDockUndock_check(); // 任务栏上的应用移除和加载检测
|
|
void dock_switchModeState_check(); // 显示桌面智能隐藏时切换任务栏模式,检查任务栏状态
|
|
};
|
|
|
|
#endif // DOCK_UNIT_TEST_H
|