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

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: Integrated code review comments. Created 4 years, 5 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 <script src="../serviceworker/resources/test-helpers.js"></script>
Peter Beverloo 2016/07/22 12:27:01 What are you using from this file?
harkness 2016/08/03 09:34:05 Removed.
8 </head>
9 <body>
10 <script>
11 test(function() {
Peter Beverloo 2016/07/22 12:27:01 Please use promise_test. Right now, your test wil
harkness 2016/08/03 09:34:05 Done.
12 assert_own_property(Navigator.prototype, 'getCost');
13 assert_own_property(Navigator.prototype, 'getBudget');
14 assert_own_property(Navigator.prototype, 'getBudgetDetails');
15
16 navigator.getCost()
17 .then(function(cost) {
18 assert_unreached('getCost should have failed.');
19 }, function(error) {
20 assert_equals(error.name, 'NotSupportedError');
21 assert_equals(error.message, 'Not yet implemented');
22 });
23 navigator.getBudget()
24 .then(function(cost) {
25 assert_unreached('getBudget should have failed.');
26 }, function(error) {
27 assert_equals(error.name, 'NotSupportedError');
28 assert_equals(error.message, 'Not yet implemented');
29 });
30 navigator.getBudgetDetails()
31 .then(function(cost) {
32 assert_unreached('getBudgetDetails should have failed.');
33 }, function(error) {
34 assert_equals(error.name, 'NotSupportedError');
35 assert_equals(error.message, 'Not yet implemented');
36 });
37 }, 'NavigatorBudget should be exposed and have the expected interface in a Document.');
38 </script>
39 </body>
40 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698