Add fake global app for testing

Change-Id: I7730b8c3d712d41570b1c9551aac95a1397a52a3
This commit is contained in:
Andrew Bonventre 2015-12-01 14:10:11 -05:00
parent 0311efa6d0
commit 5711981711
3 changed files with 30 additions and 0 deletions

View File

@ -0,0 +1,28 @@
// Copyright (C) 2015 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
'use strict';
/**
* A stub of the global gr-app element. Use this for testing.
*/
var app = {
accountReady: {
then: function(cb) { cb(); },
},
configReady: {
then: function(cb) { cb(); },
},
loggedIn: false,
};

View File

@ -20,6 +20,7 @@ limitations under the License.
<script src="../../bower_components/webcomponentsjs/webcomponents-lite.min.js"></script>
<script src="../../bower_components/web-component-tester/browser.js"></script>
<script src="../scripts/fake-app.js"></script>
<link rel="import" href="../elements/gr-change-list-item.html">

View File

@ -20,6 +20,7 @@ limitations under the License.
<script src="../../bower_components/webcomponentsjs/webcomponents-lite.min.js"></script>
<script src="../../bower_components/web-component-tester/browser.js"></script>
<script src="../scripts/fake-app.js"></script>
<link rel="import" href="../../bower_components/iron-test-helpers/iron-test-helpers.html">
<link rel="import" href="../elements/gr-change-list.html">