OLD | NEW |
---|---|
(Empty) | |
1 <!doctype html> | |
2 <html> | |
3 <head> | |
4 <title>Budget API: Makes basic getCost and getBudget calls.</title> | |
5 <script src="../resources/testharness.js"></script> | |
6 <script src="../resources/testharnessreport.js"></script> | |
7 <script src="/js-test-resources/mojo-helpers.js"></script> | |
8 <script src="budget-service-mock.js"></script> | |
9 </head> | |
10 <body> | |
11 <script> | |
12 if (!window.mojo) | |
13 debug('This test can not run without mojo'); | |
14 | |
15 promise_test(function() { | |
16 return budgetServiceMock.then(mock => { | |
17 assert_own_property(Navigator.prototype, 'budget'); | |
18 return navigator.budget.getBudget(); | |
19 }).then(budget => { | |
20 assert_equals(budget.length, 1); | |
21 assert_equals(budget[0].budgetAt, TEST_BUDGET_AT); | |
22 assert_equals(budget[0].time, TEST_BUDGET_TIME); | |
Peter Beverloo
2016/08/23 09:46:39
nit: please consistently indent your code (either
harkness
2016/08/23 10:06:17
Sorry about that, for some reason the auto-indenti
| |
23 }); | |
24 }, 'BudgetService mock for GetBudget should return correct results.'); | |
Peter Beverloo
2016/08/23 09:46:38
Here and elsewhere: you make it sound like you're
harkness
2016/08/23 10:06:17
Done.
| |
25 </script> | |
26 </body> | |
27 </html> | |
OLD | NEW |