Publish Vulpes Preview 15 sources for desktop, Android and Tundra
Share Gaia assets and adapters, keep private profiles and development documents local, and update both public READMEs.
This commit is contained in:
parent
93e3a48004
commit
b38dea0597
25901 changed files with 9982925 additions and 369 deletions
67
gaia/apps/system/test/marionette/lib/fakedialerapp.js
Executable file
67
gaia/apps/system/test/marionette/lib/fakedialerapp.js
Executable file
|
|
@ -0,0 +1,67 @@
|
|||
/* global module */
|
||||
'use strict';
|
||||
|
||||
function FakeDialerApp(client, origin) {
|
||||
this.client = client;
|
||||
this.origin = origin || ('app://' + FakeDialerApp.DEFAULT_ORIGIN);
|
||||
}
|
||||
|
||||
module.exports = FakeDialerApp;
|
||||
|
||||
FakeDialerApp.DEFAULT_ORIGIN = 'fakedialerapp.gaiamobile.org';
|
||||
|
||||
FakeDialerApp.Selector = Object.freeze({
|
||||
title : 'h1'
|
||||
});
|
||||
|
||||
FakeDialerApp.prototype = {
|
||||
client: null,
|
||||
|
||||
get title() {
|
||||
return this.client.findElement(FakeDialerApp.Selector.title);
|
||||
},
|
||||
|
||||
launch: function() {
|
||||
this.client.switchToFrame();
|
||||
this.client.apps.launch(this.origin);
|
||||
this.client.apps.switchToApp(this.origin);
|
||||
},
|
||||
|
||||
waitForTitleShown: function(shouldBeShown) {
|
||||
this.client.waitFor(function() {
|
||||
var shown = this.title.displayed();
|
||||
return shown === shouldBeShown;
|
||||
}.bind(this));
|
||||
},
|
||||
|
||||
getCallHeight: function() {
|
||||
this.client.switchToFrame();
|
||||
var oncallframe =
|
||||
this.client.helper.waitForElement('.attentionWindow.active iframe');
|
||||
this.client.switchToFrame(oncallframe);
|
||||
return this.client.executeScript(function() {
|
||||
return window.wrappedJSObject.innerHeight;
|
||||
});
|
||||
},
|
||||
|
||||
focusAndWaitForResize: function() {
|
||||
this.client.switchToFrame();
|
||||
var oncallframe =
|
||||
this.client.helper.waitForElement('.attentionWindow.active iframe');
|
||||
this.client.switchToFrame(oncallframe);
|
||||
|
||||
this.client.findElement('#input').click();
|
||||
|
||||
this.client.executeAsyncScript(function() {
|
||||
var win = window.wrappedJSObject;
|
||||
win.addEventListener('resize', function resizeWait() {
|
||||
win.removeEventListener('resize', resizeWait);
|
||||
marionetteScriptFinished();
|
||||
});
|
||||
});
|
||||
},
|
||||
|
||||
close: function() {
|
||||
this.client.apps.close(this.origin);
|
||||
}
|
||||
};
|
||||
Loading…
Reference in a new issue