Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(247)

Side by Side Diff: third_party/WebKit/LayoutTests/http/tests/budget/interfaces.html

Issue 2110833002: Basic framework for Budget API. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removed Navigator member and exception, other nits Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 <!doctype html>
2 <html>
3 <head>
4 <title>Budget API: Verifies that the right Budget API interfaces get exposed .</title>
5 <script src="../resources/testharness.js"></script>
6 <script src="../resources/testharnessreport.js"></script>
7 </head>
8 <body>
9 <script>
10 promise_test(function() {
11 assert_own_property(Navigator.prototype, 'budget');
12 assert_own_property(Budget.prototype, 'getCost');
13 assert_own_property(Budget.prototype, 'getBudget');
14
Peter Beverloo 2016/08/05 14:33:19 nit: consider testing assert_equals(navigator.b
harkness 2016/08/08 12:07:36 Done.
15 navigator.budget.getCost()
16 .then(function(cost) {
17 assert_unreached('getCost should have failed.');
18 }, function(error) {
19 assert_equals(error.name, 'NotSupportedError');
20 assert_equals(error.message, 'Not yet implemented');
21 });
22 navigator.budget.getBudget()
23 .then(function(cost) {
24 assert_unreached('getBudget should have failed.');
25 }, function(error) {
26 assert_equals(error.name, 'NotSupportedError');
27 assert_equals(error.message, 'Not yet implemented');
28 });
29 }, 'NavigatorBudget should be exposed and have the expected interface in a Document.');
30 </script>
31 </body>
32 </html>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/modules/budget/Budget.h » ('j') | third_party/WebKit/Source/modules/budget/Budget.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698