From 69c8f602de9ab087dd841dfabf33a72d46672673 Mon Sep 17 00:00:00 2001 From: "Thiago Marcos P. Santos" Date: Tue, 24 Jan 2017 14:39:08 +0200 Subject: [tests] Add unit test for tile prefetching --- test/fixtures/map/prefetch/empty.json | 5 +++++ test/fixtures/map/prefetch/expected.png | Bin 0 -> 2198 bytes test/fixtures/map/prefetch/style.json | 24 ++++++++++++++++++++++++ test/fixtures/map/prefetch/tile_green.png | Bin 0 -> 659 bytes test/fixtures/map/prefetch/tile_red.png | Bin 0 -> 659 bytes 5 files changed, 29 insertions(+) create mode 100644 test/fixtures/map/prefetch/empty.json create mode 100644 test/fixtures/map/prefetch/expected.png create mode 100644 test/fixtures/map/prefetch/style.json create mode 100644 test/fixtures/map/prefetch/tile_green.png create mode 100644 test/fixtures/map/prefetch/tile_red.png (limited to 'test/fixtures') diff --git a/test/fixtures/map/prefetch/empty.json b/test/fixtures/map/prefetch/empty.json new file mode 100644 index 0000000000..61a8fadcdb --- /dev/null +++ b/test/fixtures/map/prefetch/empty.json @@ -0,0 +1,5 @@ +{ + "version": 8, + "sources": {}, + "layers": [] +} diff --git a/test/fixtures/map/prefetch/expected.png b/test/fixtures/map/prefetch/expected.png new file mode 100644 index 0000000000..e1111b37f7 Binary files /dev/null and b/test/fixtures/map/prefetch/expected.png differ diff --git a/test/fixtures/map/prefetch/style.json b/test/fixtures/map/prefetch/style.json new file mode 100644 index 0000000000..b4e163888c --- /dev/null +++ b/test/fixtures/map/prefetch/style.json @@ -0,0 +1,24 @@ +{ + "version": 8, + "name": "Test", + "sources": { + "raster": { + "type": "raster", + "tiles": [ "{z}" ], + "tileSize": 256, + "maxzoom": 20, + "minzoom": 0 + } + }, + "layers": [{ + "id": "background", + "type": "background", + "paint": { + "background-color": "blue" + } + }, { + "id": "raster", + "type": "raster", + "source": "raster" + }] +} diff --git a/test/fixtures/map/prefetch/tile_green.png b/test/fixtures/map/prefetch/tile_green.png new file mode 100644 index 0000000000..553cd10cd1 Binary files /dev/null and b/test/fixtures/map/prefetch/tile_green.png differ diff --git a/test/fixtures/map/prefetch/tile_red.png b/test/fixtures/map/prefetch/tile_red.png new file mode 100644 index 0000000000..5fa561fb92 Binary files /dev/null and b/test/fixtures/map/prefetch/tile_red.png differ -- cgit v1.2.1