From 384ee1799c5ebf709411cffc6594beebb818baea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20Cobos=20=C3=81lvarez?= Date: Fri, 15 Oct 2021 15:48:38 +0200 Subject: [PATCH] Assert that color-scheme meta tag doesn't create a pres hint. This tests the spec change in https://github.com/whatwg/html/pull/7226. --- .../meta-color-scheme-presentational-hint.html | 15 --------------- .../support/compute-root-color-scheme.js | 1 + 2 files changed, 1 insertion(+), 15 deletions(-) delete mode 100644 html/semantics/document-metadata/the-meta-element/color-scheme/meta-color-scheme-presentational-hint.html diff --git a/html/semantics/document-metadata/the-meta-element/color-scheme/meta-color-scheme-presentational-hint.html b/html/semantics/document-metadata/the-meta-element/color-scheme/meta-color-scheme-presentational-hint.html deleted file mode 100644 index e5dc75a911c8f4..00000000000000 --- a/html/semantics/document-metadata/the-meta-element/color-scheme/meta-color-scheme-presentational-hint.html +++ /dev/null @@ -1,15 +0,0 @@ - -Meta color-scheme - presentational hint - - - - - - - diff --git a/html/semantics/document-metadata/the-meta-element/color-scheme/support/compute-root-color-scheme.js b/html/semantics/document-metadata/the-meta-element/color-scheme/support/compute-root-color-scheme.js index 16de8485c046c7..74cbf895ced3d9 100644 --- a/html/semantics/document-metadata/the-meta-element/color-scheme/support/compute-root-color-scheme.js +++ b/html/semantics/document-metadata/the-meta-element/color-scheme/support/compute-root-color-scheme.js @@ -23,5 +23,6 @@ function assert_root_color_scheme(expected_used_scheme, description) { test(() => { assert_equals(get_used_root_color_scheme(), expected_used_scheme); + assert_equals(getComputedStyle(document.documentElement).colorScheme, "normal", "Root element's color-scheme should be 'normal'"); }, description); }