From 6e1b23bc17087542ddc989585a8ef2fb0ef0c3e0 Mon Sep 17 00:00:00 2001 From: Lyza Danger Gardner Date: Fri, 31 Mar 2017 16:13:02 -0400 Subject: [PATCH 1/2] HTML: Add tests for tokenization of noopener window.open feature --- .../open-features-tokenization-001.html | 149 ++++++++++++++++++ .../resources/close-self.html | 3 + 2 files changed, 152 insertions(+) create mode 100644 html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/open-features-tokenization-001.html create mode 100644 html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/resources/close-self.html diff --git a/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/open-features-tokenization-001.html b/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/open-features-tokenization-001.html new file mode 100644 index 000000000000000..2b7581d89928561 --- /dev/null +++ b/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/open-features-tokenization-001.html @@ -0,0 +1,149 @@ + + +HTML: window.open `features`: tokenization -- `noopener` + + + + diff --git a/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/resources/close-self.html b/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/resources/close-self.html new file mode 100644 index 000000000000000..0c0cf9fc4911de2 --- /dev/null +++ b/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/resources/close-self.html @@ -0,0 +1,3 @@ + From 5a4f60403d68fed60548bb2d471056672859b8ce Mon Sep 17 00:00:00 2001 From: Lyza Danger Gardner Date: Wed, 5 Apr 2017 09:47:27 -0400 Subject: [PATCH 2/2] fixup! HTML: Add tests for tokenization of noopener window.open feature --- .../open-features-tokenization-001.html | 21 +++++++++---------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/open-features-tokenization-001.html b/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/open-features-tokenization-001.html index 2b7581d89928561..3d3f53e185f5fc1 100644 --- a/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/open-features-tokenization-001.html +++ b/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/open-features-tokenization-001.html @@ -21,7 +21,6 @@ '\n=noopener=', '\tnoopener', '\r,,,=noopener', - '\u0000noopener', '\u000Cnoopener' ]; featureVariants.forEach(feature => { @@ -63,7 +62,6 @@ ', noopener =', 'noopener,=', 'noopener foo', // => ('noopener', ''), ('foo', '') - 'noopener\u0000foo', // => ('noopener', ''), ('foo', '') 'foo noopener=1', // => ('foo', ''), ('noopener', '1') 'foo=\u000Cnoopener' // => ('foo', ''), ('noopener', '') ]; @@ -86,8 +84,7 @@ 'noopener\n=\r noopener,', // => ('noopener', 'noopener') 'noopener=,yes', // => ('noopener'), ('yes') 'noopener= foo=,', // => ('noopener', 'foo') - 'noopener = \u000Cyes', // => ('noopener', 'yes') - 'noopener =\u0000 yes' // => ('noopener', 'yes') + 'noopener = \u000Cyes' // => ('noopener', 'yes') ]; featureVariants.forEach(feature => { var win = window.open(windowURL, '', feature); @@ -133,13 +130,15 @@ test (t => { var invalidFeatureVariants = [ - '-noopener', - 'NOOPENERRRR', - 'noOpenErR', - 'no_opener', - ' no opener', - 'no\nopener', - 'no,opener' + '-noopener', // => ('-noopener', '') + 'NOOPENERRRR', // => ('noopenerrr', '') + 'noOpenErR', // => ('noopenerr', '') + 'no_opener', // => ('no_opener', '') + ' no opener', // => ('no', ''), ('opener', '') + 'no\nopener', // => ('no', ''), ('opener', '') + 'no,opener', // => ('no', ''), ('opener', '') + '\0noopener', // => ('\0noopener', '') + 'noopener\u0000=yes' // => ('noopener\0', 'yes') ]; invalidFeatureVariants.forEach(feature => { var win = window.open(windowURL, '', feature);