Skip to content

Commit 3598c4b

Browse files
authored
chore: improve themeroot pages (#13472)
1 parent d0d82a4 commit 3598c4b

2 files changed

Lines changed: 32 additions & 6 deletions

File tree

packages/base/test/pages/ThemeRoot.html

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,48 +20,61 @@ <h1>Without meta tag</h1>
2020
<ul>
2121
<li><a
2222
href="?sap-ui-theme=sap_horizon@http://example2.com/themes/">?sap-ui-theme=sap_horizon@http://example2.com/themes/</a>
23+
<br /><a href="?sap-ui-themeRoot=http://example2.com/themes/">?sap-ui-themeRoot=http://example2.com/themes/</a>
2324
<br /> http://example2.com/ — no meta tag present, blocked
2425
<br /> <button onclick="testSetThemeRoot('http://example2.com/themes/', this)">Test setThemeRoot</button> <span class="result"></span>
2526
</li>
2627
<li><a
2728
href="?sap-ui-theme=sap_horizon@https://example.com/themes/">?sap-ui-theme=sap_horizon@https://example.com/themes/</a>
29+
<br /><a href="?sap-ui-themeRoot=https://example.com/themes/">?sap-ui-themeRoot=https://example.com/themes/</a>
2830
<br /> https://example.com/ — no meta tag present, blocked
2931
<br /> <button onclick="testSetThemeRoot('https://example.com/themes/', this)">Test setThemeRoot</button> <span class="result"></span>
3032
</li>
3133
<li><a
3234
href="?sap-ui-theme=sap_horizon@http://example:9090.com/themes/">?sap-ui-theme=sap_horizon@http://example:9090.com/themes/</a>
35+
<br /><a href="?sap-ui-themeRoot=http://example:9090.com/themes/">?sap-ui-themeRoot=http://example:9090.com/themes/</a>
3336
<br /> http://example:9090.com/ — no meta tag present, blocked
3437
<br /> <button onclick="testSetThemeRoot('http://example:9090.com/themes/', this)">Test setThemeRoot</button> <span class="result"></span>
3538
</li>
3639
<li><a
3740
href="?sap-ui-theme=sap_horizon@http://example.com/themes/">?sap-ui-theme=sap_horizon@http://example.com/themes/</a>
41+
<br /><a href="?sap-ui-themeRoot=http://example.com/themes/">?sap-ui-themeRoot=http://example.com/themes/</a>
3842
<br /> http://example.com/ — no meta tag present, blocked
3943
<br /> <button onclick="testSetThemeRoot('http://example.com/themes/', this)">Test setThemeRoot</button> <span class="result"></span>
4044
</li>
4145
<li><a
4246
href="?sap-ui-theme=sap_horizon@//example2.com/themes/">?sap-ui-theme=sap_horizon@//example2.com/themes/</a>
47+
<br /><a href="?sap-ui-themeRoot=//example2.com/themes/">?sap-ui-themeRoot=//example2.com/themes/</a>
4348
<br /> //example2.com/ — inherits current page protocol (e.g. http://example2.com/) — no meta tag present, blocked
4449
<br /> <button onclick="testSetThemeRoot('//example2.com/themes/', this)">Test setThemeRoot</button> <span class="result"></span>
4550
</li>
4651
<li><a
4752
href="?sap-ui-theme=sap_horizon@//example:9090.com/themes/">?sap-ui-theme=sap_horizon@//example:9090.com/themes/</a>
53+
<br /><a href="?sap-ui-themeRoot=//example:9090.com/themes/">?sap-ui-themeRoot=//example:9090.com/themes/</a>
4854
<br /> //example:9090.com/ — inherits current page protocol (e.g. http://example:9090.com/) — no meta tag present, blocked
4955
<br /> <button onclick="testSetThemeRoot('//example:9090.com/themes/', this)">Test setThemeRoot</button> <span class="result"></span>
5056
</li>
5157
<li><a
5258
href="?sap-ui-theme=sap_horizon@//example.com/themes/">?sap-ui-theme=sap_horizon@//example.com/themes/</a>
59+
<br /><a href="?sap-ui-themeRoot=//example.com/themes/">?sap-ui-themeRoot=//example.com/themes/</a>
5360
<br /> //example.com/ — inherits current page protocol (e.g. http://example.com/) — no meta tag present, blocked
5461
<br /> <button onclick="testSetThemeRoot('//example.com/themes/', this)">Test setThemeRoot</button> <span class="result"></span>
5562
</li>
56-
<li><a href="?sap-ui-theme=sap_horizon@/themes/">?sap-ui-theme=sap_horizon@/themes/</a><br /> /themes/
63+
<li><a href="?sap-ui-theme=sap_horizon@/themes/">?sap-ui-theme=sap_horizon@/themes/</a>
64+
<br /><a href="?sap-ui-themeRoot=/themes/">?sap-ui-themeRoot=/themes/</a>
65+
<br /> /themes/
5766
<br /> (resolves to the current page's origin, e.g. http://localhost:8080/themes/) <br /> Same-origin — expected link element
5867
<br /> <button onclick="testSetThemeRoot('/themes/', this)">Test setThemeRoot</button> <span class="result"></span>
5968
</li>
60-
<li><a href="?sap-ui-theme=sap_horizon@./themes/">?sap-ui-theme=sap_horizon@./themes/</a><br /> ./themes/
69+
<li><a href="?sap-ui-theme=sap_horizon@./themes/">?sap-ui-theme=sap_horizon@./themes/</a>
70+
<br /><a href="?sap-ui-themeRoot=./themes/">?sap-ui-themeRoot=./themes/</a>
71+
<br /> ./themes/
6172
<br /> (resolves relative to the current page's URL, e.g. http://localhost:8080/test/pages/themes/) <br /> Same-origin — expected link element
6273
<br /> <button onclick="testSetThemeRoot('./themes/', this)">Test setThemeRoot</button> <span class="result"></span>
6374
</li>
64-
<li><a href="?sap-ui-theme=sap_horizon@../themes/">?sap-ui-theme=sap_horizon@../themes/</a><br /> ../themes/
75+
<li><a href="?sap-ui-theme=sap_horizon@../themes/">?sap-ui-theme=sap_horizon@../themes/</a>
76+
<br /><a href="?sap-ui-themeRoot=../themes/">?sap-ui-themeRoot=../themes/</a>
77+
<br /> ../themes/
6578
<br /> (resolves relative to the current page's URL, e.g. http://localhost:8080/test/themes/) <br /> Same-origin — expected link element
6679
<br /> <button onclick="testSetThemeRoot('../themes/', this)">Test setThemeRoot</button> <span class="result"></span>
6780
</li>

packages/base/test/pages/ThemeRoot2.html

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,48 +22,61 @@ <h1>With meta tag</h1>
2222
<ul>
2323
<li><a
2424
href="?sap-ui-theme=sap_horizon@http://example2.com/themes/">?sap-ui-theme=sap_horizon@http://example2.com/themes/</a>
25+
<br /><a href="?sap-ui-themeRoot=http://example2.com/themes/">?sap-ui-themeRoot=http://example2.com/themes/</a>
2526
<br /> http://example2.com/ vs http://example.com/ — different origin, blocked
2627
<br /> <button onclick="testSetThemeRoot('http://example2.com/themes/', this)">Test setThemeRoot</button> <span class="result"></span>
2728
</li>
2829
<li><a
2930
href="?sap-ui-theme=sap_horizon@https://example.com/themes/">?sap-ui-theme=sap_horizon@https://example.com/themes/</a>
31+
<br /><a href="?sap-ui-themeRoot=https://example.com/themes/">?sap-ui-themeRoot=https://example.com/themes/</a>
3032
<br /> https://example.com/ vs http://example.com/ — different protocol, blocked
3133
<br /> <button onclick="testSetThemeRoot('https://example.com/themes/', this)">Test setThemeRoot</button> <span class="result"></span>
3234
</li>
3335
<li><a
3436
href="?sap-ui-theme=sap_horizon@http://example:9090.com/themes/">?sap-ui-theme=sap_horizon@http://example:9090.com/themes/</a>
37+
<br /><a href="?sap-ui-themeRoot=http://example:9090.com/themes/">?sap-ui-themeRoot=http://example:9090.com/themes/</a>
3538
<br /> http://example:9090.com/ vs http://example.com/ — different port, blocked
3639
<br /> <button onclick="testSetThemeRoot('http://example:9090.com/themes/', this)">Test setThemeRoot</button> <span class="result"></span>
3740
</li>
3841
<li><a
3942
href="?sap-ui-theme=sap_horizon@http://example.com/themes/">?sap-ui-theme=sap_horizon@http://example.com/themes/</a>
43+
<br /><a href="?sap-ui-themeRoot=http://example.com/themes/">?sap-ui-themeRoot=http://example.com/themes/</a>
4044
<br /> http://example.com/ vs http://example.com/ — matches allowed origin. <br /> Expected link element
4145
<br /> <button onclick="testSetThemeRoot('http://example.com/themes/', this)">Test setThemeRoot</button> <span class="result"></span>
4246
</li>
4347
<li><a
4448
href="?sap-ui-theme=sap_horizon@//example2.com/themes/">?sap-ui-theme=sap_horizon@//example2.com/themes/</a>
49+
<br /><a href="?sap-ui-themeRoot=//example2.com/themes/">?sap-ui-themeRoot=//example2.com/themes/</a>
4550
<br /> //example2.com/ — inherits current page protocol (e.g. http://example2.com/) vs http://example.com/ — different origin, blocked
4651
<br /> <button onclick="testSetThemeRoot('//example2.com/themes/', this)">Test setThemeRoot</button> <span class="result"></span>
4752
</li>
4853
<li><a
4954
href="?sap-ui-theme=sap_horizon@//example:9090.com/themes/">?sap-ui-theme=sap_horizon@//example:9090.com/themes/</a>
55+
<br /><a href="?sap-ui-themeRoot=//example:9090.com/themes/">?sap-ui-themeRoot=//example:9090.com/themes/</a>
5056
<br /> //example:9090.com/ — inherits current page protocol (e.g. http://example:9090.com/) vs http://example.com/ — different port, blocked
5157
<br /> <button onclick="testSetThemeRoot('//example:9090.com/themes/', this)">Test setThemeRoot</button> <span class="result"></span>
5258
</li>
5359
<li><a
5460
href="?sap-ui-theme=sap_horizon@//example.com/themes/">?sap-ui-theme=sap_horizon@//example.com/themes/</a>
61+
<br /><a href="?sap-ui-themeRoot=//example.com/themes/">?sap-ui-themeRoot=//example.com/themes/</a>
5562
<br /> //example.com/ — inherits current page protocol (e.g. http://example.com/) vs http://example.com/ — matches allowed origin. <br /> Expected link element
5663
<br /> <button onclick="testSetThemeRoot('//example.com/themes/', this)">Test setThemeRoot</button> <span class="result"></span>
5764
</li>
58-
<li><a href="?sap-ui-theme=sap_horizon@/themes/">?sap-ui-theme=sap_horizon@/themes/</a><br /> /themes/
65+
<li><a href="?sap-ui-theme=sap_horizon@/themes/">?sap-ui-theme=sap_horizon@/themes/</a>
66+
<br /><a href="?sap-ui-themeRoot=/themes/">?sap-ui-themeRoot=/themes/</a>
67+
<br /> /themes/
5968
<br /> (resolves to the current page's origin, e.g. http://localhost:8080/themes/) <br /> Same-origin — expected link element
6069
<br /> <button onclick="testSetThemeRoot('/themes/', this)">Test setThemeRoot</button> <span class="result"></span>
6170
</li>
62-
<li><a href="?sap-ui-theme=sap_horizon@./themes/">?sap-ui-theme=sap_horizon@./themes/</a><br /> ./themes/
71+
<li><a href="?sap-ui-theme=sap_horizon@./themes/">?sap-ui-theme=sap_horizon@./themes/</a>
72+
<br /><a href="?sap-ui-themeRoot=./themes/">?sap-ui-themeRoot=./themes/</a>
73+
<br /> ./themes/
6374
<br /> (resolves relative to the current page's URL, e.g. http://localhost:8080/test/pages/themes/) <br /> Same-origin — expected link element
6475
<br /> <button onclick="testSetThemeRoot('./themes/', this)">Test setThemeRoot</button> <span class="result"></span>
6576
</li>
66-
<li><a href="?sap-ui-theme=sap_horizon@../themes/">?sap-ui-theme=sap_horizon@../themes/</a><br /> ../themes/
77+
<li><a href="?sap-ui-theme=sap_horizon@../themes/">?sap-ui-theme=sap_horizon@../themes/</a>
78+
<br /><a href="?sap-ui-themeRoot=../themes/">?sap-ui-themeRoot=../themes/</a>
79+
<br /> ../themes/
6780
<br /> (resolves relative to the current page's URL, e.g. http://localhost:8080/test/themes/) <br /> Same-origin — expected link element
6881
<br /> <button onclick="testSetThemeRoot('../themes/', this)">Test setThemeRoot</button> <span class="result"></span>
6982
</li>

0 commit comments

Comments
 (0)