From dcd795c16b2c7f3e680b9b83bfc380e56bca4ef1 Mon Sep 17 00:00:00 2001 From: Victor Porof Date: Thu, 4 Jul 2019 19:39:31 +0200 Subject: [PATCH] Bug 1561435 - Avoid formatting sensitive fixtures for dom/, r=standard8 # ignore-this-changeset Differential Revision: https://phabricator.services.mozilla.com/D35954 --HG-- extra : source : 38fbb8d45dab9bb49aee901ed4f3e77843b531c3 extra : intermediate-source : d90b525c37ebb5d220a7fc5bac4c93d0736c3139 --- .eslintignore | 4 ++++ .prettierignore | 7 +++++++ dom/base/test/file_bug687859-charset.js | 2 +- dom/base/test/file_bug687859-inherit.js | 2 +- dom/base/test/file_js_cache.js | 5 ++--- dom/security/test/sri/script.js | 2 +- dom/security/test/sri/script_301.js | 2 +- dom/security/test/sri/script_302.js | 2 +- dom/security/test/sri/script_401.js | 2 +- dom/security/test/sri/script_crossdomain1.js | 2 +- dom/serviceworkers/test/file_js_cache.js | 5 ++--- 11 files changed, 22 insertions(+), 13 deletions(-) diff --git a/.eslintignore b/.eslintignore index c129ac2d909d..949bed6939e9 100644 --- a/.eslintignore +++ b/.eslintignore @@ -174,6 +174,10 @@ dom/encoding/test/file_utf16_le_bom.js dom/tests/mochitest/general/test_focusrings.xul dom/html/test/test_bug677658.html +# Service workers fixtures which require specific resource caching. +dom/base/test/file_js_cache.js +dom/serviceworkers/test/file_js_cache.js + # Intentional broken files dom/base/test/file_js_cache_syntax_error.js dom/base/test/jsmodules/test_syntaxError.html diff --git a/.prettierignore b/.prettierignore index 7190e24ae5ac..70cd67a27cd8 100644 --- a/.prettierignore +++ b/.prettierignore @@ -109,6 +109,13 @@ devtools/server/** devtools/shared/** devtools/startup/** +# Ignore CORS fixtures which require specific resource hashes. +dom/security/test/sri/script* + +# Ignore other DOM fixtures with funky chars. +dom/base/test/file_bug687859-charset.js +dom/base/test/file_bug687859-inherit.js + # Ignore devtools debugger files # Keep in sync with devtools/client/debugger/.prettierignore devtools/client/debugger/src/workers/parser/tests/fixtures/functionNames.js diff --git a/dom/base/test/file_bug687859-charset.js b/dom/base/test/file_bug687859-charset.js index 3cd879b7a27e..e812a1e37f92 100644 --- a/dom/base/test/file_bug687859-charset.js +++ b/dom/base/test/file_bug687859-charset.js @@ -1 +1 @@ -var stringFromCharsetScript = "�"; +var stringFromCharsetScript = "¡"; \ No newline at end of file diff --git a/dom/base/test/file_bug687859-inherit.js b/dom/base/test/file_bug687859-inherit.js index 81ecca7be462..b83f60b2fb16 100644 --- a/dom/base/test/file_bug687859-inherit.js +++ b/dom/base/test/file_bug687859-inherit.js @@ -1 +1 @@ -var stringFromInheritScript = "�"; +var stringFromInheritScript = "¡"; \ No newline at end of file diff --git a/dom/base/test/file_js_cache.js b/dom/base/test/file_js_cache.js index 1b08386c810b..b9b966775c40 100644 --- a/dom/base/test/file_js_cache.js +++ b/dom/base/test/file_js_cache.js @@ -1,6 +1,5 @@ function baz() {} function bar() {} -function foo() { - bar(); -} +function foo() { bar() } foo(); + diff --git a/dom/security/test/sri/script.js b/dom/security/test/sri/script.js index 41ae13e22d14..8fd8f96b2f4e 100644 --- a/dom/security/test/sri/script.js +++ b/dom/security/test/sri/script.js @@ -1 +1 @@ -var load = true; +var load=true; diff --git a/dom/security/test/sri/script_301.js b/dom/security/test/sri/script_301.js index a6bdc78b440f..9a95de77cf6b 100644 --- a/dom/security/test/sri/script_301.js +++ b/dom/security/test/sri/script_301.js @@ -1 +1 @@ -var load = false; +var load=false; diff --git a/dom/security/test/sri/script_302.js b/dom/security/test/sri/script_302.js index a6bdc78b440f..9a95de77cf6b 100644 --- a/dom/security/test/sri/script_302.js +++ b/dom/security/test/sri/script_302.js @@ -1 +1 @@ -var load = false; +var load=false; diff --git a/dom/security/test/sri/script_401.js b/dom/security/test/sri/script_401.js index 41ae13e22d14..8fd8f96b2f4e 100644 --- a/dom/security/test/sri/script_401.js +++ b/dom/security/test/sri/script_401.js @@ -1 +1 @@ -var load = true; +var load=true; diff --git a/dom/security/test/sri/script_crossdomain1.js b/dom/security/test/sri/script_crossdomain1.js index de78ddbb9d3c..1f17a6db2477 100644 --- a/dom/security/test/sri/script_crossdomain1.js +++ b/dom/security/test/sri/script_crossdomain1.js @@ -1,4 +1,4 @@ /* * this file should be loaded, because it has CORS enabled. - */ +*/ window.hasCORSLoaded = true; diff --git a/dom/serviceworkers/test/file_js_cache.js b/dom/serviceworkers/test/file_js_cache.js index 1b08386c810b..b9b966775c40 100644 --- a/dom/serviceworkers/test/file_js_cache.js +++ b/dom/serviceworkers/test/file_js_cache.js @@ -1,6 +1,5 @@ function baz() {} function bar() {} -function foo() { - bar(); -} +function foo() { bar() } foo(); +