Skip to content

Commit 5cb8f22

Browse files
Merge pull request #20882 from timvandermeij/remove-xfatest
Remove the `xfatest` command
2 parents a90215d + f514198 commit 5cb8f22

3 files changed

Lines changed: 5 additions & 53 deletions

File tree

gulpfile.mjs

Lines changed: 1 addition & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -680,7 +680,7 @@ function getTempFile(prefix, suffix) {
680680
return filePath;
681681
}
682682

683-
function runTests(testsName, { bot = false, xfaOnly = false } = {}) {
683+
function runTests(testsName, { bot = false } = {}) {
684684
return new Promise((resolve, reject) => {
685685
console.log("\n### Running " + testsName + " tests");
686686

@@ -696,9 +696,6 @@ function runTests(testsName, { bot = false, xfaOnly = false } = {}) {
696696
// causing a timeout, hence disabling them for now.
697697
forceNoChrome = true;
698698
}
699-
if (xfaOnly) {
700-
args.push("--xfaOnly");
701-
}
702699
args.push("--manifestFile=" + PDF_TEST);
703700
collectArgs(
704701
{
@@ -1811,29 +1808,6 @@ gulp.task(
18111808
})
18121809
);
18131810

1814-
gulp.task(
1815-
"xfatest",
1816-
gulp.series(setTestEnv, "generic", "components", async function runXfaTest() {
1817-
await runTests("unit");
1818-
await runTests("browser", { xfaOnly: true });
1819-
await runTests("integration");
1820-
})
1821-
);
1822-
1823-
gulp.task(
1824-
"botxfatest",
1825-
gulp.series(
1826-
setTestEnv,
1827-
"generic",
1828-
"components",
1829-
async function runBotXfaTest() {
1830-
await runTests("unit", { bot: true });
1831-
await runTests("browser", { bot: true, xfaOnly: true });
1832-
await runTests("integration");
1833-
}
1834-
)
1835-
);
1836-
18371811
gulp.task(
18381812
"browsertest",
18391813
gulp.series(

test/driver.js

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -505,7 +505,6 @@ class Driver {
505505
this.delay = params.get("delay") | 0;
506506
this.inFlightRequests = 0;
507507
this.testFilter = JSON.parse(params.get("testfilter") || "[]");
508-
this.xfaOnly = params.get("xfaonly") === "true";
509508
this.masterMode = params.get("mastermode") === "true";
510509

511510
// Create a working canvas
@@ -544,14 +543,11 @@ class Driver {
544543
this._log("done\n");
545544
this.manifest = await response.json();
546545

547-
if (this.testFilter?.length || this.xfaOnly) {
546+
if (this.testFilter?.length) {
548547
this.manifest = this.manifest.filter(item => {
549548
if (this.testFilter.includes(item.id)) {
550549
return true;
551550
}
552-
if (this.xfaOnly && item.enableXfa) {
553-
return true;
554-
}
555551
return false;
556552
});
557553
}

test/test.mjs

Lines changed: 3 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@ function parseOptions() {
5757
strictVerify: { type: "boolean", default: false },
5858
testfilter: { type: "string", short: "t", multiple: true, default: [] },
5959
unitTest: { type: "boolean", default: false },
60-
xfaOnly: { type: "boolean", default: false },
6160
},
6261
});
6362

@@ -83,8 +82,7 @@ function parseOptions() {
8382
" --statsFile File where to store stats.\n" +
8483
" --strictVerify Error if manifest file verification fails.\n" +
8584
" --testfilter, -t Run specific reftest(s), e.g. -t=issue5567.\n" +
86-
" --unitTest Run the unit tests.\n" +
87-
" --xfaOnly Only run the XFA reftest(s)."
85+
" --unitTest Run the unit tests.\n"
8886
);
8987
process.exit(0);
9088
}
@@ -97,17 +95,6 @@ function parseOptions() {
9795
"--reftest, --unitTest, --fontTest, and --masterMode must not be specified together."
9896
);
9997
}
100-
if (
101-
+values.unitTest + values.fontTest + values.integration + values.xfaOnly >
102-
1
103-
) {
104-
throw new Error(
105-
"--unitTest, --fontTest, --integration, and --xfaOnly must not be specified together."
106-
);
107-
}
108-
if (values.testfilter.length > 0 && values.xfaOnly) {
109-
throw new Error("--testfilter and --xfaOnly cannot be used together.");
110-
}
11198
if (values.noDownload && values.downloadOnly) {
11299
throw new Error("--noDownload and --downloadOnly cannot be used together.");
113100
}
@@ -347,18 +334,14 @@ function handleSessionTimeout(session) {
347334
function getTestManifest() {
348335
var manifest = JSON.parse(fs.readFileSync(options.manifestFile));
349336

350-
const testFilter = options.testfilter.slice(0),
351-
xfaOnly = options.xfaOnly;
352-
if (testFilter.length || xfaOnly) {
337+
const testFilter = options.testfilter.slice(0);
338+
if (testFilter.length) {
353339
manifest = manifest.filter(function (item) {
354340
var i = testFilter.indexOf(item.id);
355341
if (i !== -1) {
356342
testFilter.splice(i, 1);
357343
return true;
358344
}
359-
if (xfaOnly && item.enableXfa) {
360-
return true;
361-
}
362345
return false;
363346
});
364347
if (testFilter.length) {
@@ -968,7 +951,6 @@ async function startBrowsers({ baseUrl, initializeSession }) {
968951
`?browser=${encodeURIComponent(browserName)}` +
969952
`&manifestFile=${encodeURIComponent("/test/" + options.manifestFile)}` +
970953
`&testFilter=${JSON.stringify(options.testfilter)}` +
971-
`&xfaOnly=${options.xfaOnly}` +
972954
`&delay=${options.statsDelay}` +
973955
`&masterMode=${options.masterMode}`;
974956
startUrl = baseUrl + queryParameters;

0 commit comments

Comments
 (0)