diff --git a/test/integration/image/marker.png b/test/integration/image/marker.png new file mode 100644 index 00000000000..75359862470 Binary files /dev/null and b/test/integration/image/marker.png differ diff --git a/test/integration/lib/harness.js b/test/integration/lib/harness.js index 308493949ad..c9b6c5a448d 100644 --- a/test/integration/lib/harness.js +++ b/test/integration/lib/harness.js @@ -1,27 +1,25 @@ 'use strict'; -/* eslint-disable no-process-exit */ - -const fs = require('fs'); -const path = require('path'); -const queue = require('d3-queue').queue; -const colors = require('colors/safe'); -const handlebars = require('handlebars'); +var fs = require('fs'); +var path = require('path'); +var queue = require('d3-queue').queue; +var colors = require('colors/safe'); +var handlebars = require('handlebars'); module.exports = function (directory, implementation, options, run) { - const q = queue(1); - const server = require('./server')(); + var q = queue(1); + var server = require('./server')(); - const tests = options.tests || []; + var tests = options.tests || []; function shouldRunTest(group, test) { if (tests.length === 0) return true; - const id = `${group}/${test}`; + var id = group + '/' + test; - for (let i = 0; i < tests.length; i++) { - const k = id.indexOf(tests[i]); + for (var i = 0; i < tests.length; i++) { + var k = id.indexOf(tests[i]); if (k === 0 || id[k - 1] === '-' || id[k - 1] === '/') return true; } @@ -31,11 +29,11 @@ module.exports = function (directory, implementation, options, run) { q.defer(server.listen); - fs.readdirSync(directory).forEach((group) => { - if (group === 'index.html' || group === 'results.html.tmpl' || group[0] === '.') + fs.readdirSync(directory).forEach(function (group) { + if (group === 'index.html' || group == 'results.html.tmpl' || group[0] === '.') return; - fs.readdirSync(path.join(directory, group)).forEach((test) => { + fs.readdirSync(path.join(directory, group)).forEach(function (test) { if (!shouldRunTest(group, test)) return; @@ -43,11 +41,11 @@ module.exports = function (directory, implementation, options, run) { !fs.lstatSync(path.join(directory, group, test, 'style.json')).isFile()) return; - const style = require(path.join(directory, group, test, 'style.json')); + var style = require(path.join(directory, group, test, 'style.json')); server.localizeURLs(style); - const params = Object.assign({ + var params = Object.assign({ group: group, test: test, width: 512, @@ -57,14 +55,14 @@ module.exports = function (directory, implementation, options, run) { }, style.metadata && style.metadata.test); if (implementation === 'native' && process.env.BUILDTYPE === 'Release' && params.group === 'debug') { - console.log(colors.gray(`* skipped ${params.group} ${params.test}`)); + console.log(colors.gray('* skipped ' + params.group + ' ' + params.test)); return; } - const skipped = params.skipped && params.skipped[implementation]; + var skipped = params.skipped && params.skipped[implementation] if (skipped) { - console.log(colors.gray(`* skipped ${params.group} ${params.test - } (${skipped})`)); + console.log(colors.gray('* skipped ' + params.group + ' ' + params.test + + ' (' + skipped + ')')); return; } @@ -78,22 +76,22 @@ module.exports = function (directory, implementation, options, run) { params.ignored = params.ignored && implementation in params.ignored; - q.defer((callback) => { - run(style, params, (err) => { + q.defer(function (callback) { + run(style, params, function(err) { if (err) return callback(err); if (params.ignored && !params.ok) { params.color = '#9E9E9E'; - console.log(colors.white(`* ignore ${params.group} ${params.test}`)); + console.log(colors.white('* ignore ' + params.group + ' ' + params.test)); } else if (params.ignored) { params.color = '#E8A408'; - console.log(colors.yellow(`* ignore ${params.group} ${params.test}`)); + console.log(colors.yellow('* ignore ' + params.group + ' ' + params.test)); } else if (!params.ok) { params.color = 'red'; - console.log(colors.red(`* failed ${params.group} ${params.test}`)); + console.log(colors.red('* failed ' + params.group + ' ' + params.test)); } else { params.color = 'green'; - console.log(colors.green(`* passed ${params.group} ${params.test}`)); + console.log(colors.green('* passed ' + params.group + ' ' + params.test)); } callback(null, params); @@ -104,26 +102,26 @@ module.exports = function (directory, implementation, options, run) { q.defer(server.close); - q.awaitAll((err, results) => { + q.awaitAll(function (err, results) { if (err) { console.error(err); - setTimeout(() => { process.exit(-1); }, 0); + setTimeout(function () { process.exit(-1); }, 0); return; } results = results.slice(1, -1); if (process.env.UPDATE) { - console.log(`Updated ${results.length} tests.`); + console.log('Updated ' + results.length + ' tests.'); process.exit(0); } - let passedCount = 0, + var passedCount = 0, ignoreCount = 0, ignorePassCount = 0, failedCount = 0; - results.forEach((params) => { + results.forEach(function (params) { if (params.ignored && !params.ok) { ignoreCount++; } else if (params.ignored) { @@ -135,7 +133,7 @@ module.exports = function (directory, implementation, options, run) { } }); - const totalCount = passedCount + ignorePassCount + ignoreCount + failedCount; + var totalCount = passedCount + ignorePassCount + ignoreCount + failedCount; if (passedCount > 0) { console.log(colors.green('%d passed (%s%)'), @@ -157,10 +155,10 @@ module.exports = function (directory, implementation, options, run) { failedCount, (100 * failedCount / totalCount).toFixed(1)); } - const template = handlebars.compile(fs.readFileSync(path.join(directory, 'results.html.tmpl'), 'utf8')); - const p = path.join(directory, 'index.html'); + var template = handlebars.compile(fs.readFileSync(path.join(directory, 'results.html.tmpl'), 'utf8')); + var p = path.join(directory, 'index.html'); fs.writeFileSync(p, template({results: results})); - console.log(`Results at: ${p}`); + console.log('Results at: ' + p); process.exit(failedCount === 0 ? 0 : 1); }); diff --git a/test/integration/lib/query.js b/test/integration/lib/query.js index 16bcb8f9948..15067a1a118 100644 --- a/test/integration/lib/query.js +++ b/test/integration/lib/query.js @@ -1,10 +1,8 @@ -'use strict'; - -const path = require('path'); -const harness = require('./harness'); -const diff = require('diff'); -const PNG = require('pngjs').PNG; -const fs = require('fs'); +var path = require('path'); +var harness = require('./harness'); +var diff = require('diff'); +var PNG = require('pngjs').PNG; +var fs = require('fs'); function deepEqual(a, b) { if (typeof a !== typeof b) @@ -14,17 +12,17 @@ function deepEqual(a, b) { if (a === null || typeof a !== 'object') return a === b; - const ka = Object.keys(a); - const kb = Object.keys(b); + var ka = Object.keys(a); + var kb = Object.keys(b); - if (ka.length !== kb.length) + if (ka.length != kb.length) return false; ka.sort(); kb.sort(); - for (let i = 0; i < ka.length; i++) - if (ka[i] !== kb[i] || !deepEqual(a[ka[i]], b[ka[i]])) + for (var i = 0; i < ka.length; i++) + if (ka[i] != kb[i] || !deepEqual(a[ka[i]], b[ka[i]])) return false; return true; @@ -42,30 +40,30 @@ function deepEqual(a, b) { * @returns {undefined} terminates the process when testing is complete */ exports.run = function (implementation, options, query) { - const directory = path.join(__dirname, '../query-tests'); - harness(directory, implementation, options, (style, params, done) => { - query(style, params, (err, data, results) => { + var directory = path.join(__dirname, '../query-tests'); + harness(directory, implementation, options, function(style, params, done) { + query(style, params, function(err, data, results) { if (err) return done(err); - const dir = path.join(directory, params.group, params.test); + var dir = path.join(directory, params.group, params.test); if (process.env.UPDATE) { fs.writeFile(path.join(dir, 'expected.json'), JSON.stringify(results, null, 2), done); return; } - const expected = require(path.join(dir, 'expected.json')); + var expected = require(path.join(dir, 'expected.json')); params.ok = deepEqual(results, expected); if (!params.ok) { - const msg = diff.diffJson(expected, results) - .map((hunk) => { + var msg = diff.diffJson(expected, results) + .map(function (hunk) { if (hunk.added) { - return `+ ${hunk.value}`; + return '+ ' + hunk.value; } else if (hunk.removed) { - return `- ${hunk.value}`; + return '- ' + hunk.value; } else { - return ` ${hunk.value}`; + return ' ' + hunk.value; } }) .join(''); @@ -74,32 +72,33 @@ exports.run = function (implementation, options, query) { console.log(msg); } - const width = params.width * params.pixelRatio; - const height = params.height * params.pixelRatio; + var width = params.width * params.pixelRatio; + var height = params.height * params.pixelRatio; + var x, y; - const color = [255, 0, 0, 255]; + var color = [255, 0, 0, 255]; function scaleByPixelRatio(x) { return x * params.pixelRatio; } if (!Array.isArray(params.queryGeometry[0])) { - const p = params.queryGeometry.map(scaleByPixelRatio); - const d = 30; + var p = params.queryGeometry.map(scaleByPixelRatio); + var d = 30; drawAxisAlignedLine([p[0] - d, p[1]], [p[0] + d, p[1]], data, width, height, color); drawAxisAlignedLine([p[0], p[1] - d], [p[0], p[1] + d], data, width, height, color); } else { - const a = params.queryGeometry[0].map(scaleByPixelRatio); - const b = params.queryGeometry[1].map(scaleByPixelRatio); + var a = params.queryGeometry[0].map(scaleByPixelRatio); + var b = params.queryGeometry[1].map(scaleByPixelRatio); drawAxisAlignedLine([a[0], a[1]], [a[0], b[1]], data, width, height, color); drawAxisAlignedLine([a[0], b[1]], [b[0], b[1]], data, width, height, color); drawAxisAlignedLine([b[0], b[1]], [b[0], a[1]], data, width, height, color); drawAxisAlignedLine([b[0], a[1]], [a[0], a[1]], data, width, height, color); } - const actual = path.join(dir, 'actual.png'); + var actual = path.join(dir, 'actual.png'); - const png = new PNG({ + var png = new PNG({ width: params.width * params.pixelRatio, height: params.height * params.pixelRatio }); @@ -108,7 +107,7 @@ exports.run = function (implementation, options, query) { png.pack() .pipe(fs.createWriteStream(actual)) - .on('finish', () => { + .on('finish', function() { params.actual = fs.readFileSync(actual).toString('base64'); done(); }); @@ -117,14 +116,14 @@ exports.run = function (implementation, options, query) { }; function drawAxisAlignedLine(a, b, pixels, width, height, color) { - const fromX = clamp(Math.min(a[0], b[0]), 0, width); - const toX = clamp(Math.max(a[0], b[0]), 0, width); - const fromY = clamp(Math.min(a[1], b[1]), 0, height); - const toY = clamp(Math.max(a[1], b[1]), 0, height); + var fromX = clamp(Math.min(a[0], b[0]), 0, width); + var toX = clamp(Math.max(a[0], b[0]), 0, width); + var fromY = clamp(Math.min(a[1], b[1]), 0, height); + var toY = clamp(Math.max(a[1], b[1]), 0, height); - let index; + var index; if (fromX === toX) { - for (let y = fromY; y <= toY; y++) { + for (var y = fromY; y <= toY; y++) { index = getIndex(fromX, y); pixels[index + 0] = color[0]; pixels[index + 1] = color[1]; @@ -132,7 +131,7 @@ function drawAxisAlignedLine(a, b, pixels, width, height, color) { pixels[index + 3] = color[3]; } } else { - for (let x = fromX; x <= toX; x++) { + for (var x = fromX; x <= toX; x++) { index = getIndex(x, fromY); pixels[index + 0] = color[0]; pixels[index + 1] = color[1]; diff --git a/test/integration/lib/render.js b/test/integration/lib/render.js index 178852f7a2c..ec12b92bbd5 100644 --- a/test/integration/lib/render.js +++ b/test/integration/lib/render.js @@ -1,27 +1,27 @@ 'use strict'; -const fs = require('fs'); -const path = require('path'); -const PNG = require('pngjs').PNG; -const harness = require('./harness'); -const pixelmatch = require('pixelmatch'); +var fs = require('fs'); +var path = require('path'); +var PNG = require('pngjs').PNG; +var harness = require('./harness'); +var pixelmatch = require('pixelmatch'); function compare(path1, path2, diffPath, callback) { - const img1 = fs.createReadStream(path1).pipe(new PNG()).on('parsed', doneReading); - const img2 = fs.createReadStream(path2).pipe(new PNG()).on('parsed', doneReading); - let read = 0; + var img1 = fs.createReadStream(path1).pipe(new PNG()).on('parsed', doneReading); + var img2 = fs.createReadStream(path2).pipe(new PNG()).on('parsed', doneReading); + var read = 0; function doneReading() { if (++read < 2) return; - const diff = new PNG({width: img1.width, height: img1.height}); + var diff = new PNG({width: img1.width, height: img1.height}); - const numPixels = pixelmatch(img1.data, img2.data, diff.data, img1.width, img1.height, { + var numPixels = pixelmatch(img1.data, img2.data, diff.data, img1.width, img1.height, { threshold: 0.13 }); - diff.pack().pipe(fs.createWriteStream(diffPath)).on('finish', () => { + diff.pack().pipe(fs.createWriteStream(diffPath)).on('finish', function () { callback(null, numPixels / (diff.width * diff.height)); }); } @@ -57,25 +57,26 @@ function compare(path1, path2, diffPath, callback) { * @returns {undefined} terminates the process when testing is complete */ exports.run = function (implementation, options, render) { - const directory = path.join(__dirname, '../render-tests'); - harness(directory, implementation, options, (style, params, done) => { - render(style, params, (err, data) => { + var directory = path.join(__dirname, '../render-tests'); + harness(directory, implementation, options, function(style, params, done) { + render(style, params, function (err, data) { if (err) return done(err); - let stats; - const dir = path.join(directory, params.group, params.test); + var stats; + var dir = path.join(directory, params.group, params.test); try { stats = fs.statSync(dir, fs.R_OK | fs.W_OK); - if (!stats.isDirectory()) throw new Error(); - } catch (e) { + if (!stats.isDirectory()) throw true; + } + catch (e) { fs.mkdirSync(dir); } - const expected = path.join(dir, 'expected.png'); - const actual = path.join(dir, 'actual.png'); - const diff = path.join(dir, 'diff.png'); + var expected = path.join(dir, 'expected.png'); + var actual = path.join(dir, 'actual.png'); + var diff = path.join(dir, 'diff.png'); - const png = new PNG({ + var png = new PNG({ width: params.width * params.pixelRatio, height: params.height * params.pixelRatio }); @@ -89,19 +90,20 @@ exports.run = function (implementation, options, render) { } else { png.pack() .pipe(fs.createWriteStream(actual)) - .on('finish', () => { + .on('finish', function () { try { stats = fs.statSync(expected, fs.R_OK | fs.W_OK); - if (!stats.isFile()) throw new Error(); - } catch (e) { // no expected.png, create it + if (!stats.isFile()) throw true; + } + catch (e) { // no expected.png, create it png.pack() .pipe(fs.createWriteStream(expected)) .on('finish', done); return; } - compare(actual, expected, diff, (err, difference) => { + compare(actual, expected, diff, function (err, difference) { if (err) return done(err); params.difference = difference; diff --git a/test/integration/lib/server.js b/test/integration/lib/server.js index 847f977f42a..888fcb2c2c4 100644 --- a/test/integration/lib/server.js +++ b/test/integration/lib/server.js @@ -1,11 +1,11 @@ 'use strict'; -const st = require('st'); -const http = require('http'); -const path = require('path'); +var st = require('st'); +var http = require('http'); +var path = require('path'); module.exports = function () { - const server = http.createServer(st({path: path.join(__dirname, '..')})); + var server = http.createServer(st({path: path.join(__dirname, '..')})); function localURL(url) { return url.replace(/^local:\/\//, 'http://localhost:2900/'); @@ -17,12 +17,12 @@ module.exports = function () { }, close: function (callback) { - server.close(callback); + server.close(callback) }, localizeURLs: function (style) { function localizeSourceURLs(source) { - for (const l in source.tiles) { + for (var l in source.tiles) { source.tiles[l] = localURL(source.tiles[l]); } @@ -41,7 +41,7 @@ module.exports = function () { // localize the source, glyphs, and sprite URLs in the given style JSON function localizeStyleURLs (style) { - for (const k in style.sources) { + for (var k in style.sources) { localizeSourceURLs(style.sources[k]); } @@ -55,16 +55,16 @@ module.exports = function () { } if (style.metadata && style.metadata.test && style.metadata.test.operations) { - style.metadata.test.operations.forEach((op) => { + style.metadata.test.operations.forEach(function (op) { if (op[0] === 'addSource') { localizeSourceURLs(op[2]); } else if (op[0] === 'setStyle' && op[1]) { - localizeStyleURLs(op[1]); + localizeStyleURLs(op[1]) } }); } - localizeStyleURLs(style); + localizeStyleURLs(style) } }; }; diff --git a/test/integration/render-tests/fill-extrusion-base/zoom-and-property-function/style.json b/test/integration/render-tests/fill-extrusion-base/zoom-and-property-function/style.json index 6a6a9277679..8e0b0c3e14a 100644 --- a/test/integration/render-tests/fill-extrusion-base/zoom-and-property-function/style.json +++ b/test/integration/render-tests/fill-extrusion-base/zoom-and-property-function/style.json @@ -163,11 +163,11 @@ "value": 0 }, 0], [{ - "zoom": 18.5, + "zoom": 17, "value": 0 }, 0], [{ - "zoom": 17, + "zoom": 18.5, "value": 0 }, 0], [{ diff --git a/test/integration/render-tests/regressions/mapbox-gl-js#3723/expected.png b/test/integration/render-tests/regressions/mapbox-gl-js#3723/expected.png new file mode 100644 index 00000000000..fc7b137712a Binary files /dev/null and b/test/integration/render-tests/regressions/mapbox-gl-js#3723/expected.png differ diff --git a/test/integration/render-tests/regressions/mapbox-gl-js#3723/style.json b/test/integration/render-tests/regressions/mapbox-gl-js#3723/style.json new file mode 100644 index 00000000000..5481ce5592e --- /dev/null +++ b/test/integration/render-tests/regressions/mapbox-gl-js#3723/style.json @@ -0,0 +1,29 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "sources": { + "raster": { + "type": "raster", + "tiles": [ + "local://tiles/alpha.png" + ], + "tileSize": 256 + } + }, + "layers": [ + { + "id": "raster", + "type": "raster", + "source": "raster", + "paint": { + "raster-fade-duration": 0, + "raster-brightness-min": 0.5 + } + } + ] +} \ No newline at end of file diff --git a/test/integration/render-tests/regressions/mapbox-gl-js#3819/expected.png b/test/integration/render-tests/regressions/mapbox-gl-js#3819/expected.png new file mode 100644 index 00000000000..3a2d7006298 Binary files /dev/null and b/test/integration/render-tests/regressions/mapbox-gl-js#3819/expected.png differ diff --git a/test/integration/render-tests/regressions/mapbox-gl-js#3819/style.json b/test/integration/render-tests/regressions/mapbox-gl-js#3819/style.json new file mode 100644 index 00000000000..14adeb2c265 --- /dev/null +++ b/test/integration/render-tests/regressions/mapbox-gl-js#3819/style.json @@ -0,0 +1,41 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64 + } + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [] + } + } + }, + "layers": [ + { + "id": "red", + "type": "background", + "paint": { + "background-color": "rgb(255, 0, 0)", + "background-opacity": 1 + } + }, + { + "id": "green", + "type": "background", + "paint": { + "background-color": "rgb(0, 255, 0)", + "background-opacity": 0 + } + }, + { + "id": "other", + "type": "circle", + "source": "geojson" + } + ] +} \ No newline at end of file diff --git a/test/integration/render-tests/regressions/mapbox-gl-js#3903/expected.png b/test/integration/render-tests/regressions/mapbox-gl-js#3903/expected.png new file mode 100644 index 00000000000..7b8ae763ee7 Binary files /dev/null and b/test/integration/render-tests/regressions/mapbox-gl-js#3903/expected.png differ diff --git a/test/integration/render-tests/regressions/mapbox-gl-js#3903/style.json b/test/integration/render-tests/regressions/mapbox-gl-js#3903/style.json new file mode 100644 index 00000000000..57acc74aeb2 --- /dev/null +++ b/test/integration/render-tests/regressions/mapbox-gl-js#3903/style.json @@ -0,0 +1,32 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 1, + "height": 1, + "operations": [ + [ + "removeLayer", + "background" + ], + [ + "addLayer", + { + "id": "background", + "type": "background" + } + ], + [ + "wait" + ] + ] + } + }, + "sources": {}, + "layers": [ + { + "id": "background", + "type": "background" + } + ] +} \ No newline at end of file diff --git a/test/integration/render-tests/regressions/mapbox-gl-native#7572/expected.png b/test/integration/render-tests/regressions/mapbox-gl-native#7572/expected.png new file mode 100644 index 00000000000..766127938f7 Binary files /dev/null and b/test/integration/render-tests/regressions/mapbox-gl-native#7572/expected.png differ diff --git a/test/integration/render-tests/regressions/mapbox-gl-native#7572/style.json b/test/integration/render-tests/regressions/mapbox-gl-native#7572/style.json new file mode 100644 index 00000000000..86e5cc3e7e4 --- /dev/null +++ b/test/integration/render-tests/regressions/mapbox-gl-native#7572/style.json @@ -0,0 +1,50 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "operations": [ + [ + "setLayoutProperty", + "b", + "icon-offset", + [0, 10] + ], + [ + "wait" + ] + ] + } + }, + "transition": { + "duration": 0 + }, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Point", + "coordinates": [0, 0] + } + } + }, + "sprite": "local://sprites/emerald", + "layers": [ + { + "id": "a", + "type": "symbol", + "source": "geojson", + "layout": { + "icon-image": "generic_icon", + "icon-allow-overlap": true, + "icon-ignore-placement": true, + "icon-offset": [0, 0] + } + }, + { + "id": "b", + "ref": "a" + } + ] +} diff --git a/test/integration/render-tests/runtime-styling/image-add/expected.png b/test/integration/render-tests/runtime-styling/image-add/expected.png new file mode 100644 index 00000000000..a88d85daa6f Binary files /dev/null and b/test/integration/render-tests/runtime-styling/image-add/expected.png differ diff --git a/test/integration/render-tests/runtime-styling/image-add/style.json b/test/integration/render-tests/runtime-styling/image-add/style.json new file mode 100644 index 00000000000..1d27c4efcf1 --- /dev/null +++ b/test/integration/render-tests/runtime-styling/image-add/style.json @@ -0,0 +1,42 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "ignored": { + "js": "https://github.com/mapbox/mapbox-gl-js/issues/2059" + }, + "operations": [ + [ + "addImage", + "marker", + "./image/marker.png" + ], + [ + "addLayer", + { + "id": "geometry", + "type": "symbol", + "source": "geometry", + "layout": { + "icon-image": "marker" + } + } + ], + [ + "wait" + ] + ] + } + }, + "sources": { + "geometry": { + "type": "geojson", + "data": { + "type": "Point", + "coordinates": [0, 0] + } + } + } +} diff --git a/test/integration/render-tests/symbol-geometry/multipoint/style.json b/test/integration/render-tests/symbol-geometry/multipoint/style.json index a63a2f3bbda..f484f1255a4 100644 --- a/test/integration/render-tests/symbol-geometry/multipoint/style.json +++ b/test/integration/render-tests/symbol-geometry/multipoint/style.json @@ -4,10 +4,7 @@ "glyphs": "local://glyphs/{fontstack}/{range}.pbf", "metadata": { "test": { - "height": 256, - "ignored": { - "native": "https://github.com/mapbox/mapbox-gl-native/issues/7416" - } + "height": 256 } }, "center": [0, 0], diff --git a/test/integration/render-tests/symbol-geometry/multipolygon/style.json b/test/integration/render-tests/symbol-geometry/multipolygon/style.json index c3f8960640b..0e3b29c6d20 100644 --- a/test/integration/render-tests/symbol-geometry/multipolygon/style.json +++ b/test/integration/render-tests/symbol-geometry/multipolygon/style.json @@ -4,10 +4,7 @@ "glyphs": "local://glyphs/{fontstack}/{range}.pbf", "metadata": { "test": { - "height": 256, - "ignored": { - "native": "https://github.com/mapbox/mapbox-gl-native/issues/6115" - } + "height": 256 } }, "center": [0, 0], diff --git a/test/integration/render-tests/symbol-geometry/polygon/style.json b/test/integration/render-tests/symbol-geometry/polygon/style.json index 0199c37c940..593a2bb881d 100644 --- a/test/integration/render-tests/symbol-geometry/polygon/style.json +++ b/test/integration/render-tests/symbol-geometry/polygon/style.json @@ -4,10 +4,7 @@ "glyphs": "local://glyphs/{fontstack}/{range}.pbf", "metadata": { "test": { - "height": 256, - "ignored": { - "native": "https://github.com/mapbox/mapbox-gl-native/issues/6115" - } + "height": 256 } }, "center": [0, 0], diff --git a/test/integration/render-tests/symbol-placement/point-polygon/style.json b/test/integration/render-tests/symbol-placement/point-polygon/style.json index 27b5be21743..8e70f0f1909 100644 --- a/test/integration/render-tests/symbol-placement/point-polygon/style.json +++ b/test/integration/render-tests/symbol-placement/point-polygon/style.json @@ -2,9 +2,6 @@ "version": 8, "metadata": { "test": { - "ignored": { - "native": "https://github.com/mapbox/mapbox-gl-native/issues/6115" - }, "height": 256 } }, diff --git a/test/integration/render-tests/text-arabic/line-break-mixed/expected.png b/test/integration/render-tests/text-arabic/line-break-mixed/expected.png index 37d59829aee..5ab9493826f 100644 Binary files a/test/integration/render-tests/text-arabic/line-break-mixed/expected.png and b/test/integration/render-tests/text-arabic/line-break-mixed/expected.png differ diff --git a/test/integration/render-tests/text-arabic/line-break/expected.png b/test/integration/render-tests/text-arabic/line-break/expected.png index 2fb67ab7dc3..e7a66418d70 100644 Binary files a/test/integration/render-tests/text-arabic/line-break/expected.png and b/test/integration/render-tests/text-arabic/line-break/expected.png differ diff --git a/test/integration/render-tests/text-arabic/multi-paragraph/expected.png b/test/integration/render-tests/text-arabic/multi-paragraph/expected.png index 8baf6d41814..4b613557d95 100644 Binary files a/test/integration/render-tests/text-arabic/multi-paragraph/expected.png and b/test/integration/render-tests/text-arabic/multi-paragraph/expected.png differ diff --git a/test/integration/render-tests/text-max-width/force-double-newline/style.json b/test/integration/render-tests/text-max-width/force-double-newline/style.json index 32e58212894..6ec69c8ee15 100644 --- a/test/integration/render-tests/text-max-width/force-double-newline/style.json +++ b/test/integration/render-tests/text-max-width/force-double-newline/style.json @@ -2,9 +2,6 @@ "version": 8, "metadata": { "test": { - "ignored": { - "native": "https://github.com/mapbox/mapbox-gl-native/issues/7253" - }, "height": 256 } }, diff --git a/test/integration/render-tests/text-max-width/force-newline/style.json b/test/integration/render-tests/text-max-width/force-newline/style.json index af91a88f17b..3d04fb8c38e 100644 --- a/test/integration/render-tests/text-max-width/force-newline/style.json +++ b/test/integration/render-tests/text-max-width/force-newline/style.json @@ -2,9 +2,6 @@ "version": 8, "metadata": { "test": { - "ignored": { - "native": "https://github.com/mapbox/mapbox-gl-native/issues/7253" - }, "height": 256 } }, diff --git a/test/integration/render-tests/text-max-width/ideographic-breaking/style.json b/test/integration/render-tests/text-max-width/ideographic-breaking/style.json index 17e9ea8029c..e412c016f14 100644 --- a/test/integration/render-tests/text-max-width/ideographic-breaking/style.json +++ b/test/integration/render-tests/text-max-width/ideographic-breaking/style.json @@ -2,9 +2,6 @@ "version": 8, "metadata": { "test": { - "ignored": { - "native": "https://github.com/mapbox/mapbox-gl-native/issues/7253" - }, "height": 512 } }, diff --git a/test/integration/render-tests/text-max-width/ideographic-punctuation-breaking/expected.png b/test/integration/render-tests/text-max-width/ideographic-punctuation-breaking/expected.png index cc87e6e6341..52d6fe46a65 100644 Binary files a/test/integration/render-tests/text-max-width/ideographic-punctuation-breaking/expected.png and b/test/integration/render-tests/text-max-width/ideographic-punctuation-breaking/expected.png differ diff --git a/test/integration/render-tests/text-max-width/ideographic-punctuation-breaking/style.json b/test/integration/render-tests/text-max-width/ideographic-punctuation-breaking/style.json index 88085933b52..156f657605a 100644 --- a/test/integration/render-tests/text-max-width/ideographic-punctuation-breaking/style.json +++ b/test/integration/render-tests/text-max-width/ideographic-punctuation-breaking/style.json @@ -2,9 +2,6 @@ "version": 8, "metadata": { "test": { - "ignored": { - "native": "https://github.com/mapbox/mapbox-gl-native/issues/7253" - }, "height": 512 } }, @@ -30,7 +27,7 @@ { "type": "Feature", "properties": { - "name": "技指計代式灣文人觀觀人之之" + "name": "黄岩岛\n(民主礁)" }, "geometry": { "type": "Point", diff --git a/test/integration/render-tests/text-max-width/literal/expected.png b/test/integration/render-tests/text-max-width/literal/expected.png index 8abc5bbc208..8a1250b3ec5 100644 Binary files a/test/integration/render-tests/text-max-width/literal/expected.png and b/test/integration/render-tests/text-max-width/literal/expected.png differ diff --git a/test/integration/tiles/upgrade.js b/test/integration/tiles/upgrade.js index b9a43a5661e..9e0fad87cbd 100644 --- a/test/integration/tiles/upgrade.js +++ b/test/integration/tiles/upgrade.js @@ -1,32 +1,30 @@ -'use strict'; - -const mapnik = require('mapnik'); -const fs = require('fs'); -const queue = require('d3-queue').queue; +var mapnik = require('mapnik'); +var fs = require('fs'); +var queue = require('d3-queue').queue; function upgrade(z, x, y, path, callback) { console.log('Updating ', path); - const buffer = fs.readFileSync(path); - const vt = new mapnik.VectorTile(z, x, y); - vt.addData(buffer, {upgrade: true, validate: true}, (err) => { + var buffer = fs.readFileSync(path); + var vt = new mapnik.VectorTile(z, x, y); + vt.addData(buffer, {upgrade: true, validate: true}, function(err) { if (err) throw err; fs.writeFileSync(path, vt.getDataSync()); callback(); - }); + }); } function createExtent1024(callback) { console.log('Creating extent1024'); - const buffer = fs.readFileSync('14-8802-5374.mvt'); - const vt = new mapnik.VectorTile(14, 8802, 5374, { tileSize: 1024 }); - vt.addData(buffer, {validate: true}, (err) => { + var buffer = fs.readFileSync('14-8802-5374.mvt'); + var vt = new mapnik.VectorTile(14, 8802, 5374, { tileSize: 1024 }); + vt.addData(buffer, {validate: true}, function(err) { if (err) throw err; fs.writeFileSync('extent1024-14-8802-5374.mvt', vt.getDataSync()); callback(); }); } -const q = queue(1); +var q = queue(1); q.defer(upgrade, 0, 0, 0, '0-0-0.mvt'); q.defer(upgrade, 14, 8802, 5374, '14-8802-5374.mvt'); @@ -40,7 +38,7 @@ q.defer(upgrade, 2, 2, 2, '2-2-2.mvt'); q.defer(upgrade, 7, 37, 48, 'counties-7-37-48.mvt'); q.defer(createExtent1024); -q.await((err) => { +q.await(function (err) { if (err) throw err; console.log('Done.'); });