Skip to content
This repository has been archived by the owner on Sep 10, 2019. It is now read-only.

Commit

Permalink
Minor test fix
Browse files Browse the repository at this point in the history
  • Loading branch information
wittemann committed Apr 23, 2015
1 parent d7a49b7 commit 7794840
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions framework/source/test/tests/application/Mobile.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ describe("application.Mobile", function () {

var app = new qx.application.Mobile();
app.main();
// has body classes
// has body classes
qxWeb(document.body).hasClass(Env.get("os.name"));

var osVersion = Env.get("os.version");
Expand All @@ -43,11 +43,16 @@ describe("application.Mobile", function () {
it("get and set root", function () {
var app = new qx.application.Mobile();
app.main();

// mock _createRootWidget to prevent the usage of document body as root
app._createRootWidget = function() {
return new qx.ui.core.Root(sandbox[0]);
};
var root = app.getRoot();
assert.instanceOf(root, qx.ui.core.Root);
assert.isTrue(root.showScrollbarY);

var myRoot = new qx.ui.core.Root();
var myRoot = new qx.ui.core.Root(sandbox[0]);
app.setRoot(myRoot);
assert.isTrue(app.getRoot() === myRoot);
});
Expand Down

0 comments on commit 7794840

Please sign in to comment.