From 81743a25625cf1b09e14f4a3a40126f3503b1cf5 Mon Sep 17 00:00:00 2001 From: Rich Harris Date: Sat, 24 Feb 2018 18:37:59 -0500 Subject: [PATCH] update more tests --- .../cascade-false-universal-selector/expected.html | 2 +- test/css/samples/combinator-child/expected.html | 2 +- .../expected.html | 2 +- .../expected.html | 2 +- .../expected.html | 2 +- .../expected.html | 2 +- .../expected.html | 2 +- .../expected.html | 4 ++-- .../expected.html | 2 +- .../expected.html | 2 +- .../expected.html | 2 +- .../expected.html | 2 +- .../omit-scoping-attribute-class-dynamic/expected.html | 2 +- .../omit-scoping-attribute-class-static/expected.html | 2 +- .../expected.html | 2 +- .../expected.html | 2 +- .../expected.html | 2 +- .../expected.html | 2 +- .../expected.html | 2 +- .../samples/omit-scoping-attribute-id/expected.html | 2 +- .../expected.html | 2 +- .../omit-scoping-attribute-whitespace/expected.html | 2 +- test/css/samples/omit-scoping-attribute/expected.html | 2 +- test/css/samples/refs-qualified/expected.html | 2 +- test/css/samples/refs/expected.html | 4 ++-- test/css/samples/unused-selector-leading/expected.html | 2 +- test/css/samples/unused-selector-ternary/expected.html | 2 +- test/css/samples/unused-selector/expected.html | 2 +- .../collapses-text-around-comments/expected-bundle.js | 10 +--------- .../samples/collapses-text-around-comments/expected.js | 8 ++------ test/js/samples/css-media-query/expected-bundle.js | 10 +--------- test/js/samples/css-media-query/expected.js | 8 ++------ .../samples/styles-nested/_actual.html | 6 +++--- .../samples/styles-nested/_expected.html | 6 +++--- test/server-side-rendering/samples/styles/_actual.html | 2 +- .../samples/styles/_expected.html | 2 +- 36 files changed, 44 insertions(+), 68 deletions(-) diff --git a/test/css/samples/cascade-false-universal-selector/expected.html b/test/css/samples/cascade-false-universal-selector/expected.html index e274b3e509..be0c650916 100644 --- a/test/css/samples/cascade-false-universal-selector/expected.html +++ b/test/css/samples/cascade-false-universal-selector/expected.html @@ -1 +1 @@ -
\ No newline at end of file +
\ No newline at end of file diff --git a/test/css/samples/combinator-child/expected.html b/test/css/samples/combinator-child/expected.html index c726b2b537..04af5650fe 100644 --- a/test/css/samples/combinator-child/expected.html +++ b/test/css/samples/combinator-child/expected.html @@ -1 +1 @@ -
Testing...
\ No newline at end of file +
Testing...
\ No newline at end of file diff --git a/test/css/samples/descendant-selector-non-top-level-outer/expected.html b/test/css/samples/descendant-selector-non-top-level-outer/expected.html index 042935653e..733f71343a 100644 --- a/test/css/samples/descendant-selector-non-top-level-outer/expected.html +++ b/test/css/samples/descendant-selector-non-top-level-outer/expected.html @@ -1 +1 @@ -

styled

\ No newline at end of file +

styled

\ No newline at end of file diff --git a/test/css/samples/omit-scoping-attribute-attribute-selector-contains/expected.html b/test/css/samples/omit-scoping-attribute-attribute-selector-contains/expected.html index c69d6b03c9..5f113a0b1d 100644 --- a/test/css/samples/omit-scoping-attribute-attribute-selector-contains/expected.html +++ b/test/css/samples/omit-scoping-attribute-attribute-selector-contains/expected.html @@ -1,2 +1,2 @@ -

this is styled

+

this is styled

this is unstyled

\ No newline at end of file diff --git a/test/css/samples/omit-scoping-attribute-attribute-selector-equals-case-insensitive/expected.html b/test/css/samples/omit-scoping-attribute-attribute-selector-equals-case-insensitive/expected.html index 4da16a0c2f..c09c637c8b 100644 --- a/test/css/samples/omit-scoping-attribute-attribute-selector-equals-case-insensitive/expected.html +++ b/test/css/samples/omit-scoping-attribute-attribute-selector-equals-case-insensitive/expected.html @@ -1,2 +1,2 @@ -

this is styled

+

this is styled

this is unstyled

\ No newline at end of file diff --git a/test/css/samples/omit-scoping-attribute-attribute-selector-equals-dynamic/expected.html b/test/css/samples/omit-scoping-attribute-attribute-selector-equals-dynamic/expected.html index f9cc8d8b5f..111d193a89 100644 --- a/test/css/samples/omit-scoping-attribute-attribute-selector-equals-dynamic/expected.html +++ b/test/css/samples/omit-scoping-attribute-attribute-selector-equals-dynamic/expected.html @@ -1,2 +1,2 @@ -

this is styled

+

this is styled

this is unstyled

\ No newline at end of file diff --git a/test/css/samples/omit-scoping-attribute-attribute-selector-equals/expected.html b/test/css/samples/omit-scoping-attribute-attribute-selector-equals/expected.html index 4579673c46..745d610a6f 100644 --- a/test/css/samples/omit-scoping-attribute-attribute-selector-equals/expected.html +++ b/test/css/samples/omit-scoping-attribute-attribute-selector-equals/expected.html @@ -1,2 +1,2 @@ -

this is styled

+

this is styled

this is unstyled

\ No newline at end of file diff --git a/test/css/samples/omit-scoping-attribute-attribute-selector-pipe-equals/expected.html b/test/css/samples/omit-scoping-attribute-attribute-selector-pipe-equals/expected.html index 37880da667..3045becd3b 100644 --- a/test/css/samples/omit-scoping-attribute-attribute-selector-pipe-equals/expected.html +++ b/test/css/samples/omit-scoping-attribute-attribute-selector-pipe-equals/expected.html @@ -1,3 +1,3 @@ -

this is styled

-

this is styled

+

this is styled

+

this is styled

this is unstyled

\ No newline at end of file diff --git a/test/css/samples/omit-scoping-attribute-attribute-selector-prefix/expected.html b/test/css/samples/omit-scoping-attribute-attribute-selector-prefix/expected.html index a929494570..7a54f45744 100644 --- a/test/css/samples/omit-scoping-attribute-attribute-selector-prefix/expected.html +++ b/test/css/samples/omit-scoping-attribute-attribute-selector-prefix/expected.html @@ -1,2 +1,2 @@ -

this is styled

+

this is styled

this is unstyled

\ No newline at end of file diff --git a/test/css/samples/omit-scoping-attribute-attribute-selector-suffix/expected.html b/test/css/samples/omit-scoping-attribute-attribute-selector-suffix/expected.html index 71abcb7fa5..ba757d0bf2 100644 --- a/test/css/samples/omit-scoping-attribute-attribute-selector-suffix/expected.html +++ b/test/css/samples/omit-scoping-attribute-attribute-selector-suffix/expected.html @@ -1,2 +1,2 @@

this is unstyled

-

this is styled

\ No newline at end of file +

this is styled

\ No newline at end of file diff --git a/test/css/samples/omit-scoping-attribute-attribute-selector-word-equals/expected.html b/test/css/samples/omit-scoping-attribute-attribute-selector-word-equals/expected.html index 64244097a2..49555ef404 100644 --- a/test/css/samples/omit-scoping-attribute-attribute-selector-word-equals/expected.html +++ b/test/css/samples/omit-scoping-attribute-attribute-selector-word-equals/expected.html @@ -1,2 +1,2 @@ -

this is styled

+

this is styled

this is unstyled

\ No newline at end of file diff --git a/test/css/samples/omit-scoping-attribute-attribute-selector/expected.html b/test/css/samples/omit-scoping-attribute-attribute-selector/expected.html index 6a5b104388..52175f98b6 100644 --- a/test/css/samples/omit-scoping-attribute-attribute-selector/expected.html +++ b/test/css/samples/omit-scoping-attribute-attribute-selector/expected.html @@ -1,2 +1,2 @@ -
+
\ No newline at end of file diff --git a/test/css/samples/omit-scoping-attribute-class-dynamic/expected.html b/test/css/samples/omit-scoping-attribute-class-dynamic/expected.html index c45e8d88a6..451140e6e1 100644 --- a/test/css/samples/omit-scoping-attribute-class-dynamic/expected.html +++ b/test/css/samples/omit-scoping-attribute-class-dynamic/expected.html @@ -1,2 +1,2 @@ -

this is styled

+

this is styled

this is unstyled

\ No newline at end of file diff --git a/test/css/samples/omit-scoping-attribute-class-static/expected.html b/test/css/samples/omit-scoping-attribute-class-static/expected.html index 24687444c4..7366cb3cfe 100644 --- a/test/css/samples/omit-scoping-attribute-class-static/expected.html +++ b/test/css/samples/omit-scoping-attribute-class-static/expected.html @@ -1,2 +1,2 @@ -

this is styled

+

this is styled

this is unstyled

\ No newline at end of file diff --git a/test/css/samples/omit-scoping-attribute-descendant-global-inner-class/expected.html b/test/css/samples/omit-scoping-attribute-descendant-global-inner-class/expected.html index bbe7db5946..cfad41216e 100644 --- a/test/css/samples/omit-scoping-attribute-descendant-global-inner-class/expected.html +++ b/test/css/samples/omit-scoping-attribute-descendant-global-inner-class/expected.html @@ -1 +1 @@ -
\ No newline at end of file +
\ No newline at end of file diff --git a/test/css/samples/omit-scoping-attribute-descendant-global-inner-multiple/expected.html b/test/css/samples/omit-scoping-attribute-descendant-global-inner-multiple/expected.html index e274b3e509..be0c650916 100644 --- a/test/css/samples/omit-scoping-attribute-descendant-global-inner-multiple/expected.html +++ b/test/css/samples/omit-scoping-attribute-descendant-global-inner-multiple/expected.html @@ -1 +1 @@ -
\ No newline at end of file +
\ No newline at end of file diff --git a/test/css/samples/omit-scoping-attribute-descendant-global-inner/expected.html b/test/css/samples/omit-scoping-attribute-descendant-global-inner/expected.html index e274b3e509..be0c650916 100644 --- a/test/css/samples/omit-scoping-attribute-descendant-global-inner/expected.html +++ b/test/css/samples/omit-scoping-attribute-descendant-global-inner/expected.html @@ -1 +1 @@ -
\ No newline at end of file +
\ No newline at end of file diff --git a/test/css/samples/omit-scoping-attribute-descendant-global-outer-multiple/expected.html b/test/css/samples/omit-scoping-attribute-descendant-global-outer-multiple/expected.html index c3b0783446..033f341a4b 100644 --- a/test/css/samples/omit-scoping-attribute-descendant-global-outer-multiple/expected.html +++ b/test/css/samples/omit-scoping-attribute-descendant-global-outer-multiple/expected.html @@ -1 +1 @@ -

this may or may not be styled

\ No newline at end of file +

this may or may not be styled

\ No newline at end of file diff --git a/test/css/samples/omit-scoping-attribute-descendant-global-outer/expected.html b/test/css/samples/omit-scoping-attribute-descendant-global-outer/expected.html index c3b0783446..033f341a4b 100644 --- a/test/css/samples/omit-scoping-attribute-descendant-global-outer/expected.html +++ b/test/css/samples/omit-scoping-attribute-descendant-global-outer/expected.html @@ -1 +1 @@ -

this may or may not be styled

\ No newline at end of file +

this may or may not be styled

\ No newline at end of file diff --git a/test/css/samples/omit-scoping-attribute-id/expected.html b/test/css/samples/omit-scoping-attribute-id/expected.html index cb6d2f2292..ce31b29b6e 100644 --- a/test/css/samples/omit-scoping-attribute-id/expected.html +++ b/test/css/samples/omit-scoping-attribute-id/expected.html @@ -1,2 +1,2 @@ -
+
\ No newline at end of file diff --git a/test/css/samples/omit-scoping-attribute-whitespace-multiple/expected.html b/test/css/samples/omit-scoping-attribute-whitespace-multiple/expected.html index 874ad34012..53c470b0c1 100644 --- a/test/css/samples/omit-scoping-attribute-whitespace-multiple/expected.html +++ b/test/css/samples/omit-scoping-attribute-whitespace-multiple/expected.html @@ -1 +1 @@ -

this is styled

\ No newline at end of file +

this is styled

\ No newline at end of file diff --git a/test/css/samples/omit-scoping-attribute-whitespace/expected.html b/test/css/samples/omit-scoping-attribute-whitespace/expected.html index 874ad34012..53c470b0c1 100644 --- a/test/css/samples/omit-scoping-attribute-whitespace/expected.html +++ b/test/css/samples/omit-scoping-attribute-whitespace/expected.html @@ -1 +1 @@ -

this is styled

\ No newline at end of file +

this is styled

\ No newline at end of file diff --git a/test/css/samples/omit-scoping-attribute/expected.html b/test/css/samples/omit-scoping-attribute/expected.html index 60c8d1ce9c..1bc4a66f62 100644 --- a/test/css/samples/omit-scoping-attribute/expected.html +++ b/test/css/samples/omit-scoping-attribute/expected.html @@ -1 +1 @@ -

this is styled

\ No newline at end of file +

this is styled

\ No newline at end of file diff --git a/test/css/samples/refs-qualified/expected.html b/test/css/samples/refs-qualified/expected.html index 8805a8a3a2..536bae83f8 100644 --- a/test/css/samples/refs-qualified/expected.html +++ b/test/css/samples/refs-qualified/expected.html @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/test/css/samples/refs/expected.html b/test/css/samples/refs/expected.html index cb16a55879..2b504628c3 100644 --- a/test/css/samples/refs/expected.html +++ b/test/css/samples/refs/expected.html @@ -1,3 +1,3 @@ -
-
+
+
\ No newline at end of file diff --git a/test/css/samples/unused-selector-leading/expected.html b/test/css/samples/unused-selector-leading/expected.html index 21f585b7e1..3f3d680596 100644 --- a/test/css/samples/unused-selector-leading/expected.html +++ b/test/css/samples/unused-selector-leading/expected.html @@ -1 +1 @@ -
\ No newline at end of file +
\ No newline at end of file diff --git a/test/css/samples/unused-selector-ternary/expected.html b/test/css/samples/unused-selector-ternary/expected.html index 5b0c6b6143..02fc551836 100644 --- a/test/css/samples/unused-selector-ternary/expected.html +++ b/test/css/samples/unused-selector-ternary/expected.html @@ -1 +1 @@ -
\ No newline at end of file +
\ No newline at end of file diff --git a/test/css/samples/unused-selector/expected.html b/test/css/samples/unused-selector/expected.html index bbe7db5946..cfad41216e 100644 --- a/test/css/samples/unused-selector/expected.html +++ b/test/css/samples/unused-selector/expected.html @@ -1 +1 @@ -
\ No newline at end of file +
\ No newline at end of file diff --git a/test/js/samples/collapses-text-around-comments/expected-bundle.js b/test/js/samples/collapses-text-around-comments/expected-bundle.js index 11cd7e4c0c..410e8c372a 100644 --- a/test/js/samples/collapses-text-around-comments/expected-bundle.js +++ b/test/js/samples/collapses-text-around-comments/expected-bundle.js @@ -33,10 +33,6 @@ function createText(data) { return document.createTextNode(data); } -function setAttribute(node, attribute, value) { - node.setAttribute(attribute, value); -} - function blankObject() { return Object.create(null); } @@ -198,10 +194,6 @@ function data() { return { foo: 42 } } -function encapsulateStyles(node) { - setAttribute(node, "svelte-2794052100", ""); -} - function add_css() { var style = createElement("style"); style.id = 'svelte-2794052100-style'; @@ -220,7 +212,7 @@ function create_main_fragment(component, state) { }, h: function hydrate() { - encapsulateStyles(p); + p.className = "svelte-2794052100"; }, m: function mount(target, anchor) { diff --git a/test/js/samples/collapses-text-around-comments/expected.js b/test/js/samples/collapses-text-around-comments/expected.js index e20a777271..92284fee0e 100644 --- a/test/js/samples/collapses-text-around-comments/expected.js +++ b/test/js/samples/collapses-text-around-comments/expected.js @@ -1,14 +1,10 @@ /* generated by Svelte vX.Y.Z */ -import { appendNode, assign, createElement, createText, detachNode, init, insertNode, noop, proto, setAttribute } from "svelte/shared.js"; +import { appendNode, assign, createElement, createText, detachNode, init, insertNode, noop, proto } from "svelte/shared.js"; function data() { return { foo: 42 } }; -function encapsulateStyles(node) { - setAttribute(node, "svelte-2794052100", ""); -} - function add_css() { var style = createElement("style"); style.id = 'svelte-2794052100-style'; @@ -27,7 +23,7 @@ function create_main_fragment(component, state) { }, h: function hydrate() { - encapsulateStyles(p); + p.className = "svelte-2794052100"; }, m: function mount(target, anchor) { diff --git a/test/js/samples/css-media-query/expected-bundle.js b/test/js/samples/css-media-query/expected-bundle.js index 7a6a2964e0..69474960bd 100644 --- a/test/js/samples/css-media-query/expected-bundle.js +++ b/test/js/samples/css-media-query/expected-bundle.js @@ -29,10 +29,6 @@ function createElement(name) { return document.createElement(name); } -function setAttribute(node, attribute, value) { - node.setAttribute(attribute, value); -} - function blankObject() { return Object.create(null); } @@ -190,10 +186,6 @@ var proto = { }; /* generated by Svelte vX.Y.Z */ -function encapsulateStyles(node) { - setAttribute(node, "svelte-3905933315", ""); -} - function add_css() { var style = createElement("style"); style.id = 'svelte-3905933315-style'; @@ -211,7 +203,7 @@ function create_main_fragment(component, state) { }, h: function hydrate() { - encapsulateStyles(div); + div.className = "svelte-3905933315"; }, m: function mount(target, anchor) { diff --git a/test/js/samples/css-media-query/expected.js b/test/js/samples/css-media-query/expected.js index 978a35d953..91b435832f 100644 --- a/test/js/samples/css-media-query/expected.js +++ b/test/js/samples/css-media-query/expected.js @@ -1,9 +1,5 @@ /* generated by Svelte vX.Y.Z */ -import { appendNode, assign, createElement, detachNode, init, insertNode, noop, proto, setAttribute } from "svelte/shared.js"; - -function encapsulateStyles(node) { - setAttribute(node, "svelte-3905933315", ""); -} +import { appendNode, assign, createElement, detachNode, init, insertNode, noop, proto } from "svelte/shared.js"; function add_css() { var style = createElement("style"); @@ -22,7 +18,7 @@ function create_main_fragment(component, state) { }, h: function hydrate() { - encapsulateStyles(div); + div.className = "svelte-3905933315"; }, m: function mount(target, anchor) { diff --git a/test/server-side-rendering/samples/styles-nested/_actual.html b/test/server-side-rendering/samples/styles-nested/_actual.html index 39dc0d55a4..d87b1743e7 100644 --- a/test/server-side-rendering/samples/styles-nested/_actual.html +++ b/test/server-side-rendering/samples/styles-nested/_actual.html @@ -1,8 +1,8 @@ -
red
-
green: foo
+
red
+
green: foo
-
green: bar
+
green: bar
diff --git a/test/server-side-rendering/samples/styles-nested/_expected.html b/test/server-side-rendering/samples/styles-nested/_expected.html index 39dc0d55a4..d87b1743e7 100644 --- a/test/server-side-rendering/samples/styles-nested/_expected.html +++ b/test/server-side-rendering/samples/styles-nested/_expected.html @@ -1,8 +1,8 @@ -
red
-
green: foo
+
red
+
green: foo
-
green: bar
+
green: bar
diff --git a/test/server-side-rendering/samples/styles/_actual.html b/test/server-side-rendering/samples/styles/_actual.html index ce71341c2f..ea3eca6de6 100644 --- a/test/server-side-rendering/samples/styles/_actual.html +++ b/test/server-side-rendering/samples/styles/_actual.html @@ -1 +1 @@ -
red
\ No newline at end of file +
red
\ No newline at end of file diff --git a/test/server-side-rendering/samples/styles/_expected.html b/test/server-side-rendering/samples/styles/_expected.html index ce71341c2f..ea3eca6de6 100644 --- a/test/server-side-rendering/samples/styles/_expected.html +++ b/test/server-side-rendering/samples/styles/_expected.html @@ -1 +1 @@ -
red
\ No newline at end of file +
red
\ No newline at end of file