function flatten_views (view) {
    var flatten = [];
    var sub = view._subviews;
    flatten.push(view);
    for (var k in sub) {
      var v = sub[k];
      flatten.push(v);
      flatten = flatten.concat(flatten_views(v));
    }
    return flatten;
  }
Utilities to help the tests
@type {Object}