-
Notifications
You must be signed in to change notification settings - Fork 3k
/
generate-test-wbns.sh
executable file
·152 lines (127 loc) · 4.07 KB
/
generate-test-wbns.sh
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
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
#!/bin/sh
set -e
if ! command -v gen-bundle > /dev/null 2>&1; then
echo "gen-bundle is not installed. Please run:"
echo " go get -u github.com/WICG/webpackage/go/bundle/cmd/..."
echo ' export PATH=$PATH:$(go env GOPATH)/bin'
exit 1
fi
# TODO: Stop hard-coding "web-platform.test" when generating Web Bundles on the
# fly.
wpt_test_origin=https://web-platform.test:8444
wpt_test_remote_origin=https://www1.web-platform.test:8444
gen-bundle \
-version b1 \
-baseURL $wpt_test_origin/web-bundle/resources/wbn/ \
-primaryURL $wpt_test_origin/web-bundle/resources/wbn/location.html \
-dir location/ \
-o wbn/location-b1.wbn
gen-bundle \
-version b2 \
-baseURL $wpt_test_origin/web-bundle/resources/wbn/static-element/ \
-primaryURL $wpt_test_origin/web-bundle/resources/wbn/static-element/resources/style.css \
-dir static-element/ \
-o wbn/static-element.wbn
gen-bundle \
-version b1 \
-baseURL $wpt_test_origin/web-bundle/resources/wbn/dynamic/ \
-primaryURL $wpt_test_origin/web-bundle/resources/wbn/dynamic/resource1.js \
-dir dynamic1/ \
-o wbn/dynamic1-b1.wbn
gen-bundle \
-version b1 \
-baseURL $wpt_test_origin/web-bundle/resources/wbn/dynamic/ \
-primaryURL $wpt_test_origin/web-bundle/resources/wbn/dynamic/resource1.js \
-dir dynamic2/ \
-o wbn/dynamic2-b1.wbn
gen-bundle \
-version b1 \
-baseURL $wpt_test_remote_origin/web-bundle/resources/wbn/dynamic/ \
-primaryURL $wpt_test_remote_origin/web-bundle/resources/wbn/dynamic/resource1.js \
-dir dynamic1/ \
-o wbn/dynamic1-crossorigin-b1.wbn
gen-bundle \
-version b1 \
-baseURL $wpt_test_origin/web-bundle/resources/ \
-primaryURL $wpt_test_origin/web-bundle/resources/wbn/resource.js \
-dir path-restriction/ \
-o wbn/path-restriction-b1.wbn
# Create a bundle, nested-main.wbn, which includes nested-sub.wbn.
cp -a wbn/subresource.wbn nested/nested-sub.wbn
gen-bundle \
-version b2 \
-baseURL $wpt_test_origin/web-bundle/resources/wbn/ \
-primaryURL $wpt_test_origin/web-bundle/resources/wbn/resource.js \
-dir nested/ \
-o wbn/nested-main.wbn
gen-bundle \
-version b1 \
-har cross-origin.har \
-primaryURL $wpt_test_remote_origin/web-bundle/resources/wbn/cors/resource.cors.js \
-o wbn/cors/cross-origin-b1.wbn
gen-bundle \
-version b1 \
-har cross-origin-no-cors.har \
-primaryURL $wpt_test_remote_origin/web-bundle/resources/wbn/no-cors/resource.cors.js \
-o wbn/no-cors/cross-origin-b1.wbn
gen-bundle \
-version b2 \
-har non-utf8-query-encoding.har \
-primaryURL $wpt_test_origin/web-bundle/resources/wbn/static-element/resources/script.js?x=%A4%A2 \
-o wbn/non-utf8-query-encoding.wbn
gen-bundle \
-version b2 \
-har corp.har \
-primaryURL $wpt_test_remote_origin/web-bundle/resources/wbn/cors/no-corp.js \
-o wbn/cors/corp.wbn
gen-bundle \
-version b2 \
-baseURL $wpt_test_origin/web-bundle/resources/wbn/ \
-primaryURL $wpt_test_origin/web-bundle/resources/wbn/location.html \
-dir location/ \
-o wbn/location.wbn
gen-bundle \
-version b2 \
-har relative-url.har \
-o wbn/relative-url.wbn
gen-bundle \
-version b2 \
-baseURL $wpt_test_origin/web-bundle/resources/wbn/ \
-dir subresource/ \
-o wbn/subresource.wbn
gen-bundle \
-version b2 \
-baseURL $wpt_test_origin/web-bundle/resources/wbn/dynamic/ \
-dir dynamic1/ \
-o wbn/dynamic1.wbn
gen-bundle \
-version b2 \
-baseURL $wpt_test_origin/web-bundle/resources/wbn/dynamic/ \
-dir dynamic2/ \
-o wbn/dynamic2.wbn
gen-bundle \
-version b2 \
-baseURL $wpt_test_remote_origin/web-bundle/resources/wbn/dynamic/ \
-dir dynamic1/ \
-o wbn/dynamic1-crossorigin.wbn
gen-bundle \
-version b2 \
-baseURL $wpt_test_origin/web-bundle/resources/ \
-dir path-restriction/ \
-o wbn/path-restriction.wbn
gen-bundle \
-version b2 \
-har cross-origin.har \
-o wbn/cors/cross-origin.wbn
gen-bundle \
-version b2 \
-har cross-origin-no-cors.har \
-o wbn/no-cors/cross-origin.wbn
gen-bundle \
-version b2 \
-har uuid-in-package.har \
-o wbn/uuid-in-package.wbn
gen-bundle \
-version b2 \
-har simple-cross-origin.har \
-o wbn/simple-cross-origin.wbn