Changeset View
Changeset View
Standalone View
Standalone View
autotests/integration/shell_client_rules_test.cpp
Show First 20 Lines • Show All 100 Lines • ▼ Show 20 Line(s) | |||||
101 | #define TEST_DATA( name ) \ | 101 | #define TEST_DATA( name ) \ | ||
102 | void TestShellClientRules::name##_data() \ | 102 | void TestShellClientRules::name##_data() \ | ||
103 | { \ | 103 | { \ | ||
104 | QTest::addColumn<Test::ShellSurfaceType>("type"); \ | 104 | QTest::addColumn<Test::ShellSurfaceType>("type"); \ | ||
105 | QTest::addColumn<int>("ruleNumber"); \ | 105 | QTest::addColumn<int>("ruleNumber"); \ | ||
106 | QTest::newRow("wlShell|Force") << Test::ShellSurfaceType::WlShell << 2; \ | 106 | QTest::newRow("wlShell|Force") << Test::ShellSurfaceType::WlShell << 2; \ | ||
107 | QTest::newRow("xdgShellV5|Force") << Test::ShellSurfaceType::XdgShellV5 << 2; \ | 107 | QTest::newRow("xdgShellV5|Force") << Test::ShellSurfaceType::XdgShellV5 << 2; \ | ||
108 | QTest::newRow("xdgShellV6|Force") << Test::ShellSurfaceType::XdgShellV6 << 2; \ | 108 | QTest::newRow("xdgShellV6|Force") << Test::ShellSurfaceType::XdgShellV6 << 2; \ | ||
109 | QTest::newRow("xdgWmBase|Force") << Test::ShellSurfaceType::XdgShellStable << 2; \ | ||||
109 | QTest::newRow("wlShell|Apply") << Test::ShellSurfaceType::WlShell << 3; \ | 110 | QTest::newRow("wlShell|Apply") << Test::ShellSurfaceType::WlShell << 3; \ | ||
110 | QTest::newRow("xdgShellV5|Apply") << Test::ShellSurfaceType::XdgShellV5 << 3; \ | 111 | QTest::newRow("xdgShellV5|Apply") << Test::ShellSurfaceType::XdgShellV5 << 3; \ | ||
111 | QTest::newRow("xdgShellV6|Apply") << Test::ShellSurfaceType::XdgShellV6 << 3; \ | 112 | QTest::newRow("xdgShellV6|Apply") << Test::ShellSurfaceType::XdgShellV6 << 3; \ | ||
113 | QTest::newRow("xdgWmBase|Apply") << Test::ShellSurfaceType::XdgShellStable << 3; \ | ||||
112 | QTest::newRow("wlShell|ApplyNow") << Test::ShellSurfaceType::WlShell << 5; \ | 114 | QTest::newRow("wlShell|ApplyNow") << Test::ShellSurfaceType::WlShell << 5; \ | ||
113 | QTest::newRow("xdgShellV5|ApplyNow") << Test::ShellSurfaceType::XdgShellV5 << 5; \ | 115 | QTest::newRow("xdgShellV5|ApplyNow") << Test::ShellSurfaceType::XdgShellV5 << 5; \ | ||
114 | QTest::newRow("xdgShellV6|ApplyNow") << Test::ShellSurfaceType::XdgShellV6 << 5; \ | 116 | QTest::newRow("xdgShellV6|ApplyNow") << Test::ShellSurfaceType::XdgShellV6 << 5; \ | ||
117 | QTest::newRow("xdgWmBase|ApplyNow") << Test::ShellSurfaceType::XdgShellStable << 5; \ | ||||
115 | QTest::newRow("wlShell|ForceTemporarily") << Test::ShellSurfaceType::WlShell << 6; \ | 118 | QTest::newRow("wlShell|ForceTemporarily") << Test::ShellSurfaceType::WlShell << 6; \ | ||
116 | QTest::newRow("xdgShellV5|ForceTemporarily") << Test::ShellSurfaceType::XdgShellV5 << 6; \ | 119 | QTest::newRow("xdgShellV5|ForceTemporarily") << Test::ShellSurfaceType::XdgShellV5 << 6; \ | ||
117 | QTest::newRow("xdgShellV6|ForceTemporarily") << Test::ShellSurfaceType::XdgShellV6 << 6; \ | 120 | QTest::newRow("xdgShellV6|ForceTemporarily") << Test::ShellSurfaceType::XdgShellV6 << 6; \ | ||
121 | QTest::newRow("xdgWmBase|ForceTemporarily") << Test::ShellSurfaceType::XdgShellStable << 6; \ | ||||
118 | } | 122 | } | ||
119 | 123 | | |||
120 | #define TEST_FORCE_DATA( name ) \ | 124 | #define TEST_FORCE_DATA( name ) \ | ||
121 | void TestShellClientRules::name##_data() \ | 125 | void TestShellClientRules::name##_data() \ | ||
122 | { \ | 126 | { \ | ||
123 | QTest::addColumn<Test::ShellSurfaceType>("type"); \ | 127 | QTest::addColumn<Test::ShellSurfaceType>("type"); \ | ||
124 | QTest::addColumn<int>("ruleNumber"); \ | 128 | QTest::addColumn<int>("ruleNumber"); \ | ||
125 | QTest::newRow("wlShell|Force") << Test::ShellSurfaceType::WlShell << 2; \ | 129 | QTest::newRow("wlShell|Force") << Test::ShellSurfaceType::WlShell << 2; \ | ||
126 | QTest::newRow("xdgShellV5|Force") << Test::ShellSurfaceType::XdgShellV5 << 2; \ | 130 | QTest::newRow("xdgShellV5|Force") << Test::ShellSurfaceType::XdgShellV5 << 2; \ | ||
127 | QTest::newRow("xdgShellV6|Force") << Test::ShellSurfaceType::XdgShellV6 << 2; \ | 131 | QTest::newRow("xdgShellV6|Force") << Test::ShellSurfaceType::XdgShellV6 << 2; \ | ||
132 | QTest::newRow("xdgWmBase|Force") << Test::ShellSurfaceType::XdgShellStable << 2; \ | ||||
128 | QTest::newRow("wlShell|ForceTemporarily") << Test::ShellSurfaceType::WlShell << 6; \ | 133 | QTest::newRow("wlShell|ForceTemporarily") << Test::ShellSurfaceType::WlShell << 6; \ | ||
129 | QTest::newRow("xdgShellV5|ForceTemporarily") << Test::ShellSurfaceType::XdgShellV5 << 6; \ | 134 | QTest::newRow("xdgShellV5|ForceTemporarily") << Test::ShellSurfaceType::XdgShellV5 << 6; \ | ||
130 | QTest::newRow("xdgShellV6|ForceTemporarily") << Test::ShellSurfaceType::XdgShellV6 << 6; \ | 135 | QTest::newRow("xdgShellV6|ForceTemporarily") << Test::ShellSurfaceType::XdgShellV6 << 6; \ | ||
136 | QTest::newRow("xdgWmBase|ForceTemporarily") << Test::ShellSurfaceType::XdgShellStable << 6; \ | ||||
131 | } | 137 | } | ||
132 | 138 | | |||
133 | 139 | | |||
134 | TEST_DATA(testApplyInitialDesktop) | 140 | TEST_DATA(testApplyInitialDesktop) | ||
135 | 141 | | |||
136 | void TestShellClientRules::testApplyInitialDesktop() | 142 | void TestShellClientRules::testApplyInitialDesktop() | ||
137 | { | 143 | { | ||
138 | // ensure we have two desktops and are on first desktop | 144 | // ensure we have two desktops and are on first desktop | ||
▲ Show 20 Lines • Show All 316 Lines • Show Last 20 Lines |