mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
Removing Sky JS Framework tests
BUG= R=eseidel@chromium.org Review URL: https://codereview.chromium.org/1023213003
This commit is contained in:
parent
d06671f0ce
commit
3c70e47312
@ -1,20 +0,0 @@
|
||||
<style>
|
||||
.blue { border: 1px solid blue; }
|
||||
.orange { border: 1px solid orange; }
|
||||
.repeat { margin: 8px; }
|
||||
</style>
|
||||
<span style="color: red">10</span>
|
||||
<template repeat="{{ list }}"></template>
|
||||
<div class="blue repeat">first</div>
|
||||
<div class="orange repeat">second</div>
|
||||
<template if="{{ test }}"></template>
|
||||
Hello World
|
||||
<template if="{{ testFalse }}"></template>
|
||||
<template repeat="{{ nullInstances }}"></template>
|
||||
<div>10 test redblue test</div>
|
||||
<a href="http://www.google.com/">http://www.google.com/</a>
|
||||
<span on-test-event="handleTestEvent">
|
||||
<span id="target">Test event handler: event dispatch success</span>
|
||||
</span>
|
||||
<div class="[[ className ]]">[[ url ]]</div>
|
||||
|
||||
@ -1,66 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
|
||||
<import src="/sky/framework/dom-serializer.sky" as="DomSerializer" />
|
||||
<import src="/sky/framework/elements/sky-element/sky-binder.sky" as="binder" />
|
||||
|
||||
<div id="host"></div>
|
||||
|
||||
<template id="template">
|
||||
<style>
|
||||
.blue { border: 1px solid blue; }
|
||||
.orange { border: 1px solid orange; }
|
||||
.repeat { margin: 8px; }
|
||||
</style>
|
||||
<span style="color: {{ red }}">{{ value }}</span>
|
||||
<template repeat="{{ list }}">
|
||||
<div class="{{ className }} repeat">{{ item }}</div>
|
||||
</template>
|
||||
<template if="{{ test }}">
|
||||
Hello World
|
||||
</template>
|
||||
<template if="{{ testFalse }}">
|
||||
Should not be visible.
|
||||
</template>
|
||||
<template repeat="{{ nullInstances }}">
|
||||
Should not be visible.
|
||||
</template>
|
||||
<div>{{ value }} test {{ red }}{{ className }} test</div>
|
||||
<a href="{{ url }}">{{ url }}</a>
|
||||
<span on-test-event="handleTestEvent">
|
||||
<span id="target">Test event handler: </span>
|
||||
</span>
|
||||
<div class="[[ className ]]">[[ url ]]</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
window.addEventListener("load", function() {
|
||||
var template = document.getElementById('template');
|
||||
var host = document.getElementById('host');
|
||||
host.handleTestEvent = function(e) {
|
||||
e.target.appendChild(new Text("event dispatch success"));
|
||||
};
|
||||
window.model = {
|
||||
value: 10,
|
||||
test: true,
|
||||
testFalse: false,
|
||||
nullInstances: [null],
|
||||
url: "http://www.google.com/",
|
||||
red: "red",
|
||||
className: "blue",
|
||||
list: [{
|
||||
item: "first",
|
||||
className: "blue",
|
||||
}, {
|
||||
item: "second",
|
||||
className: "orange",
|
||||
}],
|
||||
};
|
||||
var instance = binder.createInstance(template, window.model);
|
||||
host.ensureShadowRoot().appendChild(instance.fragment);
|
||||
var target = host.shadowRoot.getElementById("target");
|
||||
target.dispatchEvent(new CustomEvent("test-event", {
|
||||
bubbles: true,
|
||||
}));
|
||||
internals.notifyTestComplete(DomSerializer.serializeNode(host.shadowRoot));
|
||||
});
|
||||
</script>
|
||||
@ -1,243 +0,0 @@
|
||||
layer at (0,0) size 800x600
|
||||
RenderView {#document} at (0,0) size 800x600
|
||||
layer at (0,0) size 800x0
|
||||
RenderBlock {html} at (0,0) size 800x0
|
||||
layer at (0,0) size 800x600
|
||||
RenderBlock (positioned) {city-list} at (0,0) size 800x600 [bgcolor=#FFFFFF]
|
||||
layer at (0,0) size 800x27
|
||||
RenderBlock (positioned) {state-header} at (0,0) size 800x27
|
||||
RenderParagraph {div} at (0,0) size 800x27 [color=#FFFFFF] [bgcolor=#333333]
|
||||
RenderText {#text} at (12,4) size 71x19
|
||||
text run at (12,4) width 71: "Alabama"
|
||||
layer at (0,543) size 800x20
|
||||
RenderBlock (positioned) {letter-header} at (0,543) size 800x20
|
||||
RenderParagraph {div} at (0,0) size 800x20 [bgcolor=#DDDDDD]
|
||||
RenderText {#text} at (12,2) size 9x14
|
||||
text run at (12,2) width 9: "C"
|
||||
layer at (0,375) size 800x20
|
||||
RenderBlock (positioned) {letter-header} at (0,375) size 800x20
|
||||
RenderParagraph {div} at (0,0) size 800x20 [bgcolor=#DDDDDD]
|
||||
RenderText {#text} at (12,2) size 10x14
|
||||
text run at (12,2) width 10: "B"
|
||||
layer at (0,27) size 800x20
|
||||
RenderBlock (positioned) {letter-header} at (0,27) size 800x20
|
||||
RenderParagraph {div} at (0,0) size 800x20 [bgcolor=#DDDDDD]
|
||||
RenderText {#text} at (12,2) size 10x14
|
||||
text run at (12,2) width 10: "A"
|
||||
layer at (0,591) size 800x28 backgroundClip at (0,591) size 800x9 clip at (0,591) size 800x9
|
||||
RenderFlexibleBox {city-item} at (0,591) size 800x28 [border: none (1px solid #EEEEEE) none]
|
||||
RenderParagraph {div} at (12,8) size 214.91x15
|
||||
RenderInline {span} at (0,0) size 92x15
|
||||
RenderText {#text} at (0,0) size 92x15
|
||||
text run at (0,0) width 92: "Center Point"
|
||||
RenderInline {t} at (0,0) size 10x15
|
||||
RenderText {#text} at (91,0) size 10x15
|
||||
text run at (91,0) width 10: ", "
|
||||
RenderInline {span} at (0,0) size 115x15 [color=#AAAAAA]
|
||||
RenderText {#text} at (100,0) size 115x15
|
||||
text run at (100,0) width 115: "population 15408"
|
||||
layer at (0,561) size 800x28 clip at (0,561) size 800x27
|
||||
RenderFlexibleBox {city-item} at (0,561) size 800x28 [border: none (1px solid #EEEEEE) none]
|
||||
RenderParagraph {div} at (12,8) size 169.70x15
|
||||
RenderInline {span} at (0,0) size 47x15
|
||||
RenderText {#text} at (0,0) size 47x15
|
||||
text run at (0,0) width 47: "Calera"
|
||||
RenderInline {t} at (0,0) size 10x15
|
||||
RenderText {#text} at (46,0) size 10x15
|
||||
text run at (46,0) width 10: ", "
|
||||
RenderInline {span} at (0,0) size 115x15 [color=#AAAAAA]
|
||||
RenderText {#text} at (55,0) size 115x15
|
||||
text run at (55,0) width 115: "population 10742"
|
||||
layer at (0,513) size 800x28 clip at (0,513) size 800x27
|
||||
RenderFlexibleBox {city-item} at (0,513) size 800x28 [border: none (1px solid #EEEEEE) none]
|
||||
RenderParagraph {div} at (12,8) size 176.22x15
|
||||
RenderInline {span} at (0,0) size 62x15
|
||||
RenderText {#text} at (0,0) size 62x15
|
||||
text run at (0,0) width 62: "Brewton"
|
||||
RenderInline {t} at (0,0) size 9x15
|
||||
RenderText {#text} at (61,0) size 9x15
|
||||
text run at (61,0) width 9: ", "
|
||||
RenderInline {span} at (0,0) size 108x15 [color=#AAAAAA]
|
||||
RenderText {#text} at (69,0) size 108x15
|
||||
text run at (69,0) width 108: "population 5279"
|
||||
layer at (0,483) size 800x28 clip at (0,483) size 800x27
|
||||
RenderFlexibleBox {city-item} at (0,483) size 800x28 [border: none (1px solid #EEEEEE) none]
|
||||
RenderParagraph {div} at (12,8) size 149.84x15
|
||||
RenderInline {span} at (0,0) size 36x15
|
||||
RenderText {#text} at (0,0) size 36x15
|
||||
text run at (0,0) width 36: "Boaz"
|
||||
RenderInline {t} at (0,0) size 9x15
|
||||
RenderText {#text} at (35,0) size 9x15
|
||||
text run at (35,0) width 9: ", "
|
||||
RenderInline {span} at (0,0) size 107x15 [color=#AAAAAA]
|
||||
RenderText {#text} at (43,0) size 107x15
|
||||
text run at (43,0) width 107: "population 8349"
|
||||
layer at (0,453) size 800x28 clip at (0,453) size 800x27
|
||||
RenderFlexibleBox {city-item} at (0,453) size 800x28 [border: none (1px solid #EEEEEE) none]
|
||||
RenderParagraph {div} at (12,8) size 220.13x15
|
||||
RenderInline {span} at (0,0) size 89x15
|
||||
RenderText {#text} at (0,0) size 89x15
|
||||
text run at (0,0) width 89: "Birmingham"
|
||||
RenderInline {t} at (0,0) size 10x15
|
||||
RenderText {#text} at (88,0) size 10x15
|
||||
text run at (88,0) width 10: ", "
|
||||
RenderInline {span} at (0,0) size 124x15 [color=#AAAAAA]
|
||||
RenderText {#text} at (97,0) size 124x15
|
||||
text run at (97,0) width 124: "population 228798"
|
||||
layer at (0,423) size 800x28 clip at (0,423) size 800x27
|
||||
RenderFlexibleBox {city-item} at (0,423) size 800x28 [border: none (1px solid #EEEEEE) none]
|
||||
RenderParagraph {div} at (12,8) size 194.73x15
|
||||
RenderInline {span} at (0,0) size 72x15
|
||||
RenderText {#text} at (0,0) size 72x15
|
||||
text run at (0,0) width 72: "Bessemer"
|
||||
RenderInline {t} at (0,0) size 10x15
|
||||
RenderText {#text} at (71,0) size 10x15
|
||||
text run at (71,0) width 10: ", "
|
||||
RenderInline {span} at (0,0) size 115x15 [color=#AAAAAA]
|
||||
RenderText {#text} at (80,0) size 115x15
|
||||
text run at (80,0) width 115: "population 28542"
|
||||
layer at (0,393) size 800x28 clip at (0,393) size 800x27
|
||||
RenderFlexibleBox {city-item} at (0,393) size 800x28 [border: none (1px solid #EEEEEE) none]
|
||||
RenderParagraph {div} at (12,8) size 203.06x15
|
||||
RenderInline {span} at (0,0) size 89x15
|
||||
RenderText {#text} at (0,0) size 89x15
|
||||
text run at (0,0) width 89: "Bay Minette"
|
||||
RenderInline {t} at (0,0) size 9x15
|
||||
RenderText {#text} at (88,0) size 9x15
|
||||
text run at (88,0) width 9: ", "
|
||||
RenderInline {span} at (0,0) size 108x15 [color=#AAAAAA]
|
||||
RenderText {#text} at (96,0) size 108x15
|
||||
text run at (96,0) width 108: "population 8043"
|
||||
layer at (0,345) size 800x28 clip at (0,345) size 800x27
|
||||
RenderFlexibleBox {city-item} at (0,345) size 800x28 [border: none (1px solid #EEEEEE) none]
|
||||
RenderParagraph {div} at (12,8) size 176.48x15
|
||||
RenderInline {span} at (0,0) size 54x15
|
||||
RenderText {#text} at (0,0) size 54x15
|
||||
text run at (0,0) width 54: "Auburn"
|
||||
RenderInline {t} at (0,0) size 9x15
|
||||
RenderText {#text} at (53,0) size 9x15
|
||||
text run at (53,0) width 9: ", "
|
||||
RenderInline {span} at (0,0) size 116x15 [color=#AAAAAA]
|
||||
RenderText {#text} at (61,0) size 116x15
|
||||
text run at (61,0) width 116: "population 56088"
|
||||
layer at (0,315) size 800x28 clip at (0,315) size 800x27
|
||||
RenderFlexibleBox {city-item} at (0,315) size 800x28 [border: none (1px solid #EEEEEE) none]
|
||||
RenderParagraph {div} at (12,8) size 163.61x15
|
||||
RenderInline {span} at (0,0) size 49x15
|
||||
RenderText {#text} at (0,0) size 49x15
|
||||
text run at (0,0) width 49: "Attalla"
|
||||
RenderInline {t} at (0,0) size 10x15
|
||||
RenderText {#text} at (48,0) size 10x15
|
||||
text run at (48,0) width 10: ", "
|
||||
RenderInline {span} at (0,0) size 107x15 [color=#AAAAAA]
|
||||
RenderText {#text} at (57,0) size 107x15
|
||||
text run at (57,0) width 107: "population 6540"
|
||||
layer at (0,285) size 800x28 clip at (0,285) size 800x27
|
||||
RenderFlexibleBox {city-item} at (0,285) size 800x28 [border: none (1px solid #EEEEEE) none]
|
||||
RenderParagraph {div} at (12,8) size 168.64x15
|
||||
RenderInline {span} at (0,0) size 54x15
|
||||
RenderText {#text} at (0,0) size 54x15
|
||||
text run at (0,0) width 54: "Atmore"
|
||||
RenderInline {t} at (0,0) size 10x15
|
||||
RenderText {#text} at (53,0) size 10x15
|
||||
text run at (53,0) width 10: ", "
|
||||
RenderInline {span} at (0,0) size 107x15 [color=#AAAAAA]
|
||||
RenderText {#text} at (62,0) size 107x15
|
||||
text run at (62,0) width 107: "population 7428"
|
||||
layer at (0,255) size 800x28 clip at (0,255) size 800x27
|
||||
RenderFlexibleBox {city-item} at (0,255) size 800x28 [border: none (1px solid #EEEEEE) none]
|
||||
RenderParagraph {div} at (12,8) size 174.28x15
|
||||
RenderInline {span} at (0,0) size 52x15
|
||||
RenderText {#text} at (0,0) size 52x15
|
||||
text run at (0,0) width 52: "Athens"
|
||||
RenderInline {t} at (0,0) size 9x15
|
||||
RenderText {#text} at (51,0) size 9x15
|
||||
text run at (51,0) width 9: ", "
|
||||
RenderInline {span} at (0,0) size 116x15 [color=#AAAAAA]
|
||||
RenderText {#text} at (59,0) size 116x15
|
||||
text run at (59,0) width 116: "population 23715"
|
||||
layer at (0,225) size 800x28 clip at (0,225) size 800x27
|
||||
RenderFlexibleBox {city-item} at (0,225) size 800x28 [border: none (1px solid #EEEEEE) none]
|
||||
RenderParagraph {div} at (12,8) size 149.22x15
|
||||
RenderInline {span} at (0,0) size 35x15
|
||||
RenderText {#text} at (0,0) size 35x15
|
||||
text run at (0,0) width 35: "Arab"
|
||||
RenderInline {t} at (0,0) size 9x15
|
||||
RenderText {#text} at (34,0) size 9x15
|
||||
text run at (34,0) width 9: ", "
|
||||
RenderInline {span} at (0,0) size 108x15 [color=#AAAAAA]
|
||||
RenderText {#text} at (42,0) size 108x15
|
||||
text run at (42,0) width 108: "population 7924"
|
||||
layer at (0,195) size 800x28 clip at (0,195) size 800x27
|
||||
RenderFlexibleBox {city-item} at (0,195) size 800x28 [border: none (1px solid #EEEEEE) none]
|
||||
RenderParagraph {div} at (12,8) size 188.09x15
|
||||
RenderInline {span} at (0,0) size 66x15
|
||||
RenderText {#text} at (0,0) size 66x15
|
||||
text run at (0,0) width 66: "Anniston"
|
||||
RenderInline {t} at (0,0) size 9x15
|
||||
RenderText {#text} at (65,0) size 9x15
|
||||
text run at (65,0) width 9: ", "
|
||||
RenderInline {span} at (0,0) size 116x15 [color=#AAAAAA]
|
||||
RenderText {#text} at (73,0) size 116x15
|
||||
text run at (73,0) width 116: "population 23662"
|
||||
layer at (0,165) size 800x28 clip at (0,165) size 800x27
|
||||
RenderFlexibleBox {city-item} at (0,165) size 800x28 [border: none (1px solid #EEEEEE) none]
|
||||
RenderParagraph {div} at (12,8) size 186.73x15
|
||||
RenderInline {span} at (0,0) size 73x15
|
||||
RenderText {#text} at (0,0) size 73x15
|
||||
text run at (0,0) width 73: "Andalusia"
|
||||
RenderInline {t} at (0,0) size 9x15
|
||||
RenderText {#text} at (72,0) size 9x15
|
||||
text run at (72,0) width 9: ", "
|
||||
RenderInline {span} at (0,0) size 107x15 [color=#AAAAAA]
|
||||
RenderText {#text} at (80,0) size 107x15
|
||||
text run at (80,0) width 107: "population 8978"
|
||||
layer at (0,135) size 800x28 clip at (0,135) size 800x27
|
||||
RenderFlexibleBox {city-item} at (0,135) size 800x28 [border: none (1px solid #EEEEEE) none]
|
||||
RenderParagraph {div} at (12,8) size 230.42x15
|
||||
RenderInline {span} at (0,0) size 108x15
|
||||
RenderText {#text} at (0,0) size 108x15
|
||||
text run at (0,0) width 108: "Alexander City"
|
||||
RenderInline {t} at (0,0) size 9x15
|
||||
RenderText {#text} at (107,0) size 9x15
|
||||
text run at (107,0) width 9: ", "
|
||||
RenderInline {span} at (0,0) size 116x15 [color=#AAAAAA]
|
||||
RenderText {#text} at (115,0) size 116x15
|
||||
text run at (115,0) width 116: "population 15080"
|
||||
layer at (0,105) size 800x28 clip at (0,105) size 800x27
|
||||
RenderFlexibleBox {city-item} at (0,105) size 800x28 [border: none (1px solid #EEEEEE) none]
|
||||
RenderParagraph {div} at (12,8) size 198.86x15
|
||||
RenderInline {span} at (0,0) size 76x15
|
||||
RenderText {#text} at (0,0) size 76x15
|
||||
text run at (0,0) width 76: "Albertville"
|
||||
RenderInline {t} at (0,0) size 10x15
|
||||
RenderText {#text} at (75,0) size 10x15
|
||||
text run at (75,0) width 10: ", "
|
||||
RenderInline {span} at (0,0) size 115x15 [color=#AAAAAA]
|
||||
RenderText {#text} at (84,0) size 115x15
|
||||
text run at (84,0) width 115: "population 19794"
|
||||
layer at (0,75) size 800x28 clip at (0,75) size 800x27
|
||||
RenderFlexibleBox {city-item} at (0,75) size 800x28 [border: none (1px solid #EEEEEE) none]
|
||||
RenderParagraph {div} at (12,8) size 193.48x15
|
||||
RenderInline {span} at (0,0) size 71x15
|
||||
RenderText {#text} at (0,0) size 71x15
|
||||
text run at (0,0) width 71: "Alabaster"
|
||||
RenderInline {t} at (0,0) size 9x15
|
||||
RenderText {#text} at (70,0) size 9x15
|
||||
text run at (70,0) width 9: ", "
|
||||
RenderInline {span} at (0,0) size 116x15 [color=#AAAAAA]
|
||||
RenderText {#text} at (78,0) size 116x15
|
||||
text run at (78,0) width 116: "population 29352"
|
||||
layer at (0,45) size 800x28 clip at (0,45) size 800x27
|
||||
RenderFlexibleBox {city-item} at (0,45) size 800x28 [border: none (1px solid #EEEEEE) none]
|
||||
RenderParagraph {div} at (12,8) size 194.75x15
|
||||
RenderInline {span} at (0,0) size 81x15
|
||||
RenderText {#text} at (0,0) size 81x15
|
||||
text run at (0,0) width 81: "Adamsville"
|
||||
RenderInline {t} at (0,0) size 9x15
|
||||
RenderText {#text} at (80,0) size 9x15
|
||||
text run at (80,0) width 9: ", "
|
||||
RenderInline {span} at (0,0) size 107x15 [color=#AAAAAA]
|
||||
RenderText {#text} at (88,0) size 107x15
|
||||
text run at (88,0) width 107: "population 4739"
|
||||
|
||||
@ -1,243 +0,0 @@
|
||||
layer at (0,0) size 800x600
|
||||
RenderView {#document} at (0,0) size 800x600
|
||||
layer at (0,0) size 800x0
|
||||
RenderBlock {html} at (0,0) size 800x0
|
||||
layer at (0,0) size 800x600
|
||||
RenderBlock (positioned) {city-list} at (0,0) size 800x600 [bgcolor=#FFFFFF]
|
||||
layer at (0,0) size 800x27
|
||||
RenderBlock (positioned) {state-header} at (0,0) size 800x27
|
||||
RenderParagraph {div} at (0,0) size 800x27 [color=#FFFFFF] [bgcolor=#333333]
|
||||
RenderText {#text} at (12,4) size 71x19
|
||||
text run at (12,4) width 71: "Alabama"
|
||||
layer at (0,543) size 800x20
|
||||
RenderBlock (positioned) {letter-header} at (0,543) size 800x20
|
||||
RenderParagraph {div} at (0,0) size 800x20 [bgcolor=#DDDDDD]
|
||||
RenderText {#text} at (12,2) size 9x14
|
||||
text run at (12,2) width 9: "C"
|
||||
layer at (0,375) size 800x20
|
||||
RenderBlock (positioned) {letter-header} at (0,375) size 800x20
|
||||
RenderParagraph {div} at (0,0) size 800x20 [bgcolor=#DDDDDD]
|
||||
RenderText {#text} at (12,2) size 10x14
|
||||
text run at (12,2) width 10: "B"
|
||||
layer at (0,27) size 800x20
|
||||
RenderBlock (positioned) {letter-header} at (0,27) size 800x20
|
||||
RenderParagraph {div} at (0,0) size 800x20 [bgcolor=#DDDDDD]
|
||||
RenderText {#text} at (12,2) size 10x14
|
||||
text run at (12,2) width 10: "A"
|
||||
layer at (0,591) size 800x28 backgroundClip at (0,591) size 800x9 clip at (0,591) size 800x9
|
||||
RenderFlexibleBox {city-item} at (0,591) size 800x28 [border: none (1px solid #EEEEEE) none]
|
||||
RenderParagraph {div} at (12,8) size 214.91x15
|
||||
RenderInline {span} at (0,0) size 92x15
|
||||
RenderText {#text} at (0,0) size 92x15
|
||||
text run at (0,0) width 92: "Center Point"
|
||||
RenderInline {t} at (0,0) size 10x15
|
||||
RenderText {#text} at (91,0) size 10x15
|
||||
text run at (91,0) width 10: ", "
|
||||
RenderInline {span} at (0,0) size 115x15 [color=#AAAAAA]
|
||||
RenderText {#text} at (100,0) size 115x15
|
||||
text run at (100,0) width 115: "population 15408"
|
||||
layer at (0,561) size 800x28 clip at (0,561) size 800x27
|
||||
RenderFlexibleBox {city-item} at (0,561) size 800x28 [border: none (1px solid #EEEEEE) none]
|
||||
RenderParagraph {div} at (12,8) size 169.70x15
|
||||
RenderInline {span} at (0,0) size 47x15
|
||||
RenderText {#text} at (0,0) size 47x15
|
||||
text run at (0,0) width 47: "Calera"
|
||||
RenderInline {t} at (0,0) size 10x15
|
||||
RenderText {#text} at (46,0) size 10x15
|
||||
text run at (46,0) width 10: ", "
|
||||
RenderInline {span} at (0,0) size 115x15 [color=#AAAAAA]
|
||||
RenderText {#text} at (55,0) size 115x15
|
||||
text run at (55,0) width 115: "population 10742"
|
||||
layer at (0,513) size 800x28 clip at (0,513) size 800x27
|
||||
RenderFlexibleBox {city-item} at (0,513) size 800x28 [border: none (1px solid #EEEEEE) none]
|
||||
RenderParagraph {div} at (12,8) size 176.22x15
|
||||
RenderInline {span} at (0,0) size 62x15
|
||||
RenderText {#text} at (0,0) size 62x15
|
||||
text run at (0,0) width 62: "Brewton"
|
||||
RenderInline {t} at (0,0) size 9x15
|
||||
RenderText {#text} at (61,0) size 9x15
|
||||
text run at (61,0) width 9: ", "
|
||||
RenderInline {span} at (0,0) size 108x15 [color=#AAAAAA]
|
||||
RenderText {#text} at (69,0) size 108x15
|
||||
text run at (69,0) width 108: "population 5279"
|
||||
layer at (0,483) size 800x28 clip at (0,483) size 800x27
|
||||
RenderFlexibleBox {city-item} at (0,483) size 800x28 [border: none (1px solid #EEEEEE) none]
|
||||
RenderParagraph {div} at (12,8) size 149.84x15
|
||||
RenderInline {span} at (0,0) size 36x15
|
||||
RenderText {#text} at (0,0) size 36x15
|
||||
text run at (0,0) width 36: "Boaz"
|
||||
RenderInline {t} at (0,0) size 9x15
|
||||
RenderText {#text} at (35,0) size 9x15
|
||||
text run at (35,0) width 9: ", "
|
||||
RenderInline {span} at (0,0) size 107x15 [color=#AAAAAA]
|
||||
RenderText {#text} at (43,0) size 107x15
|
||||
text run at (43,0) width 107: "population 8349"
|
||||
layer at (0,453) size 800x28 clip at (0,453) size 800x27
|
||||
RenderFlexibleBox {city-item} at (0,453) size 800x28 [border: none (1px solid #EEEEEE) none]
|
||||
RenderParagraph {div} at (12,8) size 220.13x15
|
||||
RenderInline {span} at (0,0) size 89x15
|
||||
RenderText {#text} at (0,0) size 89x15
|
||||
text run at (0,0) width 89: "Birmingham"
|
||||
RenderInline {t} at (0,0) size 10x15
|
||||
RenderText {#text} at (88,0) size 10x15
|
||||
text run at (88,0) width 10: ", "
|
||||
RenderInline {span} at (0,0) size 124x15 [color=#AAAAAA]
|
||||
RenderText {#text} at (97,0) size 124x15
|
||||
text run at (97,0) width 124: "population 228798"
|
||||
layer at (0,423) size 800x28 clip at (0,423) size 800x27
|
||||
RenderFlexibleBox {city-item} at (0,423) size 800x28 [border: none (1px solid #EEEEEE) none]
|
||||
RenderParagraph {div} at (12,8) size 194.73x15
|
||||
RenderInline {span} at (0,0) size 72x15
|
||||
RenderText {#text} at (0,0) size 72x15
|
||||
text run at (0,0) width 72: "Bessemer"
|
||||
RenderInline {t} at (0,0) size 10x15
|
||||
RenderText {#text} at (71,0) size 10x15
|
||||
text run at (71,0) width 10: ", "
|
||||
RenderInline {span} at (0,0) size 115x15 [color=#AAAAAA]
|
||||
RenderText {#text} at (80,0) size 115x15
|
||||
text run at (80,0) width 115: "population 28542"
|
||||
layer at (0,393) size 800x28 clip at (0,393) size 800x27
|
||||
RenderFlexibleBox {city-item} at (0,393) size 800x28 [border: none (1px solid #EEEEEE) none]
|
||||
RenderParagraph {div} at (12,8) size 203.06x15
|
||||
RenderInline {span} at (0,0) size 89x15
|
||||
RenderText {#text} at (0,0) size 89x15
|
||||
text run at (0,0) width 89: "Bay Minette"
|
||||
RenderInline {t} at (0,0) size 9x15
|
||||
RenderText {#text} at (88,0) size 9x15
|
||||
text run at (88,0) width 9: ", "
|
||||
RenderInline {span} at (0,0) size 108x15 [color=#AAAAAA]
|
||||
RenderText {#text} at (96,0) size 108x15
|
||||
text run at (96,0) width 108: "population 8043"
|
||||
layer at (0,345) size 800x28 clip at (0,345) size 800x27
|
||||
RenderFlexibleBox {city-item} at (0,345) size 800x28 [border: none (1px solid #EEEEEE) none]
|
||||
RenderParagraph {div} at (12,8) size 176.48x15
|
||||
RenderInline {span} at (0,0) size 54x15
|
||||
RenderText {#text} at (0,0) size 54x15
|
||||
text run at (0,0) width 54: "Auburn"
|
||||
RenderInline {t} at (0,0) size 9x15
|
||||
RenderText {#text} at (53,0) size 9x15
|
||||
text run at (53,0) width 9: ", "
|
||||
RenderInline {span} at (0,0) size 116x15 [color=#AAAAAA]
|
||||
RenderText {#text} at (61,0) size 116x15
|
||||
text run at (61,0) width 116: "population 56088"
|
||||
layer at (0,315) size 800x28 clip at (0,315) size 800x27
|
||||
RenderFlexibleBox {city-item} at (0,315) size 800x28 [border: none (1px solid #EEEEEE) none]
|
||||
RenderParagraph {div} at (12,8) size 163.61x15
|
||||
RenderInline {span} at (0,0) size 49x15
|
||||
RenderText {#text} at (0,0) size 49x15
|
||||
text run at (0,0) width 49: "Attalla"
|
||||
RenderInline {t} at (0,0) size 10x15
|
||||
RenderText {#text} at (48,0) size 10x15
|
||||
text run at (48,0) width 10: ", "
|
||||
RenderInline {span} at (0,0) size 107x15 [color=#AAAAAA]
|
||||
RenderText {#text} at (57,0) size 107x15
|
||||
text run at (57,0) width 107: "population 6540"
|
||||
layer at (0,285) size 800x28 clip at (0,285) size 800x27
|
||||
RenderFlexibleBox {city-item} at (0,285) size 800x28 [border: none (1px solid #EEEEEE) none]
|
||||
RenderParagraph {div} at (12,8) size 168.64x15
|
||||
RenderInline {span} at (0,0) size 54x15
|
||||
RenderText {#text} at (0,0) size 54x15
|
||||
text run at (0,0) width 54: "Atmore"
|
||||
RenderInline {t} at (0,0) size 10x15
|
||||
RenderText {#text} at (53,0) size 10x15
|
||||
text run at (53,0) width 10: ", "
|
||||
RenderInline {span} at (0,0) size 107x15 [color=#AAAAAA]
|
||||
RenderText {#text} at (62,0) size 107x15
|
||||
text run at (62,0) width 107: "population 7428"
|
||||
layer at (0,255) size 800x28 clip at (0,255) size 800x27
|
||||
RenderFlexibleBox {city-item} at (0,255) size 800x28 [border: none (1px solid #EEEEEE) none]
|
||||
RenderParagraph {div} at (12,8) size 174.28x15
|
||||
RenderInline {span} at (0,0) size 52x15
|
||||
RenderText {#text} at (0,0) size 52x15
|
||||
text run at (0,0) width 52: "Athens"
|
||||
RenderInline {t} at (0,0) size 9x15
|
||||
RenderText {#text} at (51,0) size 9x15
|
||||
text run at (51,0) width 9: ", "
|
||||
RenderInline {span} at (0,0) size 116x15 [color=#AAAAAA]
|
||||
RenderText {#text} at (59,0) size 116x15
|
||||
text run at (59,0) width 116: "population 23715"
|
||||
layer at (0,225) size 800x28 clip at (0,225) size 800x27
|
||||
RenderFlexibleBox {city-item} at (0,225) size 800x28 [border: none (1px solid #EEEEEE) none]
|
||||
RenderParagraph {div} at (12,8) size 149.22x15
|
||||
RenderInline {span} at (0,0) size 35x15
|
||||
RenderText {#text} at (0,0) size 35x15
|
||||
text run at (0,0) width 35: "Arab"
|
||||
RenderInline {t} at (0,0) size 9x15
|
||||
RenderText {#text} at (34,0) size 9x15
|
||||
text run at (34,0) width 9: ", "
|
||||
RenderInline {span} at (0,0) size 108x15 [color=#AAAAAA]
|
||||
RenderText {#text} at (42,0) size 108x15
|
||||
text run at (42,0) width 108: "population 7924"
|
||||
layer at (0,195) size 800x28 clip at (0,195) size 800x27
|
||||
RenderFlexibleBox {city-item} at (0,195) size 800x28 [border: none (1px solid #EEEEEE) none]
|
||||
RenderParagraph {div} at (12,8) size 188.09x15
|
||||
RenderInline {span} at (0,0) size 66x15
|
||||
RenderText {#text} at (0,0) size 66x15
|
||||
text run at (0,0) width 66: "Anniston"
|
||||
RenderInline {t} at (0,0) size 9x15
|
||||
RenderText {#text} at (65,0) size 9x15
|
||||
text run at (65,0) width 9: ", "
|
||||
RenderInline {span} at (0,0) size 116x15 [color=#AAAAAA]
|
||||
RenderText {#text} at (73,0) size 116x15
|
||||
text run at (73,0) width 116: "population 23662"
|
||||
layer at (0,165) size 800x28 clip at (0,165) size 800x27
|
||||
RenderFlexibleBox {city-item} at (0,165) size 800x28 [border: none (1px solid #EEEEEE) none]
|
||||
RenderParagraph {div} at (12,8) size 186.73x15
|
||||
RenderInline {span} at (0,0) size 73x15
|
||||
RenderText {#text} at (0,0) size 73x15
|
||||
text run at (0,0) width 73: "Andalusia"
|
||||
RenderInline {t} at (0,0) size 9x15
|
||||
RenderText {#text} at (72,0) size 9x15
|
||||
text run at (72,0) width 9: ", "
|
||||
RenderInline {span} at (0,0) size 107x15 [color=#AAAAAA]
|
||||
RenderText {#text} at (80,0) size 107x15
|
||||
text run at (80,0) width 107: "population 8978"
|
||||
layer at (0,135) size 800x28 clip at (0,135) size 800x27
|
||||
RenderFlexibleBox {city-item} at (0,135) size 800x28 [border: none (1px solid #EEEEEE) none]
|
||||
RenderParagraph {div} at (12,8) size 230.42x15
|
||||
RenderInline {span} at (0,0) size 108x15
|
||||
RenderText {#text} at (0,0) size 108x15
|
||||
text run at (0,0) width 108: "Alexander City"
|
||||
RenderInline {t} at (0,0) size 9x15
|
||||
RenderText {#text} at (107,0) size 9x15
|
||||
text run at (107,0) width 9: ", "
|
||||
RenderInline {span} at (0,0) size 116x15 [color=#AAAAAA]
|
||||
RenderText {#text} at (115,0) size 116x15
|
||||
text run at (115,0) width 116: "population 15080"
|
||||
layer at (0,105) size 800x28 clip at (0,105) size 800x27
|
||||
RenderFlexibleBox {city-item} at (0,105) size 800x28 [border: none (1px solid #EEEEEE) none]
|
||||
RenderParagraph {div} at (12,8) size 198.86x15
|
||||
RenderInline {span} at (0,0) size 76x15
|
||||
RenderText {#text} at (0,0) size 76x15
|
||||
text run at (0,0) width 76: "Albertville"
|
||||
RenderInline {t} at (0,0) size 10x15
|
||||
RenderText {#text} at (75,0) size 10x15
|
||||
text run at (75,0) width 10: ", "
|
||||
RenderInline {span} at (0,0) size 115x15 [color=#AAAAAA]
|
||||
RenderText {#text} at (84,0) size 115x15
|
||||
text run at (84,0) width 115: "population 19794"
|
||||
layer at (0,75) size 800x28 clip at (0,75) size 800x27
|
||||
RenderFlexibleBox {city-item} at (0,75) size 800x28 [border: none (1px solid #EEEEEE) none]
|
||||
RenderParagraph {div} at (12,8) size 193.48x15
|
||||
RenderInline {span} at (0,0) size 71x15
|
||||
RenderText {#text} at (0,0) size 71x15
|
||||
text run at (0,0) width 71: "Alabaster"
|
||||
RenderInline {t} at (0,0) size 9x15
|
||||
RenderText {#text} at (70,0) size 9x15
|
||||
text run at (70,0) width 9: ", "
|
||||
RenderInline {span} at (0,0) size 116x15 [color=#AAAAAA]
|
||||
RenderText {#text} at (78,0) size 116x15
|
||||
text run at (78,0) width 116: "population 29352"
|
||||
layer at (0,45) size 800x28 clip at (0,45) size 800x27
|
||||
RenderFlexibleBox {city-item} at (0,45) size 800x28 [border: none (1px solid #EEEEEE) none]
|
||||
RenderParagraph {div} at (12,8) size 194.75x15
|
||||
RenderInline {span} at (0,0) size 81x15
|
||||
RenderText {#text} at (0,0) size 81x15
|
||||
text run at (0,0) width 81: "Adamsville"
|
||||
RenderInline {t} at (0,0) size 9x15
|
||||
RenderText {#text} at (80,0) size 9x15
|
||||
text run at (80,0) width 9: ", "
|
||||
RenderInline {span} at (0,0) size 107x15 [color=#AAAAAA]
|
||||
RenderText {#text} at (88,0) size 107x15
|
||||
text run at (88,0) width 107: "population 4739"
|
||||
|
||||
@ -1,18 +0,0 @@
|
||||
<html>
|
||||
<import src="/sky/examples/city-list/city-list.sky" />
|
||||
<city-list></city-list>
|
||||
<script>
|
||||
var cityList = document.querySelector('city-list');
|
||||
var scrolled = false
|
||||
cityList.addEventListener('load', function() {
|
||||
if (scrolled) {
|
||||
internals.notifyTestComplete(internals.renderTreeAsText());
|
||||
} else {
|
||||
scrolled = true;
|
||||
setTimeout(function() {
|
||||
cityList.scrollBy(200);
|
||||
}, 0);
|
||||
}
|
||||
});
|
||||
</script>
|
||||
</html>
|
||||
@ -1,10 +0,0 @@
|
||||
<html>
|
||||
<import src="/sky/examples/city-list/city-list.sky" />
|
||||
<city-list></city-list>
|
||||
<script>
|
||||
var cityList = document.querySelector('city-list');
|
||||
cityList.addEventListener('load', function() {
|
||||
internals.notifyTestComplete(internals.renderTreeAsText());
|
||||
});
|
||||
</script>
|
||||
</html>
|
||||
@ -1,169 +0,0 @@
|
||||
layer at (0,0) size 800x663
|
||||
RenderView {#document} at (0,0) size 800x600
|
||||
layer at (0,0) size 800x663
|
||||
RenderBlock {sky} at (0,0) size 800x663
|
||||
RenderFlexibleBox {flights-app} at (0,0) size 800x663 [color=#2B2B2B] [bgcolor=#494949]
|
||||
RenderFlexibleBox {app-header} at (0,0) size 800x47 [color=#FFFFFF] [border: none (1px solid #3E77B7) none]
|
||||
RenderFlexibleBox {app-title} at (16,8) size 746x30
|
||||
RenderBlock {t} at (0,2) size 69.72x26
|
||||
RenderParagraph (anonymous) at (0,0) size 69.72x26
|
||||
RenderText {#text} at (0,0) size 70x25
|
||||
text run at (0,0) width 70: "Search"
|
||||
RenderFlexibleBox {app-menu-button} at (762,8) size 30x30
|
||||
RenderImage {img} at (6,-0.50) size 18x31
|
||||
RenderBlock {app-toolbar} at (0,47) size 800x30 [bgcolor=#F6F6F6]
|
||||
RenderFlexibleBox {app-search-input} at (8,0) size 784x30
|
||||
RenderBlock {span} at (4,7) size 16x16
|
||||
RenderImage {img} at (0,0) size 16x16
|
||||
RenderBlock {span} at (28,4) size 221.84x22
|
||||
RenderBlock {t} at (0,0) size 221.84x22
|
||||
RenderParagraph (anonymous) at (0,0) size 221.84x22
|
||||
RenderText {#text} at (0,0) size 222x21
|
||||
text run at (0,0) width 222: "flights today to dc by price"
|
||||
layer at (0,77) size 800x586
|
||||
RenderBlock {app-scrollable} at (0,77) size 800x586
|
||||
RenderFlexibleBox {app-panel} at (16,16) size 768x310 [bgcolor=#FFFFFF]
|
||||
RenderFlexibleBox {app-panel-header} at (0,0) size 768x46 [bgcolor=#DEDEDE]
|
||||
RenderBlock {div} at (8,14) size 722x18
|
||||
RenderBlock {t} at (0,0) size 722x18
|
||||
RenderParagraph (anonymous) at (0,0) size 722x18
|
||||
RenderText {#text} at (0,0) size 89x17
|
||||
text run at (0,0) width 89: "SFO to DCA"
|
||||
RenderFlexibleBox {app-menu-button} at (730,8) size 30x30
|
||||
RenderImage {img} at (8,3) size 14x24
|
||||
RenderFlexibleBox {app-panel-content} at (0,46) size 768x66
|
||||
RenderBlock {div} at (8,8) size 50x50
|
||||
RenderImage {img} at (0,0) size 50x50
|
||||
RenderBlock {div} at (58,16) size 650.41x34
|
||||
RenderBlock {t} at (8,8) size 634.41x18
|
||||
RenderParagraph (anonymous) at (0,0) size 634.41x18
|
||||
RenderText {#text} at (0,0) size 105x17
|
||||
text run at (0,0) width 105: "Virgin America"
|
||||
RenderBlock {div} at (708.41,16) size 51.59x34 [color=#ABB4B6]
|
||||
RenderBlock {t} at (8,8) size 35.59x18
|
||||
RenderBlock {a} at (0,0) size 35.59x18 [color=#1155CC]
|
||||
RenderParagraph (anonymous) at (0,0) size 35.59x18
|
||||
RenderText {#text} at (0,0) size 36x17
|
||||
text run at (0,0) width 36: "$800"
|
||||
RenderFlexibleBox {app-panel-content} at (0,112) size 768x66
|
||||
RenderBlock {div} at (8,8) size 50x50
|
||||
RenderImage {img} at (0,0) size 50x50
|
||||
RenderBlock {div} at (58,16) size 650.41x34
|
||||
RenderBlock {t} at (8,8) size 634.41x18
|
||||
RenderParagraph (anonymous) at (0,0) size 634.41x18
|
||||
RenderText {#text} at (0,0) size 105x17
|
||||
text run at (0,0) width 105: "British Airways"
|
||||
RenderBlock {div} at (708.41,16) size 51.59x34 [color=#ABB4B6]
|
||||
RenderBlock {t} at (8,8) size 35.59x18
|
||||
RenderBlock {a} at (0,0) size 35.59x18 [color=#1155CC]
|
||||
RenderParagraph (anonymous) at (0,0) size 35.59x18
|
||||
RenderText {#text} at (0,0) size 36x17
|
||||
text run at (0,0) width 36: "$700"
|
||||
RenderFlexibleBox {app-panel-content} at (0,178) size 768x66
|
||||
RenderBlock {div} at (8,8) size 50x50
|
||||
RenderImage {img} at (0,0) size 50x50
|
||||
RenderBlock {div} at (58,16) size 650.41x34
|
||||
RenderBlock {t} at (8,8) size 634.41x18
|
||||
RenderParagraph (anonymous) at (0,0) size 634.41x18
|
||||
RenderText {#text} at (0,0) size 47x17
|
||||
text run at (0,0) width 47: "United"
|
||||
RenderBlock {div} at (708.41,16) size 51.59x34 [color=#ABB4B6]
|
||||
RenderBlock {t} at (8,8) size 35.59x18
|
||||
RenderBlock {a} at (0,0) size 35.59x18 [color=#1155CC]
|
||||
RenderParagraph (anonymous) at (0,0) size 35.59x18
|
||||
RenderText {#text} at (0,0) size 36x17
|
||||
text run at (0,0) width 36: "$667"
|
||||
RenderFlexibleBox {app-panel-content} at (0,244) size 768x66
|
||||
RenderBlock {div} at (8,8) size 50x50
|
||||
RenderImage {img} at (0,0) size 50x50
|
||||
RenderBlock {div} at (58,16) size 650.41x34
|
||||
RenderBlock {t} at (8,8) size 634.41x18
|
||||
RenderParagraph (anonymous) at (0,0) size 634.41x18
|
||||
RenderText {#text} at (0,0) size 38x17
|
||||
text run at (0,0) width 38: "Delta"
|
||||
RenderBlock {div} at (708.41,16) size 51.59x34 [color=#ABB4B6]
|
||||
RenderBlock {t} at (8,8) size 35.59x18
|
||||
RenderBlock {a} at (0,0) size 35.59x18 [color=#1155CC]
|
||||
RenderParagraph (anonymous) at (0,0) size 35.59x18
|
||||
RenderText {#text} at (0,0) size 36x17
|
||||
text run at (0,0) width 36: "$450"
|
||||
RenderFlexibleBox {app-panel} at (16,342) size 768x244 [bgcolor=#FFFFFF]
|
||||
RenderFlexibleBox {app-panel-header} at (0,0) size 768x46 [bgcolor=#DEDEDE]
|
||||
RenderBlock {div} at (8,14) size 722x18
|
||||
RenderBlock {t} at (0,0) size 722x18
|
||||
RenderParagraph (anonymous) at (0,0) size 722x18
|
||||
RenderText {#text} at (0,0) size 87x17
|
||||
text run at (0,0) width 87: "SJC to DCA"
|
||||
RenderFlexibleBox {app-menu-button} at (730,8) size 30x30
|
||||
RenderImage {img} at (8,3) size 14x24
|
||||
RenderFlexibleBox {app-panel-content} at (0,46) size 768x66
|
||||
RenderBlock {div} at (8,8) size 50x50
|
||||
RenderImage {img} at (0,0) size 50x50
|
||||
RenderBlock {div} at (58,16) size 641.50x34
|
||||
RenderBlock {t} at (8,8) size 625.50x18
|
||||
RenderParagraph (anonymous) at (0,0) size 625.50x18
|
||||
RenderText {#text} at (0,0) size 105x17
|
||||
text run at (0,0) width 105: "Virgin America"
|
||||
RenderBlock {div} at (699.50,16) size 60.50x34 [color=#ABB4B6]
|
||||
RenderBlock {t} at (8,8) size 44.50x18
|
||||
RenderBlock {a} at (0,0) size 44.50x18 [color=#1155CC]
|
||||
RenderParagraph (anonymous) at (0,0) size 44.50x18
|
||||
RenderText {#text} at (0,0) size 45x17
|
||||
text run at (0,0) width 45: "$1500"
|
||||
RenderFlexibleBox {app-panel-content} at (0,112) size 768x66
|
||||
RenderBlock {div} at (8,8) size 50x50
|
||||
RenderImage {img} at (0,0) size 50x50
|
||||
RenderBlock {div} at (58,16) size 650.41x34
|
||||
RenderBlock {t} at (8,8) size 634.41x18
|
||||
RenderParagraph (anonymous) at (0,0) size 634.41x18
|
||||
RenderText {#text} at (0,0) size 49x17
|
||||
text run at (0,0) width 49: "jetBlue"
|
||||
RenderBlock {div} at (708.41,16) size 51.59x34 [color=#ABB4B6]
|
||||
RenderBlock {t} at (8,8) size 35.59x18
|
||||
RenderBlock {a} at (0,0) size 35.59x18 [color=#1155CC]
|
||||
RenderParagraph (anonymous) at (0,0) size 35.59x18
|
||||
RenderText {#text} at (0,0) size 36x17
|
||||
text run at (0,0) width 36: "$650"
|
||||
RenderFlexibleBox {app-panel-content} at (0,178) size 768x66
|
||||
RenderBlock {div} at (8,8) size 50x50
|
||||
RenderImage {img} at (0,0) size 50x50
|
||||
RenderBlock {div} at (58,16) size 650.41x34
|
||||
RenderBlock {t} at (8,8) size 634.41x18
|
||||
RenderParagraph (anonymous) at (0,0) size 634.41x18
|
||||
RenderText {#text} at (0,0) size 47x17
|
||||
text run at (0,0) width 47: "United"
|
||||
RenderBlock {div} at (708.41,16) size 51.59x34 [color=#ABB4B6]
|
||||
RenderBlock {t} at (8,8) size 35.59x18
|
||||
RenderBlock {a} at (0,0) size 35.59x18 [color=#1155CC]
|
||||
RenderParagraph (anonymous) at (0,0) size 35.59x18
|
||||
RenderText {#text} at (0,0) size 36x17
|
||||
text run at (0,0) width 36: "$367"
|
||||
layer at (609,509) size 159x59 clip at (610,510) size 157x57
|
||||
RenderFlexibleBox {app-toast} at (609.31,509) size 158.69x59 [border: (1px solid #AEA477)]
|
||||
RenderBlock {div} at (7,13.50) size 32x32
|
||||
RenderBlock {div} at (0,0) size 32x32 [border: (2px solid #000000)]
|
||||
RenderBlock {t} at (2,2) size 28x30
|
||||
RenderParagraph (anonymous) at (0,0) size 28x30
|
||||
RenderText {#text} at (6,1) size 16x27
|
||||
text run at (6,1) width 16: "?"
|
||||
RenderBlock {div} at (45,7) size 106.69x45
|
||||
RenderBlock {div} at (0,0) size 106.69x45
|
||||
RenderBlock {t} at (0,0) size 106.69x45
|
||||
RenderParagraph (anonymous) at (0,0) size 106.69x15
|
||||
RenderText {#text} at (0,0) size 60x15
|
||||
text run at (0,0) width 60: "Flights are"
|
||||
RenderBlock {span} at (0,15) size 106.69x15
|
||||
RenderParagraph (anonymous) at (0,0) size 106.69x15
|
||||
RenderText {#text} at (0,0) size 29x15
|
||||
text run at (0,0) width 29: "$200"
|
||||
RenderParagraph (anonymous) at (0,30) size 106.69x15
|
||||
RenderText {#text} at (0,0) size 107x15
|
||||
text run at (0,0) width 107: "cheaper tomorrow."
|
||||
layer at (751,513) size 13x15
|
||||
RenderBlock (positioned) {div} at (141.89,4) size 12.80x15
|
||||
RenderParagraph (anonymous) at (0,0) size 12.80x15
|
||||
RenderText {#text} at (2,0) size 9x15
|
||||
text run at (2,0) width 9: "X"
|
||||
selection start: position 0 of child 0 {#text} of child 0 {t} of child 2 {span} of {#document-fragment} of child 0 {app-search-input} of child 2 {app-toolbar} of {#document-fragment} of child 3 {flights-app} of child 0 {sky} of document
|
||||
selection end: position 28 of child 0 {#text} of child 0 {t} of child 2 {span} of {#document-fragment} of child 0 {app-search-input} of child 2 {app-toolbar} of {#document-fragment} of child 3 {flights-app} of child 0 {sky} of document
|
||||
|
||||
@ -1,18 +0,0 @@
|
||||
<sky>
|
||||
<import src="../resources/run-after-display.sky"/>
|
||||
|
||||
<img src="http://storage.googleapis.com/mojo/sky-pngs/a4dc155c6a26016292a09dfc7271d871c1780e30" />
|
||||
|
||||
<script>
|
||||
import "dart:sky";
|
||||
import "dart:sky.internals" as internals;
|
||||
|
||||
void main() {
|
||||
window.addEventListener("load", (_) {
|
||||
runAfterDisplay(() {
|
||||
internals.notifyTestComplete("");
|
||||
});
|
||||
});
|
||||
}
|
||||
</script>
|
||||
</sky>
|
||||
@ -1,338 +0,0 @@
|
||||
<app>
|
||||
<import src="../resources/run-after-display.sky" />
|
||||
<style>
|
||||
* { box-sizing: border-box; }
|
||||
|
||||
t, span {
|
||||
display: inline;
|
||||
}
|
||||
|
||||
app {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
min-height: 100%;
|
||||
background-color: #494949;
|
||||
font-family: "Helvetica", sans-serif;
|
||||
font-size: 16px;
|
||||
color: #2B2B2B;
|
||||
}
|
||||
|
||||
app-header {
|
||||
display: flex;
|
||||
background: linear-gradient(#3E77B7, #6C98C4);
|
||||
padding: 8px;
|
||||
color: white;
|
||||
border-bottom: 1px solid #3E77B7;
|
||||
}
|
||||
|
||||
app-title {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
font-size: 22px;
|
||||
margin-left: 8px;
|
||||
}
|
||||
|
||||
app-menu-button {
|
||||
display: flex;
|
||||
border-radius: 4px;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
}
|
||||
|
||||
.menu-icon {
|
||||
width: 18px;
|
||||
}
|
||||
|
||||
.menu-icon-inner {
|
||||
width: 14px;
|
||||
}
|
||||
|
||||
app-scrollable {
|
||||
flex: 1;
|
||||
box-shadow: inset 0px 0px 22px 2px rgba(22, 22, 22, 0.63);
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
app-panel {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
background-color: white;
|
||||
}
|
||||
|
||||
app-panel-header {
|
||||
background-color: #DEDEDE;
|
||||
padding: 8px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
app-panel-content {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
app-toolbar {
|
||||
background-color: #F6F6F6;
|
||||
padding: 0 8px;
|
||||
}
|
||||
|
||||
app-search-input {
|
||||
background-color: #F6F6F6;
|
||||
padding: 4px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
font-size: 1.2em;
|
||||
}
|
||||
|
||||
app-toast {
|
||||
position: absolute;
|
||||
bottom: 32px;
|
||||
right: 32px;
|
||||
max-width: 55%;
|
||||
box-shadow: 0px 0px 12px 2px rgba(22, 22, 22, 0.4);
|
||||
background-image: linear-gradient(#E5D658, #DFCF43);
|
||||
border: 1px solid #AEA477;
|
||||
padding: 6px;
|
||||
border-radius: 2px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
font-size: 0.8em;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
app-toast-header {
|
||||
flex-shrink: 0;
|
||||
margin-right: 6px;
|
||||
}
|
||||
|
||||
app-toast-close-box {
|
||||
position: absolute;
|
||||
top: 3px;
|
||||
right: 3px;
|
||||
width: 1em;
|
||||
overflow: hidden;
|
||||
text-align: center;
|
||||
outline: 1px solid #AEA477;
|
||||
}
|
||||
|
||||
.tip-icon {
|
||||
font-weight: bold;
|
||||
font-size: 24px;
|
||||
border-radius: 16px;
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
border: 2px solid black;
|
||||
line-height: 30px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.tip-price {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.input-text {
|
||||
margin-left: 8px;
|
||||
}
|
||||
|
||||
.route-result {
|
||||
margin: 16px 16px 0 16px;
|
||||
outline: 1px solid black;
|
||||
}
|
||||
|
||||
.route-title {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.airline {
|
||||
border-radius: 2px;
|
||||
align-items: center;
|
||||
padding: 8px;
|
||||
}
|
||||
|
||||
.airline-name {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.airline-logo-image {
|
||||
width: 50px;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.airline-best-price {
|
||||
color: #ABB4B6;
|
||||
}
|
||||
|
||||
.airline-name,
|
||||
.airline-best-price {
|
||||
padding: 8px;
|
||||
}
|
||||
|
||||
a {
|
||||
text-decoration: none;
|
||||
color: #1155CC;
|
||||
}
|
||||
</style>
|
||||
<app-header>
|
||||
<app-title>
|
||||
<t>Search</t>
|
||||
</app-title>
|
||||
<app-menu-button>
|
||||
<img src="/sky/examples/flights/images/menu-white.png" class="menu-icon">
|
||||
</app-menu-button>
|
||||
</app-header>
|
||||
<app-toolbar>
|
||||
<app-search-input>
|
||||
<span class="input-icon">
|
||||
<img src="/sky/examples/flights/images/magnifying-glass.png" style="width: 16px">
|
||||
</span>
|
||||
<span class="input-text"><t>flights today to dc by price</t></span>
|
||||
</app-search-input>
|
||||
</app-toolbar>
|
||||
<app-scrollable>
|
||||
<app-panel class="route-result">
|
||||
<app-panel-header>
|
||||
<div class="route-title">
|
||||
<t>SFO to DCA</t>
|
||||
</div>
|
||||
<app-menu-button>
|
||||
<img src="/sky/examples/flights/images/menu-enabled.png" class="menu-icon-inner">
|
||||
</app-menu-button>
|
||||
</app-panel-header>
|
||||
<app-panel-content class="airline">
|
||||
<div class="airline-logo">
|
||||
<img class="airline-logo-image" src="/sky/examples/flights/images/virgin-america.jpg">
|
||||
</div>
|
||||
<div class="airline-name">
|
||||
<t>Virgin America</t>
|
||||
</div>
|
||||
<div class="airline-best-price">
|
||||
<t><a>$800</a></t>
|
||||
</div>
|
||||
</app-panel-content>
|
||||
<app-panel-content class="airline">
|
||||
<div class="airline-logo">
|
||||
<img class="airline-logo-image" src="/sky/examples/flights/images/ba.jpg">
|
||||
</div>
|
||||
<div class="airline-name">
|
||||
<t>British Airways</t>
|
||||
</div>
|
||||
<div class="airline-best-price">
|
||||
<t><a>$700</a></t>
|
||||
</div>
|
||||
</app-panel-content>
|
||||
<app-panel-content class="airline">
|
||||
<div class="airline-logo">
|
||||
<img class="airline-logo-image" src="/sky/examples/flights/images/united.jpg">
|
||||
</div>
|
||||
<div class="airline-name">
|
||||
<t>United</t>
|
||||
</div>
|
||||
<div class="airline-best-price">
|
||||
<t><a>$667</a></t>
|
||||
</div>
|
||||
</app-panel-content>
|
||||
<app-panel-content class="airline">
|
||||
<div class="airline-logo">
|
||||
<img class="airline-logo-image" src="/sky/examples/flights/images/delta.jpg">
|
||||
</div>
|
||||
<div class="airline-name">
|
||||
<t>Delta</t>
|
||||
</div>
|
||||
<div class="airline-best-price">
|
||||
<t><a>$450</a></t>
|
||||
</div>
|
||||
</app-panel-content>
|
||||
</app-panel>
|
||||
<app-panel class="route-result">
|
||||
<app-panel-header>
|
||||
<div class="route-title">
|
||||
<t>SJC to DCA</t>
|
||||
</div>
|
||||
<app-menu-button>
|
||||
<img src="/sky/examples/flights/images/menu-enabled.png" class="menu-icon-inner">
|
||||
</app-menu-button>
|
||||
</app-panel-header>
|
||||
<app-panel-content class="airline">
|
||||
<div class="airline-logo">
|
||||
<img class="airline-logo-image" src="/sky/examples/flights/images/virgin-america.jpg">
|
||||
</div>
|
||||
<div class="airline-name">
|
||||
<t>Virgin America</t>
|
||||
</div>
|
||||
<div class="airline-best-price">
|
||||
<t><a>$1500</a></t>
|
||||
</div>
|
||||
</app-panel-content>
|
||||
<app-panel-content class="airline">
|
||||
<div class="airline-logo">
|
||||
<img class="airline-logo-image" src="/sky/examples/flights/images/jetblue.jpg">
|
||||
</div>
|
||||
<div class="airline-name">
|
||||
<t>jetBlue</t>
|
||||
</div>
|
||||
<div class="airline-best-price">
|
||||
<t><a>$650</a></t>
|
||||
</div>
|
||||
</app-panel-content>
|
||||
<app-panel-content class="airline">
|
||||
<div class="airline-logo">
|
||||
<img class="airline-logo-image" src="/sky/examples/flights/images/united.jpg">
|
||||
</div>
|
||||
<div class="airline-name">
|
||||
<t>United</t>
|
||||
</div>
|
||||
<div class="airline-best-price">
|
||||
<t><a>$367</a></t>
|
||||
</div>
|
||||
</app-panel-content>
|
||||
</app-panel>
|
||||
</app-scrollable>
|
||||
<app-toast>
|
||||
<app-toast-header>
|
||||
<div class="tip-icon">
|
||||
<t>?</t>
|
||||
</div>
|
||||
</app-toast-header>
|
||||
<app-toast-content>
|
||||
<t>Flights are <span class="tip-price">$200</span> cheaper tomorrow.</t>
|
||||
</app-toast-content>
|
||||
<app-toast-close-box>
|
||||
X
|
||||
</app-toast-close-box>
|
||||
</app-toast>
|
||||
<script>
|
||||
import "dart:sky";
|
||||
import "dart:sky.internals" as internals;
|
||||
import "dart:async";
|
||||
|
||||
var app;
|
||||
|
||||
bool imagesLoaded() {
|
||||
var images = window.document.querySelectorAll('img');
|
||||
for (var i = 0; i < images.length; i++) {
|
||||
if (!images[i].complete)
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void checkImagesLoaded() {
|
||||
if (!imagesLoaded()) {
|
||||
new Timer(new Duration(seconds:10), checkImagesLoaded);
|
||||
return;
|
||||
}
|
||||
runAfterDisplay(() {
|
||||
internals.notifyTestComplete("");
|
||||
});
|
||||
}
|
||||
void main() {
|
||||
window.addEventListener("load", (_) {
|
||||
var input = document.querySelector('.input-text');
|
||||
window.getSelection().selectAllChildren(input.firstChild);
|
||||
checkImagesLoaded();
|
||||
});
|
||||
}
|
||||
</script>
|
||||
</app>
|
||||
@ -1,32 +0,0 @@
|
||||
<sky>
|
||||
<import src="../resources/run-after-display.sky" as="runAfterDisplay" />
|
||||
<import src="/sky/examples/flights-app/flights-app.sky" />
|
||||
<script>
|
||||
var app;
|
||||
|
||||
function imagesLoaded() {
|
||||
var images = app.shadowRoot.querySelectorAll('img');
|
||||
for (var i = 0; i < images.length; i++) {
|
||||
if (!images[i].complete)
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
function checkImagesLoaded() {
|
||||
if (!imagesLoaded()) {
|
||||
setTimeout(checkImagesLoaded, 10);
|
||||
return;
|
||||
}
|
||||
runAfterDisplay(function() {
|
||||
internals.notifyTestComplete(internals.renderTreeAsText());
|
||||
});
|
||||
}
|
||||
|
||||
addEventListener("load", function() {
|
||||
app = document.createElement("flights-app");
|
||||
document.querySelector("sky").appendChild(app);
|
||||
checkImagesLoaded();
|
||||
});
|
||||
</script>
|
||||
</sky>
|
||||
@ -1,87 +0,0 @@
|
||||
ERROR: Exception caught during observer callback: ouch
|
||||
SOURCE: http://127.0.0.1:8000/sky/framework/sky-element/observe.sky:630
|
||||
ERROR: Exception caught during observer callback: ouch
|
||||
SOURCE: http://127.0.0.1:8000/sky/framework/sky-element/observe.sky:630
|
||||
Running 79 tests
|
||||
ok 1 Path constructor throws
|
||||
ok 2 Path path validity
|
||||
ok 3 Path Paths are interned
|
||||
ok 4 Path null is empty path
|
||||
ok 5 Path undefined is empty path
|
||||
ok 6 Path Path.getValueFrom
|
||||
ok 7 Path Path.setValueFrom
|
||||
ok 8 Path Degenerate Values
|
||||
ok 9 Basic Tests Exception Doesnt Stop Notification
|
||||
ok 10 Basic Tests Can only open once
|
||||
ok 11 ObserverTransform Close Invokes Close
|
||||
ok 12 ObserverTransform valueFn/setValueFn
|
||||
ok 13 ObserverTransform valueFn - object literal
|
||||
ok 14 ObserverTransform CompoundObserver - valueFn reduction
|
||||
ok 15 PathObserver Tests Callback args
|
||||
ok 16 PathObserver Tests PathObserver.path
|
||||
ok 17 PathObserver Tests invalid
|
||||
ok 18 PathObserver Tests Optional target for callback
|
||||
ok 19 PathObserver Tests Delivery Until No Changes
|
||||
ok 20 PathObserver Tests Path disconnect
|
||||
ok 21 PathObserver Tests Path discardChanges
|
||||
ok 22 PathObserver Tests Path setValue
|
||||
ok 23 PathObserver Tests Degenerate Values
|
||||
ok 24 PathObserver Tests Path NaN
|
||||
ok 25 PathObserver Tests Path Set Value Back To Same
|
||||
ok 26 PathObserver Tests Path Triple Equals
|
||||
ok 27 PathObserver Tests Path Simple
|
||||
ok 28 PathObserver Tests Path Simple - path object
|
||||
ok 29 PathObserver Tests Path - root is initially null
|
||||
ok 30 PathObserver Tests Path With Indices
|
||||
ok 31 PathObserver Tests Path Observation
|
||||
ok 32 PathObserver Tests Path Set To Same As Prototype
|
||||
ok 33 PathObserver Tests Path Set Read Only
|
||||
ok 34 PathObserver Tests Path Set Shadows
|
||||
ok 35 PathObserver Tests Delete With Same Value On Prototype
|
||||
ok 36 PathObserver Tests Delete With Different Value On Prototype
|
||||
ok 37 PathObserver Tests Value Change On Prototype
|
||||
ok 38 PathObserver Tests Delete Of Non Configurable
|
||||
ok 39 PathObserver Tests Notify
|
||||
ok 40 PathObserver Tests issue-161
|
||||
ok 41 PathObserver Tests object cycle
|
||||
ok 42 CompoundObserver Tests Simple
|
||||
ok 43 CompoundObserver Tests reportChangesOnOpen
|
||||
ok 44 CompoundObserver Tests Degenerate Values
|
||||
ok 45 CompoundObserver Tests valueFn - return object literal
|
||||
ok 46 CompoundObserver Tests reset
|
||||
ok 47 CompoundObserver Tests Heterogeneous
|
||||
ok 48 ArrayObserver Tests Optional target for callback
|
||||
ok 49 ArrayObserver Tests Delivery Until No Changes
|
||||
ok 50 ArrayObserver Tests Array disconnect
|
||||
ok 51 ArrayObserver Tests Array discardChanges
|
||||
ok 52 ArrayObserver Tests Array
|
||||
ok 53 ArrayObserver Tests Array observe non-array throws
|
||||
ok 54 ArrayObserver Tests Array Set Same
|
||||
ok 55 ArrayObserver Tests Array Splice
|
||||
ok 56 ArrayObserver Tests Array Splice Truncate And Expand With Length
|
||||
ok 57 ArrayObserver Tests Array Splice Delete Too Many
|
||||
ok 58 ArrayObserver Tests Array Length
|
||||
ok 59 ArrayObserver Tests Array Push
|
||||
ok 60 ArrayObserver Tests Array Pop
|
||||
ok 61 ArrayObserver Tests Array Shift
|
||||
ok 62 ArrayObserver Tests Array Unshift
|
||||
ok 63 ArrayObserver Tests Array Tracker Contained
|
||||
ok 64 ArrayObserver Tests Array Tracker Delete Empty
|
||||
ok 65 ArrayObserver Tests Array Tracker Right Non Overlap
|
||||
ok 66 ArrayObserver Tests Array Tracker Left Non Overlap
|
||||
ok 67 ArrayObserver Tests Array Tracker Right Adjacent
|
||||
ok 68 ArrayObserver Tests Array Tracker Left Adjacent
|
||||
ok 69 ArrayObserver Tests Array Tracker Right Overlap
|
||||
ok 70 ArrayObserver Tests Array Tracker Left Overlap
|
||||
ok 71 ArrayObserver Tests Array Tracker Prefix And Suffix One In
|
||||
ok 72 ArrayObserver Tests Array Tracker Shift One
|
||||
ok 73 ArrayObserver Tests Array Tracker Update Delete
|
||||
ok 74 ArrayObserver Tests Array Tracker Update After Delete
|
||||
ok 75 ArrayObserver Tests Array Tracker Delete Mid Array
|
||||
ok 76 ArrayObserver Tests Array Random Case 1
|
||||
ok 77 ArrayObserver Tests Array Random Case 2
|
||||
ok 78 ArrayObserver Tests Array Random Case 3
|
||||
ok 79 ArrayObserver Tests Array Tracker No Proxies Edits
|
||||
79 tests
|
||||
79 pass
|
||||
0 fail
|
||||
File diff suppressed because it is too large
Load Diff
@ -1,18 +0,0 @@
|
||||
Running 14 tests
|
||||
ok 1 SkyElement should stamp when the element is inserted
|
||||
ok 2 SkyElement should update isAttached when inserting
|
||||
ok 3 SkyElement should handle parser created elements with attributes
|
||||
ok 4 SkyElement should have defaults for all attributes
|
||||
ok 5 SkyElement should call change callbacks
|
||||
ok 6 SkyElement should convert boolean reflected attributes
|
||||
ok 7 SkyElement should convert string reflected attributes
|
||||
ok 8 SkyElement should convert number reflected attributes
|
||||
ok 9 SkyElement should connect data binding
|
||||
ok 10 SkyElement should two way bind attributes
|
||||
ok 11 SkyElement should connect template event handlers
|
||||
ok 12 SkyElement should connect host event handlers
|
||||
ok 13 SkyElement should not call attributeChanged for binding expression values
|
||||
ok 14 SkyElement should call shadowRootReady after creating the template instance
|
||||
14 tests
|
||||
14 pass
|
||||
0 fail
|
||||
@ -1,224 +0,0 @@
|
||||
<sky>
|
||||
<import src="../resources/chai.sky" />
|
||||
<import src="../resources/mocha.sky" />
|
||||
<import src="../resources/test-element.sky" as="TestElement" />
|
||||
<import src="/sky/framework/elements/sky-element/sky-element.sky" as="SkyElement" />
|
||||
|
||||
<div id="sandbox"></div>
|
||||
|
||||
<test-element id="parser-element" checked="true" size="10" name="foo bar" />
|
||||
|
||||
<sky-element name="test-element-parent">
|
||||
<template>
|
||||
<test-element size="{{ size }}" />
|
||||
</template>
|
||||
<script>
|
||||
(class extends SkyElement {
|
||||
created() {
|
||||
this.size = 10;
|
||||
}
|
||||
}).register();
|
||||
</script>
|
||||
</sky-element>
|
||||
|
||||
<test-element-parent id="parent" />
|
||||
|
||||
<script>
|
||||
describe("SkyElement", function() {
|
||||
var element;
|
||||
var sandbox = document.getElementById("sandbox");
|
||||
|
||||
beforeEach(function() {
|
||||
element = new TestElement();
|
||||
});
|
||||
afterEach(function() {
|
||||
element.remove();
|
||||
});
|
||||
|
||||
it("should stamp when the element is inserted", function() {
|
||||
assert.isNull(element.shadowRoot);
|
||||
sandbox.appendChild(element);
|
||||
assert.instanceOf(element.shadowRoot, ShadowRoot);
|
||||
assert.ok(element.shadowRoot.getElementById("inside"));
|
||||
});
|
||||
|
||||
it("should update isAttached when inserting", function() {
|
||||
assert.isFalse(element.isAttached);
|
||||
sandbox.appendChild(element);
|
||||
assert.isTrue(element.isAttached);
|
||||
element.remove();
|
||||
assert.isFalse(element.isAttached);
|
||||
});
|
||||
|
||||
it("should handle parser created elements with attributes", function() {
|
||||
var element = document.getElementById("parser-element");
|
||||
assert.isTrue(element.checked);
|
||||
assert.isNumber(element.size);
|
||||
assert.equal(element.size, 10);
|
||||
assert.isString(element.name);
|
||||
assert.equal(element.name, "foo bar");
|
||||
});
|
||||
|
||||
it("should have defaults for all attributes", function() {
|
||||
var element = new TestElement();
|
||||
assert.isFalse(element.checked);
|
||||
assert.isNumber(element.size);
|
||||
assert.equal(element.size, 0);
|
||||
assert.isString(element.name);
|
||||
assert.equal(element.name, "");
|
||||
});
|
||||
|
||||
it("should call change callbacks", function() {
|
||||
var element = new TestElement();
|
||||
element.size = 20;
|
||||
element.name = "first name";
|
||||
element.checked = true;
|
||||
element.size = 10;
|
||||
element.name = "second name";
|
||||
assert.deepEqual(element.changes, [
|
||||
{ name: 'size', oldValue: 0, newValue: 20 },
|
||||
{ name: 'name', oldValue: "", newValue: "first name" },
|
||||
{ name: 'checked', oldValue: false, newValue: true },
|
||||
{ name: 'size', oldValue: 20, newValue: 10 },
|
||||
{ name: 'name', oldValue: "first name", newValue: "second name" },
|
||||
]);
|
||||
});
|
||||
|
||||
it("should convert boolean reflected attributes", function() {
|
||||
var element = new TestElement();
|
||||
assert.isFalse(element.checked);
|
||||
element.checked = null;
|
||||
assert.isFalse(element.checked);
|
||||
element.checked = "true";
|
||||
assert.isTrue(element.checked);
|
||||
element.checked = "false";
|
||||
assert.isFalse(element.checked);
|
||||
element.checked = {};
|
||||
assert.isTrue(element.checked);
|
||||
});
|
||||
|
||||
it("should convert string reflected attributes", function() {
|
||||
var element = new TestElement();
|
||||
assert.equal(element.name, "");
|
||||
element.name = null;
|
||||
assert.equal(element.name, "");
|
||||
element.name = [1, 2];
|
||||
assert.equal(element.name, "1,2");
|
||||
element.name = false;
|
||||
assert.equal(element.name, "false");
|
||||
element.name = {};
|
||||
assert.equal(element.name, "[object Object]");
|
||||
element.name = "";
|
||||
assert.equal(element.name, "");
|
||||
});
|
||||
|
||||
it("should convert number reflected attributes", function() {
|
||||
var element = new TestElement();
|
||||
assert.isNumber(element.size);
|
||||
element.size = 20;
|
||||
assert.isNumber(element.size);
|
||||
assert.equal(element.size, 20);
|
||||
element.size = "08";
|
||||
assert.equal(element.size, 8);
|
||||
element.size = " 30 ";
|
||||
assert.equal(element.size, 30);
|
||||
element.size = "1.5";
|
||||
assert.isNumber(element.size);
|
||||
assert.equal(element.size, 1.5);
|
||||
element.size = "false";
|
||||
assert.isTrue(isNaN(element.size));
|
||||
element.size = {};
|
||||
assert.isTrue(isNaN(element.size));
|
||||
});
|
||||
|
||||
it("should connect data binding", function(done) {
|
||||
sandbox.appendChild(element);
|
||||
var inside = element.shadowRoot.getElementById("inside");
|
||||
Promise.resolve().then(function() {
|
||||
assert.equal(inside.textContent, 10);
|
||||
assert.equal(inside.lang, 10);
|
||||
element.value = 20;
|
||||
}).then(function() {
|
||||
assert.equal(inside.textContent, 20);
|
||||
assert.equal(inside.lang, 20);
|
||||
done();
|
||||
}).catch(function(e) {
|
||||
done(e);
|
||||
});
|
||||
});
|
||||
|
||||
it("should two way bind attributes", function(done) {
|
||||
sandbox.appendChild(element);
|
||||
var checkbox = element.shadowRoot.getElementById("checkbox");
|
||||
assert.isFalse(checkbox.checked);
|
||||
assert.isFalse(element.checked);
|
||||
element.checked = true;
|
||||
assert.isTrue(element.checked);
|
||||
assert.isFalse(checkbox.checked);
|
||||
Promise.resolve().then(function() {
|
||||
assert.isTrue(checkbox.checked);
|
||||
checkbox.checked = false;
|
||||
assert.isFalse(checkbox.checked);
|
||||
return Promise.resolve().then(function() {
|
||||
assert.isFalse(element.checked);
|
||||
assert.isFalse(checkbox.checked);
|
||||
checkbox.checked = true;
|
||||
assert.isTrue(checkbox.checked);
|
||||
return Promise.resolve().then(function() {
|
||||
assert.isTrue(element.checked);
|
||||
element.checked = true;
|
||||
assert.isTrue(element.checked);
|
||||
assert.isTrue(checkbox.checked);
|
||||
element.checked = false;
|
||||
assert.isFalse(element.checked);
|
||||
assert.isTrue(checkbox.checked);
|
||||
return Promise.resolve().then(function() {
|
||||
assert.isFalse(checkbox.checked);
|
||||
assert.isFalse(element.checked);
|
||||
done();
|
||||
});
|
||||
});
|
||||
});
|
||||
}).catch(function(e) {
|
||||
done(e);
|
||||
});
|
||||
});
|
||||
|
||||
it("should connect template event handlers", function() {
|
||||
sandbox.appendChild(element);
|
||||
var inside = element.shadowRoot.getElementById("inside");
|
||||
inside.dispatchEvent(new CustomEvent("wrong-event"));
|
||||
assert.isNull(element.lastEvent);
|
||||
var event = new CustomEvent("test-event");
|
||||
inside.dispatchEvent(event);
|
||||
assert.equal(element.lastEvent, event);
|
||||
});
|
||||
|
||||
it("should connect host event handlers", function() {
|
||||
sandbox.appendChild(element);
|
||||
element.dispatchEvent(new CustomEvent("wrong-event"));
|
||||
assert.isNull(element.lastEvent);
|
||||
var event = new CustomEvent("host-event");
|
||||
element.dispatchEvent(event);
|
||||
assert.equal(element.lastEvent, event);
|
||||
});
|
||||
|
||||
it("should not call attributeChanged for binding expression values", function() {
|
||||
var parent = document.getElementById('parent');
|
||||
var element = parent.shadowRoot.querySelector('test-element');
|
||||
assert.deepEqual(element.changes, [
|
||||
{ name: 'size', oldValue: 0, newValue: 10 },
|
||||
]);
|
||||
});
|
||||
|
||||
it("should call shadowRootReady after creating the template instance", function() {
|
||||
assert.equal(element.shadowRootReadyCount, 0);
|
||||
sandbox.appendChild(element);
|
||||
assert.equal(element.shadowRootReadyCount, 1);
|
||||
element.remove();
|
||||
sandbox.appendChild(element);
|
||||
assert.equal(element.shadowRootReadyCount, 1);
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</sky>
|
||||
@ -1,5 +0,0 @@
|
||||
Running 1 tests
|
||||
ok 1 xmlhttprequest.responseType should default to text when empty
|
||||
1 tests
|
||||
1 pass
|
||||
0 fail
|
||||
@ -1,21 +0,0 @@
|
||||
<sky>
|
||||
<import src="../../resources/chai.sky" />
|
||||
<import src="../../resources/mocha.sky" />
|
||||
<import src="/sky/framework/xmlhttprequest.sky" as="XMLHttpRequest" />
|
||||
<script>
|
||||
describe("xmlhttprequest.responseType", function() {
|
||||
it("should default to text when empty", function(done) {
|
||||
var xhr = new XMLHttpRequest();
|
||||
assert.equal(xhr.responseType, "");
|
||||
xhr.responseType = 'foo';
|
||||
xhr.responseType = '';
|
||||
xhr.onload = function() {
|
||||
assert.typeOf(this.response, "string", "Response is a string\n");
|
||||
done();
|
||||
};
|
||||
xhr.open("GET", "resources/pass.txt");
|
||||
xhr.send();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</sky>
|
||||
@ -1 +0,0 @@
|
||||
This is data from the network.
|
||||
@ -1,5 +0,0 @@
|
||||
Running 1 tests
|
||||
ok 1 xmlhttprequest.responseType should support arraybuffer
|
||||
1 tests
|
||||
1 pass
|
||||
0 fail
|
||||
@ -1,19 +0,0 @@
|
||||
<sky>
|
||||
<import src="../../resources/chai.sky" />
|
||||
<import src="../../resources/mocha.sky" />
|
||||
<import src="/sky/framework/xmlhttprequest.sky" as="XMLHttpRequest" />
|
||||
<script>
|
||||
describe("xmlhttprequest.responseType", function() {
|
||||
it("should support arraybuffer", function(done) {
|
||||
var xhr = new XMLHttpRequest();
|
||||
xhr.responseType = 'arraybuffer';
|
||||
xhr.onload = function() {
|
||||
assert.instanceOf(xhr.response, ArrayBuffer, "Response is an ArrayBuffer\n");
|
||||
done();
|
||||
};
|
||||
xhr.open("GET", "resources/pass.txt");
|
||||
xhr.send();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</sky>
|
||||
@ -1,5 +0,0 @@
|
||||
Running 1 tests
|
||||
ok 1 XMLHttpRequest should be able to post non-ascii
|
||||
1 tests
|
||||
1 pass
|
||||
0 fail
|
||||
@ -1,22 +0,0 @@
|
||||
<html>
|
||||
<import src="../../resources/chai.sky" />
|
||||
<import src="../../resources/mocha.sky" />
|
||||
<import src="/sky/framework/xmlhttprequest.sky" as="XMLHttpRequest" />
|
||||
<script>
|
||||
describe('XMLHttpRequest', function() {
|
||||
it('should be able to post non-ascii', function(done) {
|
||||
// example utf8, #114, "I can eat glass" in arabic.
|
||||
// http://www.columbia.edu/~kermit/utf8.html
|
||||
var utf8_text = "أنا قادر على أكل الزجاج و هذا لا يؤلمني.";
|
||||
|
||||
var xhr = new XMLHttpRequest();
|
||||
xhr.onload = function() {
|
||||
assert.equal(this.responseText, utf8_text);
|
||||
done();
|
||||
};
|
||||
xhr.open("GET", "/echo_post");
|
||||
xhr.send(utf8_text);
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</html>
|
||||
@ -1,5 +0,0 @@
|
||||
Running 1 tests
|
||||
ok 1 xmlhttprequest should call onerror when endpoint does not exist
|
||||
1 tests
|
||||
1 pass
|
||||
0 fail
|
||||
@ -1,26 +0,0 @@
|
||||
<sky>
|
||||
<import src="../../resources/chai.sky" />
|
||||
<import src="../../resources/mocha.sky" />
|
||||
<import src="/sky/framework/xmlhttprequest.sky" as="XMLHttpRequest" />
|
||||
<script>
|
||||
describe("xmlhttprequest", function() {
|
||||
it("should call onerror when endpoint does not exist", function(done) {
|
||||
var xhr = new XMLHttpRequest();
|
||||
xhr.open("GET", "does_not_exist.html");
|
||||
xhr.onerror = function() {
|
||||
assert.fail("onload", "onerror", "onerror should not be called.");
|
||||
done();
|
||||
}
|
||||
xhr.onload = function() {
|
||||
// Missing files are application-level errors, not network errors
|
||||
// so onload fires, not onerror.
|
||||
assert.equal(xhr.status, 404);
|
||||
assert.equal(xhr.statusText, "HTTP/1.1 404 Not Found",
|
||||
"status text should also be 404");
|
||||
done();
|
||||
}
|
||||
xhr.send();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</sky>
|
||||
@ -1,5 +0,0 @@
|
||||
Running 1 tests
|
||||
ok 1 XMLHttpRequest should be able to fetch text files
|
||||
1 tests
|
||||
1 pass
|
||||
0 fail
|
||||
@ -1,5 +0,0 @@
|
||||
Running 1 tests
|
||||
ok 1 XMLHttpRequest should be able to fetch relative urls
|
||||
1 tests
|
||||
1 pass
|
||||
0 fail
|
||||
@ -1,20 +0,0 @@
|
||||
<html>
|
||||
<import src="../../resources/chai.sky" />
|
||||
<import src="../../resources/mocha.sky" />
|
||||
<import src="/sky/framework/xmlhttprequest.sky" as="XMLHttpRequest" />
|
||||
<script>
|
||||
describe('XMLHttpRequest', function() {
|
||||
it('should be able to fetch relative urls', function(done) {
|
||||
|
||||
var xhr = new XMLHttpRequest();
|
||||
xhr.onload = function() {
|
||||
// Also testing that "this" is set correctly in the onload callback.
|
||||
assert.equal(this.responseText, "This is data from the network.\n");
|
||||
done();
|
||||
};
|
||||
xhr.open("GET", "resources/pass.txt");
|
||||
xhr.send();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</html>
|
||||
@ -1,23 +0,0 @@
|
||||
<html>
|
||||
<import src="../../resources/chai.sky" />
|
||||
<import src="../../resources/mocha.sky" />
|
||||
<import src="/sky/framework/xmlhttprequest.sky" as="XMLHttpRequest" />
|
||||
<script>
|
||||
describe('XMLHttpRequest', function() {
|
||||
it('should be able to fetch text files', function(done) {
|
||||
|
||||
var xhr = new XMLHttpRequest();
|
||||
xhr.onload = function() {
|
||||
assert.equal(xhr.responseText, "This is data from the network.\n");
|
||||
done();
|
||||
};
|
||||
xhr.onerror = function(error) {
|
||||
assert.ok(false, "Got error: " + JSON.stringify(error));
|
||||
done();
|
||||
};
|
||||
xhr.open("GET", "http://127.0.0.1:8000/sky/tests/framework/xmlhttprequest/resources/pass.txt");
|
||||
xhr.send();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</html>
|
||||
Loading…
x
Reference in New Issue
Block a user