diff --git a/tests/__snapshots__/elementhandle-screenshot/path-option-should-create-subdirectories/chromium/screenshot-element-bounding-box.png b/tests/__snapshots__/page/elementhandle-screenshot/path-option-should-create-subdirectories/chromium/screenshot-element-bounding-box.png similarity index 100% rename from tests/__snapshots__/elementhandle-screenshot/path-option-should-create-subdirectories/chromium/screenshot-element-bounding-box.png rename to tests/__snapshots__/page/elementhandle-screenshot/path-option-should-create-subdirectories/chromium/screenshot-element-bounding-box.png diff --git a/tests/__snapshots__/elementhandle-screenshot/path-option-should-create-subdirectories/firefox/screenshot-element-bounding-box.png b/tests/__snapshots__/page/elementhandle-screenshot/path-option-should-create-subdirectories/firefox/screenshot-element-bounding-box.png similarity index 100% rename from tests/__snapshots__/elementhandle-screenshot/path-option-should-create-subdirectories/firefox/screenshot-element-bounding-box.png rename to tests/__snapshots__/page/elementhandle-screenshot/path-option-should-create-subdirectories/firefox/screenshot-element-bounding-box.png diff --git a/tests/__snapshots__/elementhandle-screenshot/path-option-should-create-subdirectories/webkit/screenshot-element-bounding-box.png b/tests/__snapshots__/page/elementhandle-screenshot/path-option-should-create-subdirectories/webkit/screenshot-element-bounding-box.png similarity index 100% rename from tests/__snapshots__/elementhandle-screenshot/path-option-should-create-subdirectories/webkit/screenshot-element-bounding-box.png rename to tests/__snapshots__/page/elementhandle-screenshot/path-option-should-create-subdirectories/webkit/screenshot-element-bounding-box.png diff --git a/tests/__snapshots__/elementhandle-screenshot/should-capture-full-element-when-larger-than-viewport-in-parallel/chromium/screenshot-element-larger-than-viewport.png b/tests/__snapshots__/page/elementhandle-screenshot/should-capture-full-element-when-larger-than-viewport-in-parallel/chromium/screenshot-element-larger-than-viewport.png similarity index 100% rename from tests/__snapshots__/elementhandle-screenshot/should-capture-full-element-when-larger-than-viewport-in-parallel/chromium/screenshot-element-larger-than-viewport.png rename to tests/__snapshots__/page/elementhandle-screenshot/should-capture-full-element-when-larger-than-viewport-in-parallel/chromium/screenshot-element-larger-than-viewport.png diff --git a/tests/__snapshots__/elementhandle-screenshot/should-capture-full-element-when-larger-than-viewport-in-parallel/firefox/screenshot-element-larger-than-viewport.png b/tests/__snapshots__/page/elementhandle-screenshot/should-capture-full-element-when-larger-than-viewport-in-parallel/firefox/screenshot-element-larger-than-viewport.png similarity index 100% rename from tests/__snapshots__/elementhandle-screenshot/should-capture-full-element-when-larger-than-viewport-in-parallel/firefox/screenshot-element-larger-than-viewport.png rename to tests/__snapshots__/page/elementhandle-screenshot/should-capture-full-element-when-larger-than-viewport-in-parallel/firefox/screenshot-element-larger-than-viewport.png diff --git a/tests/__snapshots__/elementhandle-screenshot/should-capture-full-element-when-larger-than-viewport-in-parallel/webkit/screenshot-element-larger-than-viewport.png b/tests/__snapshots__/page/elementhandle-screenshot/should-capture-full-element-when-larger-than-viewport-in-parallel/webkit/screenshot-element-larger-than-viewport.png similarity index 100% rename from tests/__snapshots__/elementhandle-screenshot/should-capture-full-element-when-larger-than-viewport-in-parallel/webkit/screenshot-element-larger-than-viewport.png rename to tests/__snapshots__/page/elementhandle-screenshot/should-capture-full-element-when-larger-than-viewport-in-parallel/webkit/screenshot-element-larger-than-viewport.png diff --git a/tests/__snapshots__/elementhandle-screenshot/should-capture-full-element-when-larger-than-viewport/chromium/screenshot-element-larger-than-viewport.png b/tests/__snapshots__/page/elementhandle-screenshot/should-capture-full-element-when-larger-than-viewport/chromium/screenshot-element-larger-than-viewport.png similarity index 100% rename from tests/__snapshots__/elementhandle-screenshot/should-capture-full-element-when-larger-than-viewport/chromium/screenshot-element-larger-than-viewport.png rename to tests/__snapshots__/page/elementhandle-screenshot/should-capture-full-element-when-larger-than-viewport/chromium/screenshot-element-larger-than-viewport.png diff --git a/tests/__snapshots__/elementhandle-screenshot/should-capture-full-element-when-larger-than-viewport/firefox/screenshot-element-larger-than-viewport.png b/tests/__snapshots__/page/elementhandle-screenshot/should-capture-full-element-when-larger-than-viewport/firefox/screenshot-element-larger-than-viewport.png similarity index 100% rename from tests/__snapshots__/elementhandle-screenshot/should-capture-full-element-when-larger-than-viewport/firefox/screenshot-element-larger-than-viewport.png rename to tests/__snapshots__/page/elementhandle-screenshot/should-capture-full-element-when-larger-than-viewport/firefox/screenshot-element-larger-than-viewport.png diff --git a/tests/__snapshots__/elementhandle-screenshot/should-capture-full-element-when-larger-than-viewport/webkit/screenshot-element-larger-than-viewport.png b/tests/__snapshots__/page/elementhandle-screenshot/should-capture-full-element-when-larger-than-viewport/webkit/screenshot-element-larger-than-viewport.png similarity index 100% rename from tests/__snapshots__/elementhandle-screenshot/should-capture-full-element-when-larger-than-viewport/webkit/screenshot-element-larger-than-viewport.png rename to tests/__snapshots__/page/elementhandle-screenshot/should-capture-full-element-when-larger-than-viewport/webkit/screenshot-element-larger-than-viewport.png diff --git a/tests/__snapshots__/elementhandle-screenshot/should-scroll-15000px-into-view/chromium/screenshot-element-scrolled-into-view.png b/tests/__snapshots__/page/elementhandle-screenshot/should-scroll-15000px-into-view/chromium/screenshot-element-scrolled-into-view.png similarity index 100% rename from tests/__snapshots__/elementhandle-screenshot/should-scroll-15000px-into-view/chromium/screenshot-element-scrolled-into-view.png rename to tests/__snapshots__/page/elementhandle-screenshot/should-scroll-15000px-into-view/chromium/screenshot-element-scrolled-into-view.png diff --git a/tests/__snapshots__/elementhandle-screenshot/should-scroll-15000px-into-view/firefox/screenshot-element-scrolled-into-view.png b/tests/__snapshots__/page/elementhandle-screenshot/should-scroll-15000px-into-view/firefox/screenshot-element-scrolled-into-view.png similarity index 100% rename from tests/__snapshots__/elementhandle-screenshot/should-scroll-15000px-into-view/firefox/screenshot-element-scrolled-into-view.png rename to tests/__snapshots__/page/elementhandle-screenshot/should-scroll-15000px-into-view/firefox/screenshot-element-scrolled-into-view.png diff --git a/tests/__snapshots__/elementhandle-screenshot/should-scroll-15000px-into-view/webkit/screenshot-element-scrolled-into-view.png b/tests/__snapshots__/page/elementhandle-screenshot/should-scroll-15000px-into-view/webkit/screenshot-element-scrolled-into-view.png similarity index 100% rename from tests/__snapshots__/elementhandle-screenshot/should-scroll-15000px-into-view/webkit/screenshot-element-scrolled-into-view.png rename to tests/__snapshots__/page/elementhandle-screenshot/should-scroll-15000px-into-view/webkit/screenshot-element-scrolled-into-view.png diff --git a/tests/__snapshots__/elementhandle-screenshot/should-scroll-element-into-view/chromium/screenshot-element-scrolled-into-view.png b/tests/__snapshots__/page/elementhandle-screenshot/should-scroll-element-into-view/chromium/screenshot-element-scrolled-into-view.png similarity index 100% rename from tests/__snapshots__/elementhandle-screenshot/should-scroll-element-into-view/chromium/screenshot-element-scrolled-into-view.png rename to tests/__snapshots__/page/elementhandle-screenshot/should-scroll-element-into-view/chromium/screenshot-element-scrolled-into-view.png diff --git a/tests/__snapshots__/elementhandle-screenshot/should-scroll-element-into-view/firefox/screenshot-element-scrolled-into-view.png b/tests/__snapshots__/page/elementhandle-screenshot/should-scroll-element-into-view/firefox/screenshot-element-scrolled-into-view.png similarity index 100% rename from tests/__snapshots__/elementhandle-screenshot/should-scroll-element-into-view/firefox/screenshot-element-scrolled-into-view.png rename to tests/__snapshots__/page/elementhandle-screenshot/should-scroll-element-into-view/firefox/screenshot-element-scrolled-into-view.png diff --git a/tests/__snapshots__/elementhandle-screenshot/should-scroll-element-into-view/webkit/screenshot-element-scrolled-into-view.png b/tests/__snapshots__/page/elementhandle-screenshot/should-scroll-element-into-view/webkit/screenshot-element-scrolled-into-view.png similarity index 100% rename from tests/__snapshots__/elementhandle-screenshot/should-scroll-element-into-view/webkit/screenshot-element-scrolled-into-view.png rename to tests/__snapshots__/page/elementhandle-screenshot/should-scroll-element-into-view/webkit/screenshot-element-scrolled-into-view.png diff --git a/tests/__snapshots__/elementhandle-screenshot/should-take-into-account-padding-and-border/chromium/screenshot-element-padding-border.png b/tests/__snapshots__/page/elementhandle-screenshot/should-take-into-account-padding-and-border/chromium/screenshot-element-padding-border.png similarity index 100% rename from tests/__snapshots__/elementhandle-screenshot/should-take-into-account-padding-and-border/chromium/screenshot-element-padding-border.png rename to tests/__snapshots__/page/elementhandle-screenshot/should-take-into-account-padding-and-border/chromium/screenshot-element-padding-border.png diff --git a/tests/__snapshots__/elementhandle-screenshot/should-take-into-account-padding-and-border/firefox/screenshot-element-padding-border.png b/tests/__snapshots__/page/elementhandle-screenshot/should-take-into-account-padding-and-border/firefox/screenshot-element-padding-border.png similarity index 100% rename from tests/__snapshots__/elementhandle-screenshot/should-take-into-account-padding-and-border/firefox/screenshot-element-padding-border.png rename to tests/__snapshots__/page/elementhandle-screenshot/should-take-into-account-padding-and-border/firefox/screenshot-element-padding-border.png diff --git a/tests/__snapshots__/elementhandle-screenshot/should-take-into-account-padding-and-border/webkit/screenshot-element-padding-border.png b/tests/__snapshots__/page/elementhandle-screenshot/should-take-into-account-padding-and-border/webkit/screenshot-element-padding-border.png similarity index 100% rename from tests/__snapshots__/elementhandle-screenshot/should-take-into-account-padding-and-border/webkit/screenshot-element-padding-border.png rename to tests/__snapshots__/page/elementhandle-screenshot/should-take-into-account-padding-and-border/webkit/screenshot-element-padding-border.png diff --git a/tests/__snapshots__/elementhandle-screenshot/should-wait-for-element-to-stop-moving/chromium/screenshot-element-bounding-box.png b/tests/__snapshots__/page/elementhandle-screenshot/should-wait-for-element-to-stop-moving/chromium/screenshot-element-bounding-box.png similarity index 100% rename from tests/__snapshots__/elementhandle-screenshot/should-wait-for-element-to-stop-moving/chromium/screenshot-element-bounding-box.png rename to tests/__snapshots__/page/elementhandle-screenshot/should-wait-for-element-to-stop-moving/chromium/screenshot-element-bounding-box.png diff --git a/tests/__snapshots__/elementhandle-screenshot/should-wait-for-element-to-stop-moving/firefox/screenshot-element-bounding-box.png b/tests/__snapshots__/page/elementhandle-screenshot/should-wait-for-element-to-stop-moving/firefox/screenshot-element-bounding-box.png similarity index 100% rename from tests/__snapshots__/elementhandle-screenshot/should-wait-for-element-to-stop-moving/firefox/screenshot-element-bounding-box.png rename to tests/__snapshots__/page/elementhandle-screenshot/should-wait-for-element-to-stop-moving/firefox/screenshot-element-bounding-box.png diff --git a/tests/__snapshots__/elementhandle-screenshot/should-wait-for-element-to-stop-moving/webkit/screenshot-element-bounding-box.png b/tests/__snapshots__/page/elementhandle-screenshot/should-wait-for-element-to-stop-moving/webkit/screenshot-element-bounding-box.png similarity index 100% rename from tests/__snapshots__/elementhandle-screenshot/should-wait-for-element-to-stop-moving/webkit/screenshot-element-bounding-box.png rename to tests/__snapshots__/page/elementhandle-screenshot/should-wait-for-element-to-stop-moving/webkit/screenshot-element-bounding-box.png diff --git a/tests/__snapshots__/elementhandle-screenshot/should-wait-for-visible/chromium/screenshot-element-bounding-box.png b/tests/__snapshots__/page/elementhandle-screenshot/should-wait-for-visible/chromium/screenshot-element-bounding-box.png similarity index 100% rename from tests/__snapshots__/elementhandle-screenshot/should-wait-for-visible/chromium/screenshot-element-bounding-box.png rename to tests/__snapshots__/page/elementhandle-screenshot/should-wait-for-visible/chromium/screenshot-element-bounding-box.png diff --git a/tests/__snapshots__/elementhandle-screenshot/should-wait-for-visible/firefox/screenshot-element-bounding-box.png b/tests/__snapshots__/page/elementhandle-screenshot/should-wait-for-visible/firefox/screenshot-element-bounding-box.png similarity index 100% rename from tests/__snapshots__/elementhandle-screenshot/should-wait-for-visible/firefox/screenshot-element-bounding-box.png rename to tests/__snapshots__/page/elementhandle-screenshot/should-wait-for-visible/firefox/screenshot-element-bounding-box.png diff --git a/tests/__snapshots__/elementhandle-screenshot/should-wait-for-visible/webkit/screenshot-element-bounding-box.png b/tests/__snapshots__/page/elementhandle-screenshot/should-wait-for-visible/webkit/screenshot-element-bounding-box.png similarity index 100% rename from tests/__snapshots__/elementhandle-screenshot/should-wait-for-visible/webkit/screenshot-element-bounding-box.png rename to tests/__snapshots__/page/elementhandle-screenshot/should-wait-for-visible/webkit/screenshot-element-bounding-box.png diff --git a/tests/__snapshots__/elementhandle-screenshot/should-work-for-an-element-with-an-offset/chromium/screenshot-element-fractional-offset.png b/tests/__snapshots__/page/elementhandle-screenshot/should-work-for-an-element-with-an-offset/chromium/screenshot-element-fractional-offset.png similarity index 100% rename from tests/__snapshots__/elementhandle-screenshot/should-work-for-an-element-with-an-offset/chromium/screenshot-element-fractional-offset.png rename to tests/__snapshots__/page/elementhandle-screenshot/should-work-for-an-element-with-an-offset/chromium/screenshot-element-fractional-offset.png diff --git a/tests/__snapshots__/elementhandle-screenshot/should-work-for-an-element-with-an-offset/firefox/screenshot-element-fractional-offset.png b/tests/__snapshots__/page/elementhandle-screenshot/should-work-for-an-element-with-an-offset/firefox/screenshot-element-fractional-offset.png similarity index 100% rename from tests/__snapshots__/elementhandle-screenshot/should-work-for-an-element-with-an-offset/firefox/screenshot-element-fractional-offset.png rename to tests/__snapshots__/page/elementhandle-screenshot/should-work-for-an-element-with-an-offset/firefox/screenshot-element-fractional-offset.png diff --git a/tests/__snapshots__/elementhandle-screenshot/should-work-for-an-element-with-an-offset/webkit/screenshot-element-fractional-offset.png b/tests/__snapshots__/page/elementhandle-screenshot/should-work-for-an-element-with-an-offset/webkit/screenshot-element-fractional-offset.png similarity index 100% rename from tests/__snapshots__/elementhandle-screenshot/should-work-for-an-element-with-an-offset/webkit/screenshot-element-fractional-offset.png rename to tests/__snapshots__/page/elementhandle-screenshot/should-work-for-an-element-with-an-offset/webkit/screenshot-element-fractional-offset.png diff --git a/tests/__snapshots__/elementhandle-screenshot/should-work-for-an-element-with-fractional-dimensions/chromium/screenshot-element-fractional.png b/tests/__snapshots__/page/elementhandle-screenshot/should-work-for-an-element-with-fractional-dimensions/chromium/screenshot-element-fractional.png similarity index 100% rename from tests/__snapshots__/elementhandle-screenshot/should-work-for-an-element-with-fractional-dimensions/chromium/screenshot-element-fractional.png rename to tests/__snapshots__/page/elementhandle-screenshot/should-work-for-an-element-with-fractional-dimensions/chromium/screenshot-element-fractional.png diff --git a/tests/__snapshots__/elementhandle-screenshot/should-work-for-an-element-with-fractional-dimensions/firefox/screenshot-element-fractional.png b/tests/__snapshots__/page/elementhandle-screenshot/should-work-for-an-element-with-fractional-dimensions/firefox/screenshot-element-fractional.png similarity index 100% rename from tests/__snapshots__/elementhandle-screenshot/should-work-for-an-element-with-fractional-dimensions/firefox/screenshot-element-fractional.png rename to tests/__snapshots__/page/elementhandle-screenshot/should-work-for-an-element-with-fractional-dimensions/firefox/screenshot-element-fractional.png diff --git a/tests/__snapshots__/elementhandle-screenshot/should-work-for-an-element-with-fractional-dimensions/webkit/screenshot-element-fractional.png b/tests/__snapshots__/page/elementhandle-screenshot/should-work-for-an-element-with-fractional-dimensions/webkit/screenshot-element-fractional.png similarity index 100% rename from tests/__snapshots__/elementhandle-screenshot/should-work-for-an-element-with-fractional-dimensions/webkit/screenshot-element-fractional.png rename to tests/__snapshots__/page/elementhandle-screenshot/should-work-for-an-element-with-fractional-dimensions/webkit/screenshot-element-fractional.png diff --git a/tests/__snapshots__/elementhandle-screenshot/should-work-with-a-rotated-element/chromium/screenshot-element-rotate.png b/tests/__snapshots__/page/elementhandle-screenshot/should-work-with-a-rotated-element/chromium/screenshot-element-rotate.png similarity index 100% rename from tests/__snapshots__/elementhandle-screenshot/should-work-with-a-rotated-element/chromium/screenshot-element-rotate.png rename to tests/__snapshots__/page/elementhandle-screenshot/should-work-with-a-rotated-element/chromium/screenshot-element-rotate.png diff --git a/tests/__snapshots__/elementhandle-screenshot/should-work-with-a-rotated-element/firefox/screenshot-element-rotate.png b/tests/__snapshots__/page/elementhandle-screenshot/should-work-with-a-rotated-element/firefox/screenshot-element-rotate.png similarity index 100% rename from tests/__snapshots__/elementhandle-screenshot/should-work-with-a-rotated-element/firefox/screenshot-element-rotate.png rename to tests/__snapshots__/page/elementhandle-screenshot/should-work-with-a-rotated-element/firefox/screenshot-element-rotate.png diff --git a/tests/__snapshots__/elementhandle-screenshot/should-work-with-a-rotated-element/webkit/screenshot-element-rotate.png b/tests/__snapshots__/page/elementhandle-screenshot/should-work-with-a-rotated-element/webkit/screenshot-element-rotate.png similarity index 100% rename from tests/__snapshots__/elementhandle-screenshot/should-work-with-a-rotated-element/webkit/screenshot-element-rotate.png rename to tests/__snapshots__/page/elementhandle-screenshot/should-work-with-a-rotated-element/webkit/screenshot-element-rotate.png diff --git a/tests/__snapshots__/elementhandle-screenshot/should-work/chromium/screenshot-element-bounding-box.png b/tests/__snapshots__/page/elementhandle-screenshot/should-work/chromium/screenshot-element-bounding-box.png similarity index 100% rename from tests/__snapshots__/elementhandle-screenshot/should-work/chromium/screenshot-element-bounding-box.png rename to tests/__snapshots__/page/elementhandle-screenshot/should-work/chromium/screenshot-element-bounding-box.png diff --git a/tests/__snapshots__/elementhandle-screenshot/should-work/firefox/screenshot-element-bounding-box.png b/tests/__snapshots__/page/elementhandle-screenshot/should-work/firefox/screenshot-element-bounding-box.png similarity index 100% rename from tests/__snapshots__/elementhandle-screenshot/should-work/firefox/screenshot-element-bounding-box.png rename to tests/__snapshots__/page/elementhandle-screenshot/should-work/firefox/screenshot-element-bounding-box.png diff --git a/tests/__snapshots__/elementhandle-screenshot/should-work/webkit/screenshot-element-bounding-box.png b/tests/__snapshots__/page/elementhandle-screenshot/should-work/webkit/screenshot-element-bounding-box.png similarity index 100% rename from tests/__snapshots__/elementhandle-screenshot/should-work/webkit/screenshot-element-bounding-box.png rename to tests/__snapshots__/page/elementhandle-screenshot/should-work/webkit/screenshot-element-bounding-box.png diff --git a/tests/__snapshots__/page-request-fulfill/should-allow-mocking-binary-responses/chromium/mock-binary-response.png b/tests/__snapshots__/page/page-request-fulfill/should-allow-mocking-binary-responses/chromium/mock-binary-response.png similarity index 100% rename from tests/__snapshots__/page-request-fulfill/should-allow-mocking-binary-responses/chromium/mock-binary-response.png rename to tests/__snapshots__/page/page-request-fulfill/should-allow-mocking-binary-responses/chromium/mock-binary-response.png diff --git a/tests/__snapshots__/page-request-fulfill/should-allow-mocking-binary-responses/firefox/mock-binary-response.png b/tests/__snapshots__/page/page-request-fulfill/should-allow-mocking-binary-responses/firefox/mock-binary-response.png similarity index 100% rename from tests/__snapshots__/page-request-fulfill/should-allow-mocking-binary-responses/firefox/mock-binary-response.png rename to tests/__snapshots__/page/page-request-fulfill/should-allow-mocking-binary-responses/firefox/mock-binary-response.png diff --git a/tests/__snapshots__/page-request-fulfill/should-allow-mocking-binary-responses/webkit/mock-binary-response.png b/tests/__snapshots__/page/page-request-fulfill/should-allow-mocking-binary-responses/webkit/mock-binary-response.png similarity index 100% rename from tests/__snapshots__/page-request-fulfill/should-allow-mocking-binary-responses/webkit/mock-binary-response.png rename to tests/__snapshots__/page/page-request-fulfill/should-allow-mocking-binary-responses/webkit/mock-binary-response.png diff --git a/tests/__snapshots__/page-request-fulfill/should-allow-mocking-svg-with-charset/chromium/mock-svg.png b/tests/__snapshots__/page/page-request-fulfill/should-allow-mocking-svg-with-charset/chromium/mock-svg.png similarity index 100% rename from tests/__snapshots__/page-request-fulfill/should-allow-mocking-svg-with-charset/chromium/mock-svg.png rename to tests/__snapshots__/page/page-request-fulfill/should-allow-mocking-svg-with-charset/chromium/mock-svg.png diff --git a/tests/__snapshots__/page-request-fulfill/should-allow-mocking-svg-with-charset/firefox/mock-svg.png b/tests/__snapshots__/page/page-request-fulfill/should-allow-mocking-svg-with-charset/firefox/mock-svg.png similarity index 100% rename from tests/__snapshots__/page-request-fulfill/should-allow-mocking-svg-with-charset/firefox/mock-svg.png rename to tests/__snapshots__/page/page-request-fulfill/should-allow-mocking-svg-with-charset/firefox/mock-svg.png diff --git a/tests/__snapshots__/page-request-fulfill/should-allow-mocking-svg-with-charset/webkit/mock-svg.png b/tests/__snapshots__/page/page-request-fulfill/should-allow-mocking-svg-with-charset/webkit/mock-svg.png similarity index 100% rename from tests/__snapshots__/page-request-fulfill/should-allow-mocking-svg-with-charset/webkit/mock-svg.png rename to tests/__snapshots__/page/page-request-fulfill/should-allow-mocking-svg-with-charset/webkit/mock-svg.png diff --git a/tests/__snapshots__/page-request-fulfill/should-work-with-file-path/chromium/mock-binary-response.png b/tests/__snapshots__/page/page-request-fulfill/should-work-with-file-path/chromium/mock-binary-response.png similarity index 100% rename from tests/__snapshots__/page-request-fulfill/should-work-with-file-path/chromium/mock-binary-response.png rename to tests/__snapshots__/page/page-request-fulfill/should-work-with-file-path/chromium/mock-binary-response.png diff --git a/tests/__snapshots__/page-request-fulfill/should-work-with-file-path/firefox/mock-binary-response.png b/tests/__snapshots__/page/page-request-fulfill/should-work-with-file-path/firefox/mock-binary-response.png similarity index 100% rename from tests/__snapshots__/page-request-fulfill/should-work-with-file-path/firefox/mock-binary-response.png rename to tests/__snapshots__/page/page-request-fulfill/should-work-with-file-path/firefox/mock-binary-response.png diff --git a/tests/__snapshots__/page-request-fulfill/should-work-with-file-path/webkit/mock-binary-response.png b/tests/__snapshots__/page/page-request-fulfill/should-work-with-file-path/webkit/mock-binary-response.png similarity index 100% rename from tests/__snapshots__/page-request-fulfill/should-work-with-file-path/webkit/mock-binary-response.png rename to tests/__snapshots__/page/page-request-fulfill/should-work-with-file-path/webkit/mock-binary-response.png diff --git a/tests/__snapshots__/page-screenshot/path-option-should-create-subdirectories/chromium/screenshot-sanity.png b/tests/__snapshots__/page/page-screenshot/path-option-should-create-subdirectories/chromium/screenshot-sanity.png similarity index 100% rename from tests/__snapshots__/page-screenshot/path-option-should-create-subdirectories/chromium/screenshot-sanity.png rename to tests/__snapshots__/page/page-screenshot/path-option-should-create-subdirectories/chromium/screenshot-sanity.png diff --git a/tests/__snapshots__/page-screenshot/path-option-should-create-subdirectories/firefox/screenshot-sanity.png b/tests/__snapshots__/page/page-screenshot/path-option-should-create-subdirectories/firefox/screenshot-sanity.png similarity index 100% rename from tests/__snapshots__/page-screenshot/path-option-should-create-subdirectories/firefox/screenshot-sanity.png rename to tests/__snapshots__/page/page-screenshot/path-option-should-create-subdirectories/firefox/screenshot-sanity.png diff --git a/tests/__snapshots__/page-screenshot/path-option-should-create-subdirectories/webkit/screenshot-sanity.png b/tests/__snapshots__/page/page-screenshot/path-option-should-create-subdirectories/webkit/screenshot-sanity.png similarity index 100% rename from tests/__snapshots__/page-screenshot/path-option-should-create-subdirectories/webkit/screenshot-sanity.png rename to tests/__snapshots__/page/page-screenshot/path-option-should-create-subdirectories/webkit/screenshot-sanity.png diff --git a/tests/__snapshots__/page-screenshot/path-option-should-detect-jpeg/chromium/white.jpg b/tests/__snapshots__/page/page-screenshot/path-option-should-detect-jpeg/chromium/white.jpg similarity index 100% rename from tests/__snapshots__/page-screenshot/path-option-should-detect-jpeg/chromium/white.jpg rename to tests/__snapshots__/page/page-screenshot/path-option-should-detect-jpeg/chromium/white.jpg diff --git a/tests/__snapshots__/page-screenshot/path-option-should-detect-jpeg/firefox/white.jpg b/tests/__snapshots__/page/page-screenshot/path-option-should-detect-jpeg/firefox/white.jpg similarity index 100% rename from tests/__snapshots__/page-screenshot/path-option-should-detect-jpeg/firefox/white.jpg rename to tests/__snapshots__/page/page-screenshot/path-option-should-detect-jpeg/firefox/white.jpg diff --git a/tests/__snapshots__/page-screenshot/path-option-should-detect-jpeg/webkit/white.jpg b/tests/__snapshots__/page/page-screenshot/path-option-should-detect-jpeg/webkit/white.jpg similarity index 100% rename from tests/__snapshots__/page-screenshot/path-option-should-detect-jpeg/webkit/white.jpg rename to tests/__snapshots__/page/page-screenshot/path-option-should-detect-jpeg/webkit/white.jpg diff --git a/tests/__snapshots__/page-screenshot/path-option-should-work/chromium/screenshot-sanity.png b/tests/__snapshots__/page/page-screenshot/path-option-should-work/chromium/screenshot-sanity.png similarity index 100% rename from tests/__snapshots__/page-screenshot/path-option-should-work/chromium/screenshot-sanity.png rename to tests/__snapshots__/page/page-screenshot/path-option-should-work/chromium/screenshot-sanity.png diff --git a/tests/__snapshots__/page-screenshot/path-option-should-work/firefox/screenshot-sanity.png b/tests/__snapshots__/page/page-screenshot/path-option-should-work/firefox/screenshot-sanity.png similarity index 100% rename from tests/__snapshots__/page-screenshot/path-option-should-work/firefox/screenshot-sanity.png rename to tests/__snapshots__/page/page-screenshot/path-option-should-work/firefox/screenshot-sanity.png diff --git a/tests/__snapshots__/page-screenshot/path-option-should-work/webkit/screenshot-sanity.png b/tests/__snapshots__/page/page-screenshot/path-option-should-work/webkit/screenshot-sanity.png similarity index 100% rename from tests/__snapshots__/page-screenshot/path-option-should-work/webkit/screenshot-sanity.png rename to tests/__snapshots__/page/page-screenshot/path-option-should-work/webkit/screenshot-sanity.png diff --git a/tests/__snapshots__/page-screenshot/should-allow-transparency/chromium/transparent.png b/tests/__snapshots__/page/page-screenshot/should-allow-transparency/chromium/transparent.png similarity index 100% rename from tests/__snapshots__/page-screenshot/should-allow-transparency/chromium/transparent.png rename to tests/__snapshots__/page/page-screenshot/should-allow-transparency/chromium/transparent.png diff --git a/tests/__snapshots__/page-screenshot/should-allow-transparency/webkit/transparent.png b/tests/__snapshots__/page/page-screenshot/should-allow-transparency/webkit/transparent.png similarity index 100% rename from tests/__snapshots__/page-screenshot/should-allow-transparency/webkit/transparent.png rename to tests/__snapshots__/page/page-screenshot/should-allow-transparency/webkit/transparent.png diff --git a/tests/__snapshots__/page-screenshot/should-clip-elements-to-the-viewport/chromium/screenshot-offscreen-clip.png b/tests/__snapshots__/page/page-screenshot/should-clip-elements-to-the-viewport/chromium/screenshot-offscreen-clip.png similarity index 100% rename from tests/__snapshots__/page-screenshot/should-clip-elements-to-the-viewport/chromium/screenshot-offscreen-clip.png rename to tests/__snapshots__/page/page-screenshot/should-clip-elements-to-the-viewport/chromium/screenshot-offscreen-clip.png diff --git a/tests/__snapshots__/page-screenshot/should-clip-elements-to-the-viewport/firefox/screenshot-offscreen-clip.png b/tests/__snapshots__/page/page-screenshot/should-clip-elements-to-the-viewport/firefox/screenshot-offscreen-clip.png similarity index 100% rename from tests/__snapshots__/page-screenshot/should-clip-elements-to-the-viewport/firefox/screenshot-offscreen-clip.png rename to tests/__snapshots__/page/page-screenshot/should-clip-elements-to-the-viewport/firefox/screenshot-offscreen-clip.png diff --git a/tests/__snapshots__/page-screenshot/should-clip-elements-to-the-viewport/webkit/screenshot-offscreen-clip.png b/tests/__snapshots__/page/page-screenshot/should-clip-elements-to-the-viewport/webkit/screenshot-offscreen-clip.png similarity index 100% rename from tests/__snapshots__/page-screenshot/should-clip-elements-to-the-viewport/webkit/screenshot-offscreen-clip.png rename to tests/__snapshots__/page/page-screenshot/should-clip-elements-to-the-viewport/webkit/screenshot-offscreen-clip.png diff --git a/tests/__snapshots__/page-screenshot/should-clip-rect-with-fullPage/chromium/screenshot-clip-rect.png b/tests/__snapshots__/page/page-screenshot/should-clip-rect-with-fullPage/chromium/screenshot-clip-rect.png similarity index 100% rename from tests/__snapshots__/page-screenshot/should-clip-rect-with-fullPage/chromium/screenshot-clip-rect.png rename to tests/__snapshots__/page/page-screenshot/should-clip-rect-with-fullPage/chromium/screenshot-clip-rect.png diff --git a/tests/__snapshots__/page-screenshot/should-clip-rect-with-fullPage/firefox/screenshot-clip-rect.png b/tests/__snapshots__/page/page-screenshot/should-clip-rect-with-fullPage/firefox/screenshot-clip-rect.png similarity index 100% rename from tests/__snapshots__/page-screenshot/should-clip-rect-with-fullPage/firefox/screenshot-clip-rect.png rename to tests/__snapshots__/page/page-screenshot/should-clip-rect-with-fullPage/firefox/screenshot-clip-rect.png diff --git a/tests/__snapshots__/page-screenshot/should-clip-rect-with-fullPage/webkit/screenshot-clip-rect.png b/tests/__snapshots__/page/page-screenshot/should-clip-rect-with-fullPage/webkit/screenshot-clip-rect.png similarity index 100% rename from tests/__snapshots__/page-screenshot/should-clip-rect-with-fullPage/webkit/screenshot-clip-rect.png rename to tests/__snapshots__/page/page-screenshot/should-clip-rect-with-fullPage/webkit/screenshot-clip-rect.png diff --git a/tests/__snapshots__/page-screenshot/should-clip-rect/chromium/screenshot-clip-rect.png b/tests/__snapshots__/page/page-screenshot/should-clip-rect/chromium/screenshot-clip-rect.png similarity index 100% rename from tests/__snapshots__/page-screenshot/should-clip-rect/chromium/screenshot-clip-rect.png rename to tests/__snapshots__/page/page-screenshot/should-clip-rect/chromium/screenshot-clip-rect.png diff --git a/tests/__snapshots__/page-screenshot/should-clip-rect/firefox/screenshot-clip-rect.png b/tests/__snapshots__/page/page-screenshot/should-clip-rect/firefox/screenshot-clip-rect.png similarity index 100% rename from tests/__snapshots__/page-screenshot/should-clip-rect/firefox/screenshot-clip-rect.png rename to tests/__snapshots__/page/page-screenshot/should-clip-rect/firefox/screenshot-clip-rect.png diff --git a/tests/__snapshots__/page-screenshot/should-clip-rect/webkit/screenshot-clip-rect.png b/tests/__snapshots__/page/page-screenshot/should-clip-rect/webkit/screenshot-clip-rect.png similarity index 100% rename from tests/__snapshots__/page-screenshot/should-clip-rect/webkit/screenshot-clip-rect.png rename to tests/__snapshots__/page/page-screenshot/should-clip-rect/webkit/screenshot-clip-rect.png diff --git a/tests/__snapshots__/page-screenshot/should-render-white-background-on-jpeg-file/chromium/white.jpg b/tests/__snapshots__/page/page-screenshot/should-render-white-background-on-jpeg-file/chromium/white.jpg similarity index 100% rename from tests/__snapshots__/page-screenshot/should-render-white-background-on-jpeg-file/chromium/white.jpg rename to tests/__snapshots__/page/page-screenshot/should-render-white-background-on-jpeg-file/chromium/white.jpg diff --git a/tests/__snapshots__/page-screenshot/should-render-white-background-on-jpeg-file/firefox/white.jpg b/tests/__snapshots__/page/page-screenshot/should-render-white-background-on-jpeg-file/firefox/white.jpg similarity index 100% rename from tests/__snapshots__/page-screenshot/should-render-white-background-on-jpeg-file/firefox/white.jpg rename to tests/__snapshots__/page/page-screenshot/should-render-white-background-on-jpeg-file/firefox/white.jpg diff --git a/tests/__snapshots__/page-screenshot/should-render-white-background-on-jpeg-file/webkit/white.jpg b/tests/__snapshots__/page/page-screenshot/should-render-white-background-on-jpeg-file/webkit/white.jpg similarity index 100% rename from tests/__snapshots__/page-screenshot/should-render-white-background-on-jpeg-file/webkit/white.jpg rename to tests/__snapshots__/page/page-screenshot/should-render-white-background-on-jpeg-file/webkit/white.jpg diff --git a/tests/__snapshots__/page-screenshot/should-run-in-parallel-in-multiple-pages/chromium/grid-cell-1.png b/tests/__snapshots__/page/page-screenshot/should-run-in-parallel/chromium/grid-cell-1.png similarity index 100% rename from tests/__snapshots__/page-screenshot/should-run-in-parallel-in-multiple-pages/chromium/grid-cell-1.png rename to tests/__snapshots__/page/page-screenshot/should-run-in-parallel/chromium/grid-cell-1.png diff --git a/tests/__snapshots__/page-screenshot/should-run-in-parallel-in-multiple-pages/firefox/grid-cell-1.png b/tests/__snapshots__/page/page-screenshot/should-run-in-parallel/firefox/grid-cell-1.png similarity index 100% rename from tests/__snapshots__/page-screenshot/should-run-in-parallel-in-multiple-pages/firefox/grid-cell-1.png rename to tests/__snapshots__/page/page-screenshot/should-run-in-parallel/firefox/grid-cell-1.png diff --git a/tests/__snapshots__/page-screenshot/should-run-in-parallel-in-multiple-pages/webkit/grid-cell-1.png b/tests/__snapshots__/page/page-screenshot/should-run-in-parallel/webkit/grid-cell-1.png similarity index 100% rename from tests/__snapshots__/page-screenshot/should-run-in-parallel-in-multiple-pages/webkit/grid-cell-1.png rename to tests/__snapshots__/page/page-screenshot/should-run-in-parallel/webkit/grid-cell-1.png diff --git a/tests/__snapshots__/page-screenshot/should-take-fullPage-screenshots/chromium/screenshot-grid-fullpage.png b/tests/__snapshots__/page/page-screenshot/should-take-fullPage-screenshots/chromium/screenshot-grid-fullpage.png similarity index 100% rename from tests/__snapshots__/page-screenshot/should-take-fullPage-screenshots/chromium/screenshot-grid-fullpage.png rename to tests/__snapshots__/page/page-screenshot/should-take-fullPage-screenshots/chromium/screenshot-grid-fullpage.png diff --git a/tests/__snapshots__/page-screenshot/should-take-fullPage-screenshots/firefox/screenshot-grid-fullpage.png b/tests/__snapshots__/page/page-screenshot/should-take-fullPage-screenshots/firefox/screenshot-grid-fullpage.png similarity index 100% rename from tests/__snapshots__/page-screenshot/should-take-fullPage-screenshots/firefox/screenshot-grid-fullpage.png rename to tests/__snapshots__/page/page-screenshot/should-take-fullPage-screenshots/firefox/screenshot-grid-fullpage.png diff --git a/tests/__snapshots__/page-screenshot/should-take-fullPage-screenshots/webkit/screenshot-grid-fullpage.png b/tests/__snapshots__/page/page-screenshot/should-take-fullPage-screenshots/webkit/screenshot-grid-fullpage.png similarity index 100% rename from tests/__snapshots__/page-screenshot/should-take-fullPage-screenshots/webkit/screenshot-grid-fullpage.png rename to tests/__snapshots__/page/page-screenshot/should-take-fullPage-screenshots/webkit/screenshot-grid-fullpage.png diff --git a/tests/__snapshots__/page-screenshot/should-work-for-canvas/chromium/screenshot-canvas.png b/tests/__snapshots__/page/page-screenshot/should-work-for-canvas/chromium/screenshot-canvas.png similarity index 100% rename from tests/__snapshots__/page-screenshot/should-work-for-canvas/chromium/screenshot-canvas.png rename to tests/__snapshots__/page/page-screenshot/should-work-for-canvas/chromium/screenshot-canvas.png diff --git a/tests/__snapshots__/page-screenshot/should-work-for-canvas/firefox/screenshot-canvas.png b/tests/__snapshots__/page/page-screenshot/should-work-for-canvas/firefox/screenshot-canvas.png similarity index 100% rename from tests/__snapshots__/page-screenshot/should-work-for-canvas/firefox/screenshot-canvas.png rename to tests/__snapshots__/page/page-screenshot/should-work-for-canvas/firefox/screenshot-canvas.png diff --git a/tests/__snapshots__/page-screenshot/should-work-for-canvas/webkit/screenshot-canvas.png b/tests/__snapshots__/page/page-screenshot/should-work-for-canvas/webkit/screenshot-canvas.png similarity index 100% rename from tests/__snapshots__/page-screenshot/should-work-for-canvas/webkit/screenshot-canvas.png rename to tests/__snapshots__/page/page-screenshot/should-work-for-canvas/webkit/screenshot-canvas.png diff --git a/tests/__snapshots__/page-screenshot/should-work-for-translateZ/chromium/screenshot-translateZ.png b/tests/__snapshots__/page/page-screenshot/should-work-for-translateZ/chromium/screenshot-translateZ.png similarity index 100% rename from tests/__snapshots__/page-screenshot/should-work-for-translateZ/chromium/screenshot-translateZ.png rename to tests/__snapshots__/page/page-screenshot/should-work-for-translateZ/chromium/screenshot-translateZ.png diff --git a/tests/__snapshots__/page-screenshot/should-work-for-translateZ/firefox/screenshot-translateZ.png b/tests/__snapshots__/page/page-screenshot/should-work-for-translateZ/firefox/screenshot-translateZ.png similarity index 100% rename from tests/__snapshots__/page-screenshot/should-work-for-translateZ/firefox/screenshot-translateZ.png rename to tests/__snapshots__/page/page-screenshot/should-work-for-translateZ/firefox/screenshot-translateZ.png diff --git a/tests/__snapshots__/page-screenshot/should-work-for-translateZ/webkit/screenshot-translateZ.png b/tests/__snapshots__/page/page-screenshot/should-work-for-translateZ/webkit/screenshot-translateZ.png similarity index 100% rename from tests/__snapshots__/page-screenshot/should-work-for-translateZ/webkit/screenshot-translateZ.png rename to tests/__snapshots__/page/page-screenshot/should-work-for-translateZ/webkit/screenshot-translateZ.png diff --git a/tests/__snapshots__/page-screenshot/should-work-for-webgl/chromium/screenshot-webgl.png b/tests/__snapshots__/page/page-screenshot/should-work-for-webgl/chromium/screenshot-webgl.png similarity index 100% rename from tests/__snapshots__/page-screenshot/should-work-for-webgl/chromium/screenshot-webgl.png rename to tests/__snapshots__/page/page-screenshot/should-work-for-webgl/chromium/screenshot-webgl.png diff --git a/tests/__snapshots__/page-screenshot/should-work-for-webgl/webkit/screenshot-webgl.png b/tests/__snapshots__/page/page-screenshot/should-work-for-webgl/webkit/screenshot-webgl.png similarity index 100% rename from tests/__snapshots__/page-screenshot/should-work-for-webgl/webkit/screenshot-webgl.png rename to tests/__snapshots__/page/page-screenshot/should-work-for-webgl/webkit/screenshot-webgl.png diff --git a/tests/__snapshots__/page-screenshot/should-work-with-Array-deleted/chromium/screenshot-grid-fullpage.png b/tests/__snapshots__/page/page-screenshot/should-work-with-Array-deleted/chromium/screenshot-grid-fullpage.png similarity index 100% rename from tests/__snapshots__/page-screenshot/should-work-with-Array-deleted/chromium/screenshot-grid-fullpage.png rename to tests/__snapshots__/page/page-screenshot/should-work-with-Array-deleted/chromium/screenshot-grid-fullpage.png diff --git a/tests/__snapshots__/page-screenshot/should-work-with-Array-deleted/firefox/screenshot-grid-fullpage.png b/tests/__snapshots__/page/page-screenshot/should-work-with-Array-deleted/firefox/screenshot-grid-fullpage.png similarity index 100% rename from tests/__snapshots__/page-screenshot/should-work-with-Array-deleted/firefox/screenshot-grid-fullpage.png rename to tests/__snapshots__/page/page-screenshot/should-work-with-Array-deleted/firefox/screenshot-grid-fullpage.png diff --git a/tests/__snapshots__/page-screenshot/should-work-with-Array-deleted/webkit/screenshot-grid-fullpage.png b/tests/__snapshots__/page/page-screenshot/should-work-with-Array-deleted/webkit/screenshot-grid-fullpage.png similarity index 100% rename from tests/__snapshots__/page-screenshot/should-work-with-Array-deleted/webkit/screenshot-grid-fullpage.png rename to tests/__snapshots__/page/page-screenshot/should-work-with-Array-deleted/webkit/screenshot-grid-fullpage.png diff --git a/tests/__snapshots__/page-screenshot/should-work-with-iframe-in-shadow/chromium/screenshot-iframe.png b/tests/__snapshots__/page/page-screenshot/should-work-with-iframe-in-shadow/chromium/screenshot-iframe.png similarity index 100% rename from tests/__snapshots__/page-screenshot/should-work-with-iframe-in-shadow/chromium/screenshot-iframe.png rename to tests/__snapshots__/page/page-screenshot/should-work-with-iframe-in-shadow/chromium/screenshot-iframe.png diff --git a/tests/__snapshots__/page-screenshot/should-work-with-iframe-in-shadow/firefox/screenshot-iframe.png b/tests/__snapshots__/page/page-screenshot/should-work-with-iframe-in-shadow/firefox/screenshot-iframe.png similarity index 100% rename from tests/__snapshots__/page-screenshot/should-work-with-iframe-in-shadow/firefox/screenshot-iframe.png rename to tests/__snapshots__/page/page-screenshot/should-work-with-iframe-in-shadow/firefox/screenshot-iframe.png diff --git a/tests/__snapshots__/page-screenshot/should-work-with-iframe-in-shadow/webkit/screenshot-iframe.png b/tests/__snapshots__/page/page-screenshot/should-work-with-iframe-in-shadow/webkit/screenshot-iframe.png similarity index 100% rename from tests/__snapshots__/page-screenshot/should-work-with-iframe-in-shadow/webkit/screenshot-iframe.png rename to tests/__snapshots__/page/page-screenshot/should-work-with-iframe-in-shadow/webkit/screenshot-iframe.png diff --git a/tests/__snapshots__/page-screenshot/should-work-with-odd-clip-size-on-Retina-displays/chromium/screenshot-clip-odd-size.png b/tests/__snapshots__/page/page-screenshot/should-work-with-odd-clip-size-on-Retina-displays/chromium/screenshot-clip-odd-size.png similarity index 100% rename from tests/__snapshots__/page-screenshot/should-work-with-odd-clip-size-on-Retina-displays/chromium/screenshot-clip-odd-size.png rename to tests/__snapshots__/page/page-screenshot/should-work-with-odd-clip-size-on-Retina-displays/chromium/screenshot-clip-odd-size.png diff --git a/tests/__snapshots__/page-screenshot/should-work-with-odd-clip-size-on-Retina-displays/firefox/screenshot-clip-odd-size.png b/tests/__snapshots__/page/page-screenshot/should-work-with-odd-clip-size-on-Retina-displays/firefox/screenshot-clip-odd-size.png similarity index 100% rename from tests/__snapshots__/page-screenshot/should-work-with-odd-clip-size-on-Retina-displays/firefox/screenshot-clip-odd-size.png rename to tests/__snapshots__/page/page-screenshot/should-work-with-odd-clip-size-on-Retina-displays/firefox/screenshot-clip-odd-size.png diff --git a/tests/__snapshots__/page-screenshot/should-work-with-odd-clip-size-on-Retina-displays/webkit/screenshot-clip-odd-size.png b/tests/__snapshots__/page/page-screenshot/should-work-with-odd-clip-size-on-Retina-displays/webkit/screenshot-clip-odd-size.png similarity index 100% rename from tests/__snapshots__/page-screenshot/should-work-with-odd-clip-size-on-Retina-displays/webkit/screenshot-clip-odd-size.png rename to tests/__snapshots__/page/page-screenshot/should-work-with-odd-clip-size-on-Retina-displays/webkit/screenshot-clip-odd-size.png diff --git a/tests/__snapshots__/page-screenshot/should-work/chromium/screenshot-sanity.png b/tests/__snapshots__/page/page-screenshot/should-work/chromium/screenshot-sanity.png similarity index 100% rename from tests/__snapshots__/page-screenshot/should-work/chromium/screenshot-sanity.png rename to tests/__snapshots__/page/page-screenshot/should-work/chromium/screenshot-sanity.png diff --git a/tests/__snapshots__/page-screenshot/should-work/firefox/screenshot-sanity.png b/tests/__snapshots__/page/page-screenshot/should-work/firefox/screenshot-sanity.png similarity index 100% rename from tests/__snapshots__/page-screenshot/should-work/firefox/screenshot-sanity.png rename to tests/__snapshots__/page/page-screenshot/should-work/firefox/screenshot-sanity.png diff --git a/tests/__snapshots__/page-screenshot/should-work/webkit/screenshot-sanity.png b/tests/__snapshots__/page/page-screenshot/should-work/webkit/screenshot-sanity.png similarity index 100% rename from tests/__snapshots__/page-screenshot/should-work/webkit/screenshot-sanity.png rename to tests/__snapshots__/page/page-screenshot/should-work/webkit/screenshot-sanity.png diff --git a/tests/__snapshots__/elementhandle-screenshot/should-work-with-a-mobile-viewport/chromium/screenshot-element-mobile.png b/tests/__snapshots__/screenshot/element-screenshot-should-work-with-a-mobile-viewport/chromium/screenshot-element-mobile.png similarity index 100% rename from tests/__snapshots__/elementhandle-screenshot/should-work-with-a-mobile-viewport/chromium/screenshot-element-mobile.png rename to tests/__snapshots__/screenshot/element-screenshot-should-work-with-a-mobile-viewport/chromium/screenshot-element-mobile.png diff --git a/tests/__snapshots__/elementhandle-screenshot/should-work-with-a-mobile-viewport/webkit/screenshot-element-mobile.png b/tests/__snapshots__/screenshot/element-screenshot-should-work-with-a-mobile-viewport/webkit/screenshot-element-mobile.png similarity index 100% rename from tests/__snapshots__/elementhandle-screenshot/should-work-with-a-mobile-viewport/webkit/screenshot-element-mobile.png rename to tests/__snapshots__/screenshot/element-screenshot-should-work-with-a-mobile-viewport/webkit/screenshot-element-mobile.png diff --git a/tests/__snapshots__/elementhandle-screenshot/should-work-with-device-scale-factor/chromium/screenshot-element-mobile-dsf.png b/tests/__snapshots__/screenshot/element-screenshot-should-work-with-device-scale-factor/chromium/screenshot-element-mobile-dsf.png similarity index 100% rename from tests/__snapshots__/elementhandle-screenshot/should-work-with-device-scale-factor/chromium/screenshot-element-mobile-dsf.png rename to tests/__snapshots__/screenshot/element-screenshot-should-work-with-device-scale-factor/chromium/screenshot-element-mobile-dsf.png diff --git a/tests/__snapshots__/elementhandle-screenshot/should-work-with-device-scale-factor/webkit/screenshot-element-mobile-dsf.png b/tests/__snapshots__/screenshot/element-screenshot-should-work-with-device-scale-factor/webkit/screenshot-element-mobile-dsf.png similarity index 100% rename from tests/__snapshots__/elementhandle-screenshot/should-work-with-device-scale-factor/webkit/screenshot-element-mobile-dsf.png rename to tests/__snapshots__/screenshot/element-screenshot-should-work-with-device-scale-factor/webkit/screenshot-element-mobile-dsf.png diff --git a/tests/__snapshots__/page-screenshot/should-run-in-parallel-in-multiple-pages/chromium/grid-cell-0.png b/tests/__snapshots__/screenshot/should-run-in-parallel-in-multiple-pages/chromium/grid-cell-0.png similarity index 100% rename from tests/__snapshots__/page-screenshot/should-run-in-parallel-in-multiple-pages/chromium/grid-cell-0.png rename to tests/__snapshots__/screenshot/should-run-in-parallel-in-multiple-pages/chromium/grid-cell-0.png diff --git a/tests/__snapshots__/page-screenshot/should-run-in-parallel/chromium/grid-cell-1.png b/tests/__snapshots__/screenshot/should-run-in-parallel-in-multiple-pages/chromium/grid-cell-1.png similarity index 100% rename from tests/__snapshots__/page-screenshot/should-run-in-parallel/chromium/grid-cell-1.png rename to tests/__snapshots__/screenshot/should-run-in-parallel-in-multiple-pages/chromium/grid-cell-1.png diff --git a/tests/__snapshots__/page-screenshot/should-run-in-parallel-in-multiple-pages/firefox/grid-cell-0.png b/tests/__snapshots__/screenshot/should-run-in-parallel-in-multiple-pages/firefox/grid-cell-0.png similarity index 100% rename from tests/__snapshots__/page-screenshot/should-run-in-parallel-in-multiple-pages/firefox/grid-cell-0.png rename to tests/__snapshots__/screenshot/should-run-in-parallel-in-multiple-pages/firefox/grid-cell-0.png diff --git a/tests/__snapshots__/page-screenshot/should-run-in-parallel/firefox/grid-cell-1.png b/tests/__snapshots__/screenshot/should-run-in-parallel-in-multiple-pages/firefox/grid-cell-1.png similarity index 100% rename from tests/__snapshots__/page-screenshot/should-run-in-parallel/firefox/grid-cell-1.png rename to tests/__snapshots__/screenshot/should-run-in-parallel-in-multiple-pages/firefox/grid-cell-1.png diff --git a/tests/__snapshots__/page-screenshot/should-run-in-parallel-in-multiple-pages/webkit/grid-cell-0.png b/tests/__snapshots__/screenshot/should-run-in-parallel-in-multiple-pages/webkit/grid-cell-0.png similarity index 100% rename from tests/__snapshots__/page-screenshot/should-run-in-parallel-in-multiple-pages/webkit/grid-cell-0.png rename to tests/__snapshots__/screenshot/should-run-in-parallel-in-multiple-pages/webkit/grid-cell-0.png diff --git a/tests/__snapshots__/page-screenshot/should-run-in-parallel/webkit/grid-cell-1.png b/tests/__snapshots__/screenshot/should-run-in-parallel-in-multiple-pages/webkit/grid-cell-1.png similarity index 100% rename from tests/__snapshots__/page-screenshot/should-run-in-parallel/webkit/grid-cell-1.png rename to tests/__snapshots__/screenshot/should-run-in-parallel-in-multiple-pages/webkit/grid-cell-1.png diff --git a/tests/__snapshots__/page-screenshot/should-work-with-a-mobile-viewport-and-clip/chromium/screenshot-mobile-clip.png b/tests/__snapshots__/screenshot/should-work-with-a-mobile-viewport-and-clip/chromium/screenshot-mobile-clip.png similarity index 100% rename from tests/__snapshots__/page-screenshot/should-work-with-a-mobile-viewport-and-clip/chromium/screenshot-mobile-clip.png rename to tests/__snapshots__/screenshot/should-work-with-a-mobile-viewport-and-clip/chromium/screenshot-mobile-clip.png diff --git a/tests/__snapshots__/page-screenshot/should-work-with-a-mobile-viewport-and-clip/webkit/screenshot-mobile-clip.png b/tests/__snapshots__/screenshot/should-work-with-a-mobile-viewport-and-clip/webkit/screenshot-mobile-clip.png similarity index 100% rename from tests/__snapshots__/page-screenshot/should-work-with-a-mobile-viewport-and-clip/webkit/screenshot-mobile-clip.png rename to tests/__snapshots__/screenshot/should-work-with-a-mobile-viewport-and-clip/webkit/screenshot-mobile-clip.png diff --git a/tests/__snapshots__/page-screenshot/should-work-with-a-mobile-viewport-and-fullPage/chromium/screenshot-mobile-fullpage.png b/tests/__snapshots__/screenshot/should-work-with-a-mobile-viewport-and-fullPage/chromium/screenshot-mobile-fullpage.png similarity index 100% rename from tests/__snapshots__/page-screenshot/should-work-with-a-mobile-viewport-and-fullPage/chromium/screenshot-mobile-fullpage.png rename to tests/__snapshots__/screenshot/should-work-with-a-mobile-viewport-and-fullPage/chromium/screenshot-mobile-fullpage.png diff --git a/tests/__snapshots__/page-screenshot/should-work-with-a-mobile-viewport-and-fullPage/webkit/screenshot-mobile-fullpage.png b/tests/__snapshots__/screenshot/should-work-with-a-mobile-viewport-and-fullPage/webkit/screenshot-mobile-fullpage.png similarity index 100% rename from tests/__snapshots__/page-screenshot/should-work-with-a-mobile-viewport-and-fullPage/webkit/screenshot-mobile-fullpage.png rename to tests/__snapshots__/screenshot/should-work-with-a-mobile-viewport-and-fullPage/webkit/screenshot-mobile-fullpage.png diff --git a/tests/__snapshots__/page-screenshot/should-work-with-a-mobile-viewport/chromium/screenshot-mobile.png b/tests/__snapshots__/screenshot/should-work-with-a-mobile-viewport/chromium/screenshot-mobile.png similarity index 100% rename from tests/__snapshots__/page-screenshot/should-work-with-a-mobile-viewport/chromium/screenshot-mobile.png rename to tests/__snapshots__/screenshot/should-work-with-a-mobile-viewport/chromium/screenshot-mobile.png diff --git a/tests/__snapshots__/page-screenshot/should-work-with-a-mobile-viewport/webkit/screenshot-mobile.png b/tests/__snapshots__/screenshot/should-work-with-a-mobile-viewport/webkit/screenshot-mobile.png similarity index 100% rename from tests/__snapshots__/page-screenshot/should-work-with-a-mobile-viewport/webkit/screenshot-mobile.png rename to tests/__snapshots__/screenshot/should-work-with-a-mobile-viewport/webkit/screenshot-mobile.png diff --git a/tests/__snapshots__/page-screenshot/should-work-with-device-scale-factor/chromium/screenshot-device-scale-factor.png b/tests/__snapshots__/screenshot/should-work-with-device-scale-factor/chromium/screenshot-device-scale-factor.png similarity index 100% rename from tests/__snapshots__/page-screenshot/should-work-with-device-scale-factor/chromium/screenshot-device-scale-factor.png rename to tests/__snapshots__/screenshot/should-work-with-device-scale-factor/chromium/screenshot-device-scale-factor.png diff --git a/tests/__snapshots__/page-screenshot/should-work-with-device-scale-factor/firefox/screenshot-device-scale-factor.png b/tests/__snapshots__/screenshot/should-work-with-device-scale-factor/firefox/screenshot-device-scale-factor.png similarity index 100% rename from tests/__snapshots__/page-screenshot/should-work-with-device-scale-factor/firefox/screenshot-device-scale-factor.png rename to tests/__snapshots__/screenshot/should-work-with-device-scale-factor/firefox/screenshot-device-scale-factor.png diff --git a/tests/__snapshots__/page-screenshot/should-work-with-device-scale-factor/webkit/screenshot-device-scale-factor.png b/tests/__snapshots__/screenshot/should-work-with-device-scale-factor/webkit/screenshot-device-scale-factor.png similarity index 100% rename from tests/__snapshots__/page-screenshot/should-work-with-device-scale-factor/webkit/screenshot-device-scale-factor.png rename to tests/__snapshots__/screenshot/should-work-with-device-scale-factor/webkit/screenshot-device-scale-factor.png diff --git a/tests/browsercontext-basic.spec.ts b/tests/browsercontext-basic.spec.ts index 81daecb6cd..a685a20726 100644 --- a/tests/browsercontext-basic.spec.ts +++ b/tests/browsercontext-basic.spec.ts @@ -16,7 +16,7 @@ */ import { browserTest as it, expect } from './config/browserTest'; -import { verifyViewport } from './config/utils'; +import { attachFrame, verifyViewport } from './config/utils'; it('should create new context', async function({browser}) { expect(browser.contexts().length).toBe(0); @@ -240,3 +240,38 @@ it('should emulate navigator.onLine', async ({browser, server}) => { expect(await page.evaluate(() => window.navigator.onLine)).toBe(true); await context.close(); }); + +it('should emulate media in popup', async ({browser, server}) => { + { + const context = await browser.newContext({ colorScheme: 'dark' }); + const page = await context.newPage(); + await page.goto(server.EMPTY_PAGE); + const [popup] = await Promise.all([ + page.waitForEvent('popup'), + page.evaluate(url => { window.open(url); }, server.EMPTY_PAGE), + ]); + expect(await popup.evaluate(() => matchMedia('(prefers-color-scheme: light)').matches)).toBe(false); + expect(await popup.evaluate(() => matchMedia('(prefers-color-scheme: dark)').matches)).toBe(true); + await context.close(); + } + { + const page = await browser.newPage({ colorScheme: 'light' }); + await page.goto(server.EMPTY_PAGE); + const [popup] = await Promise.all([ + page.waitForEvent('popup'), + page.evaluate(url => { window.open(url); }, server.EMPTY_PAGE), + ]); + expect(await popup.evaluate(() => matchMedia('(prefers-color-scheme: light)').matches)).toBe(true); + expect(await popup.evaluate(() => matchMedia('(prefers-color-scheme: dark)').matches)).toBe(false); + await page.close(); + } +}); + +it('should emulate media in cross-process iframe', async ({browser, server}) => { + const page = await browser.newPage({ colorScheme: 'dark' }); + await page.goto(server.EMPTY_PAGE); + await attachFrame(page, 'frame1', server.CROSS_PROCESS_PREFIX + '/empty.html'); + const frame = page.frames()[1]; + expect(await frame.evaluate(() => matchMedia('(prefers-color-scheme: dark)').matches)).toBe(true); + await page.close(); +}); diff --git a/tests/browsercontext-locale.spec.ts b/tests/browsercontext-locale.spec.ts index c349ceb759..db13548dc0 100644 --- a/tests/browsercontext-locale.spec.ts +++ b/tests/browsercontext-locale.spec.ts @@ -162,3 +162,15 @@ it('should not change default locale in another context', async ({browser, serve await context.close(); } }); + +it('should format number in workers', async ({browser, server}) => { + const context = await browser.newContext({ locale: 'ru-RU' }); + const page = await context.newPage(); + await page.goto(server.EMPTY_PAGE); + const [worker] = await Promise.all([ + page.waitForEvent('worker'), + page.evaluate(() => new Worker(URL.createObjectURL(new Blob(['console.log(1)'], {type: 'application/javascript'})))), + ]); + expect(await worker.evaluate(() => (10000.20).toLocaleString())).toBe('10\u00A0000,2'); + await context.close(); +}); diff --git a/tests/page-in-context.spec.ts b/tests/browsercontext-pages.spec.ts similarity index 87% rename from tests/page-in-context.spec.ts rename to tests/browsercontext-pages.spec.ts index f114093e9e..ab08116f45 100644 --- a/tests/page-in-context.spec.ts +++ b/tests/browsercontext-pages.spec.ts @@ -15,7 +15,7 @@ * limitations under the License. */ -import { browserTest as it, expect } from './config/browserTest'; +import { browserTest as it, expect, slowBrowserTest } from './config/browserTest'; import { attachFrame, chromiumVersionLessThan } from './config/utils'; it('should not be visible in context.pages', async ({contextFactory}) => { @@ -108,3 +108,15 @@ it('should click the button with offset with page scale', async ({browser, serve await context.close(); }); +// We open 20 pages here! +slowBrowserTest('should not leak listeners during navigation of 20 pages', async ({contextFactory, server}) => { + const context = await contextFactory(); + let warning = null; + const warningHandler = w => warning = w; + process.on('warning', warningHandler); + const pages = await Promise.all([...Array(20)].map(() => context.newPage())); + await Promise.all(pages.map(page => page.goto(server.EMPTY_PAGE))); + await Promise.all(pages.map(page => page.close())); + process.off('warning', warningHandler); + expect(warning).toBe(null); +}); diff --git a/tests/browsercontext-route.spec.ts b/tests/browsercontext-route.spec.ts index 0fd1fa900f..d8ed567e96 100644 --- a/tests/browsercontext-route.spec.ts +++ b/tests/browsercontext-route.spec.ts @@ -107,3 +107,94 @@ it('should fall back to context.route', async ({browser, server}) => { expect(await response.text()).toBe('context'); await context.close(); }); + +it('should support Set-Cookie header', async ({contextFactory, server, browserName}) => { + it.fixme(browserName === 'webkit'); + + const context = await contextFactory(); + const page = await context.newPage(); + await page.route('https://example.com/', (route, request) => { + route.fulfill({ + headers: { + 'Set-Cookie': 'name=value; domain=.example.com; Path=/' + }, + contentType: 'text/html', + body: 'done' + }); + }); + await page.goto('https://example.com'); + expect(await context.cookies()).toEqual([{ + sameSite: 'None', + name: 'name', + value: 'value', + domain: '.example.com', + path: '/', + expires: -1, + httpOnly: false, + secure: false + }]); +}); + +it('should ignore secure Set-Cookie header for insecure requests', async ({contextFactory, server, browserName}) => { + it.fixme(browserName === 'webkit'); + + const context = await contextFactory(); + const page = await context.newPage(); + await page.route('http://example.com/', (route, request) => { + route.fulfill({ + headers: { + 'Set-Cookie': 'name=value; domain=.example.com; Path=/; Secure' + }, + contentType: 'text/html', + body: 'done' + }); + }); + await page.goto('http://example.com'); + expect(await context.cookies()).toEqual([]); +}); + +it('should use Set-Cookie header in future requests', async ({contextFactory, server, browserName}) => { + it.fixme(browserName === 'webkit'); + + const context = await contextFactory(); + const page = await context.newPage(); + + await page.route(server.EMPTY_PAGE, (route, request) => { + route.fulfill({ + headers: { + 'Set-Cookie': 'name=value' + }, + contentType: 'text/html', + body: 'done' + }); + }); + await page.goto(server.EMPTY_PAGE); + expect(await context.cookies()).toEqual([{ + sameSite: 'None', + name: 'name', + value: 'value', + domain: 'localhost', + path: '/', + expires: -1, + httpOnly: false, + secure: false + }]); + + let cookie = ''; + server.setRoute('/foo.html', (req, res) => { + cookie = req.headers.cookie; + res.end(); + }); + await page.goto(server.PREFIX + '/foo.html'); + expect(cookie).toBe('name=value'); +}); + +it('should work with ignoreHTTPSErrors', async ({browser, httpsServer}) => { + const context = await browser.newContext({ ignoreHTTPSErrors: true }); + const page = await context.newPage(); + + await page.route('**/*', route => route.continue()); + const response = await page.goto(httpsServer.EMPTY_PAGE); + expect(response.status()).toBe(200); + await context.close(); +}); diff --git a/tests/browsercontext-viewport-mobile.spec.ts b/tests/browsercontext-viewport-mobile.spec.ts index 4ee170ad40..a583d3ec78 100644 --- a/tests/browsercontext-viewport-mobile.spec.ts +++ b/tests/browsercontext-viewport-mobile.spec.ts @@ -155,4 +155,22 @@ it.describe('mobile viewport', () => { expect(await desktopPage.evaluate(() => matchMedia('(any-pointer: fine)').matches)).toBe(true); await desktopPage.close(); }); + + it('mouse should work with mobile viewports and cross process navigations', async ({browser, server, browserName}) => { + // @see https://crbug.com/929806 + const context = await browser.newContext({ viewport: {width: 360, height: 640}, isMobile: true }); + const page = await context.newPage(); + await page.goto(server.EMPTY_PAGE); + await page.goto(server.CROSS_PROCESS_PREFIX + '/mobile.html'); + await page.evaluate(() => { + document.addEventListener('click', event => { + window['result'] = {x: event.clientX, y: event.clientY}; + }); + }); + + await page.mouse.click(30, 40); + + expect(await page.evaluate('result')).toEqual({x: 30, y: 40}); + await context.close(); + }); }); diff --git a/tests/elementhandle-bounding-box.spec.ts b/tests/page/elementhandle-bounding-box.spec.ts similarity index 98% rename from tests/elementhandle-bounding-box.spec.ts rename to tests/page/elementhandle-bounding-box.spec.ts index cffad209c9..64dff77f53 100644 --- a/tests/elementhandle-bounding-box.spec.ts +++ b/tests/page/elementhandle-bounding-box.spec.ts @@ -15,8 +15,8 @@ * limitations under the License. */ -import { test as it, expect } from './config/pageTest'; -import { browserTest } from './config/browserTest'; +import { test as it, expect } from '../config/pageTest'; +import { browserTest } from '../config/browserTest'; it.skip(({ isAndroid }) => isAndroid); diff --git a/tests/elementhandle-click.spec.ts b/tests/page/elementhandle-click.spec.ts similarity index 98% rename from tests/elementhandle-click.spec.ts rename to tests/page/elementhandle-click.spec.ts index 5d495ba810..9b7fc204c3 100644 --- a/tests/elementhandle-click.spec.ts +++ b/tests/page/elementhandle-click.spec.ts @@ -15,7 +15,7 @@ * limitations under the License. */ -import { test as it, expect } from './config/pageTest'; +import { test as it, expect } from '../config/pageTest'; it('should work', async ({ page, server }) => { await page.goto(server.PREFIX + '/input/button.html'); diff --git a/tests/elementhandle-content-frame.spec.ts b/tests/page/elementhandle-content-frame.spec.ts similarity index 95% rename from tests/elementhandle-content-frame.spec.ts rename to tests/page/elementhandle-content-frame.spec.ts index 22a6812c0b..4ec54e62ad 100644 --- a/tests/elementhandle-content-frame.spec.ts +++ b/tests/page/elementhandle-content-frame.spec.ts @@ -15,8 +15,8 @@ * limitations under the License. */ -import { test as it, expect } from './config/pageTest'; -import { attachFrame } from './config/utils'; +import { test as it, expect } from '../config/pageTest'; +import { attachFrame } from '../config/utils'; it('should work', async ({ page, server }) => { await page.goto(server.EMPTY_PAGE); diff --git a/tests/elementhandle-convenience.spec.ts b/tests/page/elementhandle-convenience.spec.ts similarity index 99% rename from tests/elementhandle-convenience.spec.ts rename to tests/page/elementhandle-convenience.spec.ts index b4754893b5..532aecdc54 100644 --- a/tests/elementhandle-convenience.spec.ts +++ b/tests/page/elementhandle-convenience.spec.ts @@ -15,7 +15,7 @@ * limitations under the License. */ -import { test as it, expect } from './config/pageTest'; +import { test as it, expect } from '../config/pageTest'; it('should have a nice preview', async ({ page, server }) => { await page.goto(`${server.PREFIX}/dom.html`); diff --git a/tests/elementhandle-eval-on-selector.spec.ts b/tests/page/elementhandle-eval-on-selector.spec.ts similarity index 98% rename from tests/elementhandle-eval-on-selector.spec.ts rename to tests/page/elementhandle-eval-on-selector.spec.ts index 3b1b164c6a..2c4c8a5b09 100644 --- a/tests/elementhandle-eval-on-selector.spec.ts +++ b/tests/page/elementhandle-eval-on-selector.spec.ts @@ -15,7 +15,7 @@ * limitations under the License. */ -import { test as it, expect } from './config/pageTest'; +import { test as it, expect } from '../config/pageTest'; it('should work', async ({page, server}) => { await page.setContent('