Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 55 additions & 0 deletions tests/common/test_settings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,13 @@
// ---------------------------------------------------------------------------
#include "dsettingsdialog.h"
#include <qsettingbackend.h>
#include <DKeySequenceEdit>

Check warning on line 14 in tests/common/test_settings.cpp

View workflow job for this annotation

GitHub Actions / cppcheck

Include file: <DKeySequenceEdit> not found. Please note: Cppcheck does not need standard library headers to get proper results.
#include <DDialog>

Check warning on line 15 in tests/common/test_settings.cpp

View workflow job for this annotation

GitHub Actions / cppcheck

Include file: <DDialog> not found. Please note: Cppcheck does not need standard library headers to get proper results.
#include <QSettings>

Check warning on line 16 in tests/common/test_settings.cpp

View workflow job for this annotation

GitHub Actions / cppcheck

Include file: <QSettings> not found. Please note: Cppcheck does not need standard library headers to get proper results.
#include <QThread>

Check warning on line 17 in tests/common/test_settings.cpp

View workflow job for this annotation

GitHub Actions / cppcheck

Include file: <QThread> not found. Please note: Cppcheck does not need standard library headers to get proper results.
#include <QPointer>

Check warning on line 18 in tests/common/test_settings.cpp

View workflow job for this annotation

GitHub Actions / cppcheck

Include file: <QPointer> not found. Please note: Cppcheck does not need standard library headers to get proper results.
#include <QKeyEvent>

Check warning on line 19 in tests/common/test_settings.cpp

View workflow job for this annotation

GitHub Actions / cppcheck

Include file: <QKeyEvent> not found. Please note: Cppcheck does not need standard library headers to get proper results.
#include <QDebug>

Check warning on line 20 in tests/common/test_settings.cpp

View workflow job for this annotation

GitHub Actions / cppcheck

Include file: <QDebug> not found. Please note: Cppcheck does not need standard library headers to get proper results.
#include <DApplication>
#include <QLabel>
#include <QPushButton>
Expand Down Expand Up @@ -1166,3 +1167,57 @@
EXPECT_FALSE(withModifier);
EXPECT_FALSE(foreignObject);
}

// PMS: https://pms.uniontech.com/bug-view-102351.html commit: 824ad66b
// 场景:关闭应用不能保留现场。修复(824ad66b):Settings 构造后端不再父挂
// 到 Settings 控件(new QSettingBackend(strConfigPath)),后端不随 widget
// 树提前析构,doSetOption 的写盘(lock + setValue + sync)可完整落盘
TEST_F(SettingsTest, BUG102351_SettingsDestroyed_ConfigValuePreserved)
{
// Arrange: 独立 Settings 实例(不注册单例,同 Destruct_TemporaryInstance 模式)
Settings *tmp = new Settings();
ASSERT_NE(tmp->settings, nullptr);
ASSERT_NE(tmp->m_backend, nullptr);
const QString fontKey = QStringLiteral("base.font.family");
const QString marked = QStringLiteral("bug102351-font");
const QString configPath = QString("%1/%2/%3/config.conf")
.arg(QStandardPaths::writableLocation(QStandardPaths::ConfigLocation))
.arg(QString::fromLatin1(kOrgName))
.arg(QString::fromLatin1(kAppName));

// 修复核心断言:后端无父对象(824ad66b 将 new QSettingBackend(path, this)
// 改为 new QSettingBackend(path)),不随 Settings widget 树提前析构
EXPECT_EQ(tmp->m_backend->parent(), nullptr);

// Act: 经 DSettings 公开 API 写入配置;写链(valueChanged → doSetOption)
// 可能经排队信号异步落盘,轮询等待到达后端
tmp->settings->setOption(fontKey, QVariant(marked));
bool reached = false;
for (int i = 0; i < 40 && !reached; ++i) {
reached = tmp->m_backend->keys().contains(fontKey);
if (!reached) {
QThread::msleep(25);
QApplication::processEvents();
}
}
ASSERT_TRUE(reached);
delete tmp; // 销毁 Settings(dtor 显式 delete m_backend)

// Assert: 配置经全新 CustemBackend 从磁盘读回——后端生命周期独立于
// Settings 控件,销毁 Settings 不丢失已写配置(关闭应用现场保留语义)
// 注:Dtk QSettingBackend 落盘格式为 [key] 组 + value= 子键,
// 这里按值扫描校验(对 key 序列化格式不敏感)
bool onDisk = false;
for (int i = 0; i < 40 && !onDisk; ++i) {
CustemBackend verifier(configPath);
for (const QString &k : verifier.keys()) {
if (verifier.getOption(k).toString() == marked) {

Check warning on line 1214 in tests/common/test_settings.cpp

View workflow job for this annotation

GitHub Actions / cppcheck

Consider using std::any_of algorithm instead of a raw loop.
onDisk = true;
break;
}
}
if (!onDisk)
QThread::msleep(25);
}
EXPECT_TRUE(onDisk);
}
26 changes: 26 additions & 0 deletions tests/common/test_utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1491,3 +1491,29 @@ TEST_F(UtilsTest, IsMemorySufficientForOperation_UnknownOperationType_DefaultAll
EXPECT_TRUE(ok);
EXPECT_TRUE(Utils::isMemorySufficientForOperation(static_cast<Utils::OperationType>(100), 100, 100));
}

// ===========================================================================
// PMS bug 回归用例(批次 2)
// ===========================================================================
// PMS: https://pms.uniontech.com/bug-view-345247.html commit: aff4126b
// 场景:设置-快捷键映射-上一个标签页/减少缩进快捷键展示名错误("Ctrl+Shift+Backtab" → "Ctrl+Shift+Tab")修复(aff4126b):
// Qt 在 Shift 组合下按 Tab 产生 Key_Backtab 事件,QKeySequence(Qt::Key_Backtab).toString() 输出 "Backtab";
// getKeyshortcut 需将 "Backtab" 键名归一化为 "Tab"(含 Shift 组合,即 BUG 中快捷键展示的真实场景)。
// 注:commit aff4126b 实际修复位置为 Utils::getKeyshortcut(任务清单所列 fileIsWritable 未被该 commit 触及,
// 其通用行为已由 FileIsWritable_WritableAndReadOnlyFiles_ReturnExpected 覆盖),故回归用例落在 getKeyshortcut。
TEST_F(UtilsTest, BUG345247_BacktabWithShift_DisplaysTabInsteadOfBacktab)
{
// Arrange:Shift+Tab 在 Qt 中即 Key_Backtab + ShiftModifier;settings.json selectprevtab 默认 "Ctrl+Shift+Tab"
QKeyEvent shiftBacktab(QEvent::KeyPress, Qt::Key_Backtab, Qt::ShiftModifier);
QKeyEvent ctrlShiftBacktab(QEvent::KeyPress, Qt::Key_Backtab, Qt::ControlModifier | Qt::ShiftModifier);

// Act
const QString shiftOnly = Utils::getKeyshortcut(&shiftBacktab);
const QString ctrlShift = Utils::getKeyshortcut(&ctrlShiftBacktab);

// Assert:Backtab 键名归一化为 Tab,展示名绝不能再含 "Backtab"(BUG #345247 展示名错误)
EXPECT_EQ(shiftOnly, QString::fromLatin1("Shift+Tab"));
EXPECT_EQ(ctrlShift, QString::fromLatin1("Ctrl+Shift+Tab"));
EXPECT_FALSE(shiftOnly.contains(QString::fromLatin1("Backtab")));
EXPECT_FALSE(ctrlShift.contains(QString::fromLatin1("Backtab")));
}
38 changes: 38 additions & 0 deletions tests/common2/test_fileloadthread.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -421,3 +421,41 @@ TEST_F(FileLoadThreadTest, SetEncodeHint_AppliesToBothDetectAndConvertPath)
}
EXPECT_TRUE(guard.isNull());
}

// ============================================================================
// PMS 回归用例(Mode 7 PMS 缺陷热点补强,批次 1)
// 数据源:tests/.ut-pms/(bugs.json / work-order.md)
// ============================================================================

// PMS: https://pms.uniontech.com/bug-view-184107.html commit: 3b9b699f
// 场景:读取超大文件时软件闪退。修复(3b9b699f):run() 中 file.read 内存
// 申请以 try-catch 捕获 std::bad_alloc,异常时 emit sigLoadFinished(hasError)
// 安全返回,不再闪退
TEST_F(FileLoadThreadTest, BUG184107_BadAllocDuringRead_EmitsErrorNoCrash)
{
// Arrange: 非 0 size 文件(走 file.read(size) 分支)
const QString path = writeTempFile(QStringLiteral("big-alloc.txt"), QByteArray("x"));
ASSERT_FALSE(path.isEmpty());
FileLoadThread *t = new FileLoadThread(path);
QPointer<FileLoadThread> guard(t);
QSignalSpy spy(t, &FileLoadThread::sigLoadFinished);

// 模拟内存申请失败:file.read(qint64) 抛 std::bad_alloc
stub.set_lamda((QByteArray (QFile::*)(qint64))&QFile::read,
[](QFile *, qint64) -> QByteArray { throw std::bad_alloc(); });

// Act
runSync(t);

// Assert: 异常被捕获 → hasError=true 信号发出,不闪退
EXPECT_EQ(spy.count(), 1);
if (spy.count() == 1) {
EXPECT_TRUE(spy.at(0).at(2).toBool());
EXPECT_FALSE(spy.at(0).at(3).toBool());
}
// 当前代码:catch 分支提前 return(:88),deleteLater 仅在正常路径末尾(:132)注册,
// 故此处 guard 未清空属预期;手动补 deleteLater 防泄漏后断言回收
t->deleteLater();
QCoreApplication::sendPostedEvents(nullptr, QEvent::DeferredDelete);
EXPECT_TRUE(guard.isNull());
Comment on lines +456 to +460

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

issue (testing): The test manually calls deleteLater() after the bad_alloc path and then asserts destruction, so it masks the production lifecycle behavior: a regression where run() emits the error and returns without scheduling cleanup still passes because the test supplies the missing cleanup itself.

Triggers: When FileLoadThread::run() catches the read allocation failure and returns before its normal-path cleanup.

Suggested fix: Assert that the error path itself schedules or performs object cleanup, or use the same ownership mechanism as production and verify the object is destroyed without calling deleteLater() from the test.

}
41 changes: 41 additions & 0 deletions tests/common2/test_iflytekaiassistant.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -573,3 +573,44 @@ INSTANTIATE_TEST_SUITE_P(
ErrorCase{IflytekAiAssistant::NoUserAgreement, nullptr},
ErrorCase{IflytekAiAssistant::Success, nullptr},
ErrorCase{IflytekAiAssistant::Failed, nullptr}));

// ============================================================================
// PMS 批次 2 回归用例(仅追加,勿改动上方状态机用例声明顺序)
// ============================================================================

// PMS: https://pms.uniontech.com/bug-view-300549.html commit: 2b054245
// PMS: https://pms.uniontech.com/bug-view-301561.html commit: 6e402655
// 场景:uos-ai 安装检测/音频设备检测修复(2b054245、6e402655):
// AudioDeviceDetector::hasEnabledPorts/countEnabledPorts 对 DDE Audio
// CardsWithoutUnavailable JSON 的健壮性——非法 JSON(解析失败分支)、
// 合法但根非数组、空数组、端口 Enabled 但 Direction 非法值,均须返回
// false 且不崩溃。本用例不触碰 m_status(hasAudioOutputDevice/
// hasAudioInputDevice 不做状态检查),追加在状态机套件末尾安全
TEST_F(IflytekAiAssistantTest, BUG300549_AudioDetector_InvalidJsonAndEdgeCases_ReturnFalse)
{
// Arrange
IflytekAiAssistant *ins = IflytekAiAssistant::instance();
installAudioStubs();
fakeIsValid = true;
// Act/Assert: JSON 解析失败(缺右括号)→ parseError 分支 → false,不崩溃
cardsJson = QByteArrayLiteral("{\"Id\":0,\"Name\":\"c0\"");
EXPECT_FALSE(ins->hasAudioOutputDevice());
EXPECT_FALSE(ins->hasAudioInputDevice());
// 合法 JSON 但根为对象(非数组)→ array() 为空 → 0 端口 → false
cardsJson = QByteArrayLiteral("{\"Id\":0,\"Ports\":[]}");
EXPECT_FALSE(ins->hasAudioOutputDevice());
// 空数组 → 0 端口 → false
cardsJson = QByteArrayLiteral("[]");
EXPECT_FALSE(ins->hasAudioInputDevice());
// 端口 Enabled 但 Direction 为非法值(9):输出/输入方向计数均为 0 → false
cardsJson = QByteArrayLiteral(
"[{\"Id\":7,\"Name\":\"usb-audio\",\"Ports\":[{\"Name\":\"spk\",\"Enabled\":true,\"Direction\":9}]}]");
EXPECT_FALSE(ins->hasAudioOutputDevice());
EXPECT_FALSE(ins->hasAudioInputDevice());
// Direction 匹配但 Enabled=false,countEnabledPorts 计数条件不满足 → false
cardsJson = QByteArrayLiteral(
"[{\"Id\":7,\"Name\":\"usb-audio\",\"Ports\":[{\"Name\":\"spk\",\"Enabled\":false,\"Direction\":1}]}]");
EXPECT_FALSE(ins->hasAudioOutputDevice());
// 以上全程仅读取属性,无 DBus 方法调用
EXPECT_EQ(dbusCallCount, 0);
}
61 changes: 61 additions & 0 deletions tests/common2/test_textfilesaver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -350,3 +350,64 @@ TEST_F(TextFileSaverTest, ErrorString_InitiallyEmpty_ReturnsEmptyByDefault)
EXPECT_FALSE(obj->save());
EXPECT_FALSE(obj->errorString().isEmpty());
}

// ============================================================================
// PMS 批次 2 回归用例(仅追加)
// ============================================================================

// PMS: https://pms.uniontech.com/bug-view-327987.html commit: 5cacfb18
// 场景:禁用 QSaveFile 防超长文件名/权限问题(5cacfb18):save() 直接用 QFile
// 保存,超过 MAX_FILENAME_LENGTH(245) 的长文件名(QSaveFile 临时文件名
// 会超文件系统 255 字节上限,327987 根因)须可完整保存且内容可读回
TEST_F(TextFileSaverTest, BUG327987_LongFileName_DirectQFileSave_Succeeds)
{
// Arrange: 248 个 'a' + ".txt" = 252 字节(> 245,且 ≤ 文件系统 255 字节上限)
const QString longName = QString(248, QLatin1Char('a')) + QStringLiteral(".txt");
ASSERT_EQ(longName.length(), 252);
const QString expectedText = QStringLiteral("long filename content 中文");
doc->setPlainText(expectedText);
obj->setFilePath(filePath(longName));
// Act
const bool ret = obj->save();
// Assert: 保存成功、errorString 清空、内容完整可读回
EXPECT_TRUE(ret);
EXPECT_TRUE(obj->errorString().isEmpty());
QFile f(filePath(longName));
ASSERT_TRUE(f.open(QIODevice::ReadOnly));
EXPECT_EQ(f.readAll(), expectedText.toUtf8());
f.close();
}

// PMS: https://pms.uniontech.com/bug-view-327987.html commit: 5cacfb18
// 场景:QSaveFile 经临时文件 rename 提交会用临时文件权限(umask 派生,通常 0644)
// 覆盖原文件权限——327987 根因之一;修复后 save() 直接 QFile 覆写既有文件,
// inode 不重建,原有权限必须保持不变
TEST_F(TextFileSaverTest, BUG327987_SaveOverExistingFile_PreservesPermissions)
{
// Arrange: 预创建文件并 chmod 为 0664(含组写,区别于 QSaveFile rename 后的 0644)
const QString path = filePath(QStringLiteral("perm_check.txt"));
{
QFile pre(path);
ASSERT_TRUE(pre.open(QIODevice::WriteOnly));
pre.write(QByteArrayLiteral("old"));
}
const QFile::Permissions expected = QFile::ReadOwner | QFile::WriteOwner
| QFile::ReadGroup | QFile::WriteGroup
| QFile::ReadOther; // 0664
ASSERT_TRUE(QFile::setPermissions(path, expected));
// Qt6 中 QFile::permissions() 对 Unix 文件同时置 Owner 与 User 位别名(0664 → 0x6664),
// 故以前后快照对比断言“权限保持”,不硬编码 flag 联合值
const QFile::Permissions permsBefore = QFile::permissions(path);
ASSERT_TRUE(permsBefore & QFile::WriteGroup); // 确认组写已置(QSaveFile rename 后会丢失)
doc->setPlainText(QStringLiteral("updated"));
obj->setFilePath(path);
// Act: 直接 QFile 覆写(Truncate,不重建 inode)
const bool ret = obj->save();
// Assert: 保存成功、内容更新、权限保持 0664 不变
EXPECT_TRUE(ret);
EXPECT_EQ(QFile::permissions(path), permsBefore);
QFile f(path);
ASSERT_TRUE(f.open(QIODevice::ReadOnly));
EXPECT_EQ(f.readAll(), QStringLiteral("updated").toUtf8());
f.close();
}
23 changes: 23 additions & 0 deletions tests/controls_ut/test_findbar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -502,4 +502,27 @@ TEST_P(FindBarKeywordTest, GetCurrentSearchText_AfterTyped_ReflectsEditLineConte
EXPECT_EQ(bar->getCurrentSearchText(), editLine->lineEdit()->text()); // 双向一致
}

// ---- PMS bug 回归用例(批次 2)----

// PMS: https://pms.uniontech.com/bug-view-56153.html commit: 4fb7deff
// 场景:编辑不保存关闭重开显示异常(4fb7deff):构造函数移除 contentChanged →
// slot_ifClearSearchWord 陈旧连接(slot 已删除);触发 LineBar::contentChanged
// 不得清空关键词/破坏栏状态。activeInput 语义已由 ActiveInput_WithKeyword/
// ActiveInput_EmptyKeyword 两用例覆盖。
TEST_F(FindBarTest, BUG56153_Constructor_ContentChangedNotWired_KeepsKeyword)
{
// Arrange:填充关键词并显示
bar->activeInput(QString::fromUtf8("kw56153"), QString::fromUtf8("/ut/56153.txt"), 3, 4, 5);
ASSERT_EQ(bar->getCurrentSearchText(), QString::fromUtf8("kw56153"));
ASSERT_TRUE(bar->isVisible());

// Act:直发 LineBar::contentChanged(4fb7deff 前该信号连接 slot_ifClearSearchWord)
emit editLine->contentChanged();
QApplication::processEvents();

// Assert:关键词保留、栏仍显示、状态未破坏
EXPECT_EQ(bar->getCurrentSearchText(), QString::fromUtf8("kw56153"));
EXPECT_TRUE(bar->isVisible());
}

} // namespace
100 changes: 100 additions & 0 deletions tests/controls_ut/test_tabbar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1530,4 +1530,104 @@ TEST_F(TabbarTest, SettingsResource_QrcLinked_InstanceAvailable)
EXPECT_EQ(Settings::instance(), Settings::instance());
}

// ---- PMS bug 回归用例(批次 2)----

// PMS: https://pms.uniontech.com/bug-view-305473.html commit: 65bc75a3
// 场景:主题色切换文字显示不对(65bc75a3):修复本体为 setTabPalette 在 Qt6 下跳过
// 手动 setPalette(由 SetTabPalette_AnyColors_NoStateCorruption 覆盖;主题渲染
// 效果 offscreen 不可断言,SKIP);此处补批次指定 updateTab 的 localDataPath
// (空白/草稿文件)分支缺口:tooltip 直接用 tabName,不走路径换行重排。
TEST_F(TabbarTest, BUG305473_UpdateTab_LocalDraftTooltipUsesTabName)
{
installWindowRecorderStubs(nullptr);
addTabsQuietly({ localRoot + "/before.txt" });

// Act:更新为 localDataPath 下的草稿路径(命中 localDataPath 含分支)
const QString draft = localRoot + "/draft-after.txt";
bar->updateTab(0, draft, QString::fromUtf8("草稿&后.txt"));

// Assert:路径表同步更新;tooltip = tabName 原文(不经换行重排、无 '\n')
EXPECT_EQ(bar->fileAt(0), draft);
EXPECT_EQ(bar->m_tabTruePaths.at(0), draft);
EXPECT_EQ(bar->tabToolTip(0), QString::fromUtf8("草稿&后.txt"));
EXPECT_FALSE(bar->tabToolTip(0).contains('\n'));
}

// PMS: https://pms.uniontech.com/bug-view-67950.html commit: 9eb4f93c
// 场景:安全测试 17 处内存泄露(9eb4f93c):~Tabbar 增加 m_rightMenu/
// m_moreWaysCloseMenu 判空释放;右键菜单分配后销毁 Tabbar 不崩溃、
// 菜单逐一经判空释放(泄漏由 ASAN/valgrind 构建守护)。构造函数
// setAcceptDrops(true)(e8be974a)已由 Constructor_DefaultParent 断言覆盖。
TEST_F(TabbarTest, BUG67950_Destructor_AfterMenusAllocated_DestroysWithoutCrash)
{
installWindowRecorderStubs(nullptr);
addTabsQuietly({ localRoot + "/dtor0.txt", localRoot + "/dtor1.txt" });

// Arrange:右键命中标签 → 分配 m_rightMenu / m_moreWaysCloseMenu
const QRect rect = bar->tabRect(0);
ASSERT_FALSE(rect.isNull());
QMouseEvent rightPress(QEvent::MouseButtonPress, rect.center(), bar->mapToGlobal(rect.center()),
Qt::RightButton, Qt::RightButton, Qt::NoModifier);
ASSERT_TRUE(bar->eventFilter(bar, &rightPress));
ASSERT_NE(bar->m_rightMenu, nullptr);
ASSERT_NE(bar->m_moreWaysCloseMenu, nullptr);

// Act + Assert:析构走判空释放分支(9eb4f93c 修复点),不崩溃
delete bar;
bar = nullptr;
SUCCEED();
}

// PMS: https://pms.uniontech.com/bug-view-97737.html commit: 2ac30a62
// 场景:触摸屏/wayland 下拖拽窗口中唯一标签页应用闪退(2ac30a62):旧代码
// count()==1 时 window()->hide(),wayland 下引发闪退;修复后 wayland
// 不再隐藏窗口。previousTab/nextTab 边界回绕由 StepTab_BoundaryIndex_
// WrapsOrSteps 覆盖。
struct DragPixmapSingleTabCase {
bool wayland; // Utils::isWayland 桩值
bool expectMinimized; // 期望拖拽后窗口被最小化(非 wayland 现行为)
};

class TabbarDragSingleTabTest : public TabbarTest,
public ::testing::WithParamInterface<DragPixmapSingleTabCase> {
};

TEST_P(TabbarDragSingleTabTest, BUG97737_CreateDragPixmap_SingleTab_WindowStateFollowsPlatform)
{
EditWrapper *wrapper = nullptr;
installEditWrapperCtorStubs(stub, host, &wrapper);
wrapper->textEditor()->setSettings(Settings::instance());
installWindowRecorderStubs(wrapper);
const bool wayland = GetParam().wayland;
stub.set_lamda(&Utils::isWayland, [wayland]() -> bool { return wayland; });
stub.set_lamda(&DWindowManagerHelper::hasComposite,
[](DWindowManagerHelper *) -> bool { return false; });
addTabsQuietly({ localRoot + "/single.txt" });
ASSERT_EQ(bar->count(), 1); // 唯一标签页场景
ASSERT_TRUE(host->isVisible());

// Act:拖拽唯一标签页(真实 EditWrapper 渲染链路)
QStyleOptionTab option;
QPoint hotspot;
const QPixmap pixmap = bar->createDragPixmapFromTab(0, option, &hotspot);

QApplication::processEvents();

// Assert:位图非空;wayland 单标签不隐藏/最小化窗口(97737 回归点),
// 非 wayland 走 showMinimized(现合并提示行为)
EXPECT_FALSE(pixmap.isNull());
if (GetParam().expectMinimized) {
EXPECT_TRUE(host->windowState() & Qt::WindowMinimized);
} else {
EXPECT_FALSE(host->windowState() & Qt::WindowMinimized);
EXPECT_TRUE(host->isVisible());
}
}

INSTANTIATE_TEST_SUITE_P(
SingleTabDrag, TabbarDragSingleTabTest,
::testing::Values(
DragPixmapSingleTabCase{ true, false }, // wayland:不最小化(97737 回归点)
DragPixmapSingleTabCase{ false, true })); // 非 wayland:showMinimized

} // namespace
Loading
Loading