This repository has been archived by the owner on Nov 3, 2021. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bug 1088009 - merge pull request #28310 from benfrancis:1088009-2 to …
…mozilla-b2g:master
- Loading branch information
Showing
10 changed files
with
208 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<title>Fullscreen Web App</title> | ||
<link rel="manifest" href="manifest.webapp"> | ||
</head> | ||
<body> | ||
<h1>Fullscreen W3C Web App</h1> | ||
</body> | ||
</html> |
5 changes: 5 additions & 0 deletions
5
apps/system/test/marionette/web_app_fullscreen/manifest.webapp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"name": "Fullscreen W3C Web App", | ||
"display": "fullscreen", | ||
"launch_path": "/index.html" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<title>Minimal UI W3C Web App</title> | ||
<link rel="manifest" href="manifest.webapp"> | ||
</head> | ||
<body> | ||
<h1>Minimal UI W3C Web App</h1> | ||
</body> | ||
</html> |
5 changes: 5 additions & 0 deletions
5
apps/system/test/marionette/web_app_minimal_ui/manifest.webapp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"name": "Minimal UI W3C Web App", | ||
"display": "minimal-ui", | ||
"launch_path": "/index.html" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<title>Standalone W3C Web App</title> | ||
<link rel="manifest" href="manifest.webapp"> | ||
</head> | ||
<body> | ||
<h1>Standalone W3C Web App</h1> | ||
</body> | ||
</html> |
5 changes: 5 additions & 0 deletions
5
apps/system/test/marionette/web_app_standalone/manifest.webapp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"name": "Standalone W3C Web App", | ||
"display": "standalone", | ||
"launch_path": "/index.html" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
'use strict'; | ||
|
||
var assert = require('assert'); | ||
|
||
marionette('Web Manifest Display Modes >', function() { | ||
|
||
var client = marionette.client({ | ||
prefs: { | ||
'dom.w3c_touch_events.enabled': 1 | ||
}, | ||
settings: { | ||
'ftu.manifestURL': null, | ||
'lockscreen.enabled': false | ||
}, | ||
apps: { | ||
'web_app_minimal_ui.gaiamobile.org': __dirname + '/web_app_minimal_ui', | ||
'web_app_standalone.gaiamobile.org': __dirname + '/web_app_standalone', | ||
'web_app_fullscreen.gaiamobile.org': __dirname + '/web_app_fullscreen' | ||
} | ||
}); | ||
|
||
var system, frame; | ||
|
||
setup(function() { | ||
system = client.loader.getAppClass('system'); | ||
system.waitForStartup(); | ||
}); | ||
|
||
test('minimal-ui', function() { | ||
var appOrigin = 'app://web_app_minimal_ui.gaiamobile.org'; | ||
frame = system.waitForLaunch(appOrigin); | ||
client.switchToFrame(frame); | ||
client.helper.waitForElement('body'); | ||
client.switchToFrame(); | ||
var windowClass = system.currentWindow.getAttribute('class'); | ||
assert.ok(windowClass.indexOf('collapsible') != -1); | ||
assert.ok(windowClass.indexOf('scrollable') != -1); | ||
}); | ||
|
||
test('standalone', function() { | ||
var appOrigin = 'app://web_app_standalone.gaiamobile.org'; | ||
frame = system.waitForLaunch(appOrigin); | ||
client.switchToFrame(frame); | ||
client.helper.waitForElement('body'); | ||
client.switchToFrame(); | ||
var windowClass = system.currentWindow.getAttribute('class'); | ||
assert.ok(windowClass.indexOf('collapsible') == -1); | ||
assert.ok(windowClass.indexOf('scrollable') == -1); | ||
}); | ||
|
||
test('fullscreen', function() { | ||
var appOrigin = 'app://web_app_fullscreen.gaiamobile.org'; | ||
frame = system.waitForLaunch(appOrigin); | ||
client.switchToFrame(frame); | ||
client.helper.waitForElement('body'); | ||
client.switchToFrame(); | ||
var windowClass = system.currentWindow.getAttribute('class'); | ||
assert.ok(windowClass.indexOf('collapsible') == -1); | ||
assert.ok(windowClass.indexOf('scrollable') == -1); | ||
assert.ok(windowClass.indexOf('fullscreen-app') != -1); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters