Skip to content

Commit 1cb9dae

Browse files
[appmanifest] Test orientation member (#24378)
* [appmanifest] Add orientation member test * [appmanifest] add portrait orientation test
1 parent 93caf8c commit 1cb9dae

6 files changed

+58
-0
lines changed
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<!DOCTYPE html>
2+
<title>Test that orientation member with landscape value is supported</title>
3+
<link rel="help" href="https://w3c.github.io/manifest#orientation-member" />
4+
<link rel="manifest" href="orientation-member-landscape.webmanifest" />
5+
<meta name="viewport" content="width=device-width, initial-scale=1">
6+
<h1>Testing support for orientation member with "landscape" value</h1>
7+
<style>
8+
@media all and (orientation: landscape) {
9+
body {
10+
background-color: green;
11+
}
12+
}
13+
@media all and (orientation: portrait) {
14+
body {
15+
background-color: red;
16+
}
17+
}
18+
</style>
19+
<p>
20+
Please set the phone orientation to portrait.
21+
</p>
22+
<p>
23+
To pass, after installing the display orientation must be landscape and the background must be green.
24+
</p>
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"display": "standalone",
3+
"orientation": "landscape"
4+
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Content-Type: application/manifest+json; charset=utf-8
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<!DOCTYPE html>
2+
<title>Test that orientation member with portrait value is supported</title>
3+
<link rel="help" href="https://w3c.github.io/manifest#orientation-member" />
4+
<link rel="manifest" href="orientation-member-portrait.webmanifest" />
5+
<meta name="viewport" content="width=device-width, initial-scale=1">
6+
<h1>Testing support for orientation member with "portrait" value</h1>
7+
<style>
8+
@media all and (orientation: portrait) {
9+
body {
10+
background-color: green;
11+
}
12+
}
13+
@media all and (orientation: landscape) {
14+
body {
15+
background-color: red;
16+
}
17+
}
18+
</style>
19+
<p>
20+
Please set the phone orientation to landscape.
21+
</p>
22+
<p>
23+
To pass, after installing the display orientation must be portrait and the background must be green.
24+
</p>
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"display": "standalone",
3+
"orientation": "portrait"
4+
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Content-Type: application/manifest+json; charset=utf-8

0 commit comments

Comments
 (0)