-
Notifications
You must be signed in to change notification settings - Fork 1
/
edge-case-test.html
executable file
·104 lines (97 loc) · 3.53 KB
/
edge-case-test.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
<!--
@license https://github.com/t2ym/i18n-behavior/blob/master/LICENSE.md
Copyright (c) 2016, Tetsuya Mori <t2y3141592@gmail.com>. All rights reserved.
-->
<html lang="en" preferred locales-path="locales">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=yes">
<script src="../../../@webcomponents/webcomponentsjs/webcomponents-bundle.js"></script>
<!-- <script src="../../../custom-elements/src/native-shim.js"></script> -->
<script src="../../../wct-browser-legacy/browser.js"></script>
<script type="module" src="./edge-case-test-imports.js"></script>
<style>
.test-container.running-test {
display: block;
}
.test-container:not(.running-test) {
display: none;
}
</style>
</head>
<body>
<h2 id="test-name"></h2>
<advanced-binding-element hidden status="ok" value="initial value" parameter="parameter text"></advanced-binding-element>
<test-fixture class="test-container" id="empty-element-fixture">
<template>
<empty-element></empty-element>
</template>
</test-fixture>
<test-fixture class="test-container" id="bound-empty-element-fixture">
<template is="dom-template">
<empty-element
lang="{{lang}}"
observe-html-lang="{{observeHtmlLang}}"></empty-element>
</template>
</test-fixture>
<test-fixture class="test-container" id="no-template-element-fixture">
<template>
<no-template-element></no-template-element>
</template>
</test-fixture>
<test-fixture class="test-container" id="complex-compound-binding-element-fixture">
<template is="dom-template">
<complex-compound-binding-element
lang="{{lang}}"
observe-html-lang="{{observeHtmlLang}}"></complex-compound-binding-element>
</template>
</test-fixture>
<test-fixture class="test-container" id="advanced-binding-element-fixture">
<template is="dom-template">
<advanced-binding-element
lang="{{lang}}"
observe-html-lang="{{observeHtmlLang}}"
status="{{status}}"
value="{{value}}"
parameter="{{parameter}}"></advanced-binding-element>
</template>
</test-fixture>
<div class="test-container">
<template id="edge-case-dom-bind"
is="i18n-dom-bind">
name = {{text.name}}
<i18n-number>1</i18n-number>
<i18n-format>
<json-data>{{text.format}}</json-data>
<i18n-number offset="">1</i18n-number>
</i18n-format>
<i18n-format>
<span>format</span>
<br>
</i18n-format>
<span>{{tr('key')}}</span>
<span>{{tr('key',text.table)}}</span>
<span>{{tr('key','string')}}</span>
<input placeholder="{ invalid: json }">
<p>hello <br><span></span> <span> </span> world</p>
<p>hello<template is="dom-repeat" items="[0,1]"><br></template>world</p>
hello <br><span></span> <span> </span> world
</template>
<template>
<json-data text-id="target" data="{}"></json-data>
<json-data id="func">{
"func": or
}</json-data>
<json-data text-id="format">{
"other": "other format"
}</json-data>
<json-data text-id="table">{
"message-id": "message 1"
}</json-data>
<span text-id="name">John</span>
</template>
</template>
</div>
<i18n-preference></i18n-preference>
</body>
</html>