mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-08 17:30:09 +02:00
Remove the ENABLE_SCRIPTING
build-target, since it's not necessary
There's no really compelling reason, as far as I can tell, to introduce the `ENABLE_SCRIPTING` build-target, instead of simply re-using the existing `TESTING` build-target for the new `gulp integrationtest` task. In general there should be no problem with just always enable scripting in TESTING-builds, and if I were to *guess* the reason that this didn't seem to work was most likely because the Preferences ended up over-writing the `AppOptions`. As it turns out the GENERIC-viewer has already has built-in support for disabling of Preferences, via the `AppOptions`, and this can be utilized in TESTING-builds as well to ensure that whatever `AppOptions` are set they're always respected.
This commit is contained in:
parent
eff4d8182d
commit
c78f153bda
3 changed files with 21 additions and 43 deletions
55
gulpfile.js
55
gulpfile.js
|
@ -97,7 +97,6 @@ const DEFINES = Object.freeze({
|
|||
PRODUCTION: true,
|
||||
SKIP_BABEL: true,
|
||||
TESTING: false,
|
||||
ENABLE_SCRIPTING: false,
|
||||
// The main build targets:
|
||||
GENERIC: false,
|
||||
MOZCENTRAL: false,
|
||||
|
@ -682,7 +681,6 @@ gulp.task("default_preferences-pre", function () {
|
|||
LIB: true,
|
||||
BUNDLE_VERSION: 0, // Dummy version
|
||||
BUNDLE_BUILD: 0, // Dummy build
|
||||
ENABLE_SCRIPTING: process.env.ENABLE_SCRIPTING === "true",
|
||||
}),
|
||||
map: {
|
||||
"pdfjs-lib": "../pdf",
|
||||
|
@ -1551,46 +1549,29 @@ gulp.task("testing-pre", function (done) {
|
|||
done();
|
||||
});
|
||||
|
||||
gulp.task("enable-scripting", function (done) {
|
||||
process.env.ENABLE_SCRIPTING = "true";
|
||||
done();
|
||||
});
|
||||
|
||||
gulp.task(
|
||||
"test",
|
||||
gulp.series(
|
||||
"enable-scripting",
|
||||
"testing-pre",
|
||||
"generic",
|
||||
"components",
|
||||
function () {
|
||||
return streamqueue(
|
||||
{ objectMode: true },
|
||||
createTestSource("unit"),
|
||||
createTestSource("browser"),
|
||||
createTestSource("integration")
|
||||
);
|
||||
}
|
||||
)
|
||||
gulp.series("testing-pre", "generic", "components", function () {
|
||||
return streamqueue(
|
||||
{ objectMode: true },
|
||||
createTestSource("unit"),
|
||||
createTestSource("browser"),
|
||||
createTestSource("integration")
|
||||
);
|
||||
})
|
||||
);
|
||||
|
||||
gulp.task(
|
||||
"bottest",
|
||||
gulp.series(
|
||||
"enable-scripting",
|
||||
"testing-pre",
|
||||
"generic",
|
||||
"components",
|
||||
function () {
|
||||
return streamqueue(
|
||||
{ objectMode: true },
|
||||
createTestSource("unit", true),
|
||||
createTestSource("font", true),
|
||||
createTestSource("browser (no reftest)", true),
|
||||
createTestSource("integration")
|
||||
);
|
||||
}
|
||||
)
|
||||
gulp.series("testing-pre", "generic", "components", function () {
|
||||
return streamqueue(
|
||||
{ objectMode: true },
|
||||
createTestSource("unit", true),
|
||||
createTestSource("font", true),
|
||||
createTestSource("browser (no reftest)", true),
|
||||
createTestSource("integration")
|
||||
);
|
||||
})
|
||||
);
|
||||
|
||||
gulp.task(
|
||||
|
@ -1609,7 +1590,7 @@ gulp.task(
|
|||
|
||||
gulp.task(
|
||||
"integrationtest",
|
||||
gulp.series("enable-scripting", "testing-pre", "generic", function () {
|
||||
gulp.series("testing-pre", "generic", function () {
|
||||
return createTestSource("integration");
|
||||
})
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue