| Index: third_party/WebKit/LayoutTests/http/tests/budget/success-query-path.html
|
| diff --git a/third_party/WebKit/LayoutTests/http/tests/budget/success-query-path.html b/third_party/WebKit/LayoutTests/http/tests/budget/success-query-path.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..18109910cb0c3c58a69b06dc5adadc59d7ee0fa8
|
| --- /dev/null
|
| +++ b/third_party/WebKit/LayoutTests/http/tests/budget/success-query-path.html
|
| @@ -0,0 +1,36 @@
|
| +<!doctype html>
|
| +<html>
|
| + <head>
|
| + <title>Budget API: Makes basic getCost and getBudget calls.</title>
|
| + <script src="../resources/mojo-helpers.js"></script>
|
| + <script src="../resources/testharness.js"></script>
|
| + <script src="../resources/testharnessreport.js"></script>
|
| + <script src="budget-service-mock.js"></script>
|
| + </head>
|
| + <body>
|
| + <script>
|
| + if (!window.mojo)
|
| + debug('This test can not run without mojo');
|
| +
|
| + promise_test(function() {
|
| + return budgetServiceMock.then(mock => {
|
| + assert_own_property(Navigator.prototype, 'budget');
|
| + return navigator.budget.getCost("silent-push");
|
| + }).then(cost => {
|
| + assert_equals(cost, TEST_BUDGET_COST);
|
| + });
|
| + }, 'BudgetService mock for GetCost should return correct results.');
|
| +
|
| + promise_test(function() {
|
| + return budgetServiceMock.then(mock => {
|
| + assert_own_property(Navigator.prototype, 'budget');
|
| + return navigator.budget.getBudget();
|
| + }).then(budget => {
|
| + assert_equals(budget.length, 1);
|
| + assert_equals(budget[0].amount, TEST_BUDGET_VALUE);
|
| + assert_equals(budget[0].expiration, TEST_BUDGET_EXPIRATION);
|
| + });
|
| + }, 'BudgetService mock for GetBudget should return correct results.');
|
| + </script>
|
| + </body>
|
| +</html>
|
|
|