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

Unified 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: Updated to (almost) match the spec 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/LayoutTests/http/tests/budget/interfaces.html
diff --git a/third_party/WebKit/LayoutTests/http/tests/budget/interfaces.html b/third_party/WebKit/LayoutTests/http/tests/budget/interfaces.html
new file mode 100644
index 0000000000000000000000000000000000000000..f92b3a99b5119f3a673a746c1b345d174988ce10
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/http/tests/budget/interfaces.html
@@ -0,0 +1,32 @@
+<!doctype html>
+<html>
+ <head>
+ <title>Budget API: Verifies that the right Budget API interfaces get exposed.</title>
+ <script src="../resources/testharness.js"></script>
+ <script src="../resources/testharnessreport.js"></script>
+ </head>
+ <body>
+ <script>
+ promise_test(function() {
+ assert_own_property(Navigator.prototype, 'budget');
+ assert_own_property(Budget.prototype, 'getCost');
+ assert_own_property(Budget.prototype, 'getBudget');
+
+ navigator.budget.getCost()
+ .then(function(cost) {
+ assert_unreached('getCost should have failed.');
+ }, function(error) {
+ assert_equals(error.name, 'NotSupportedError');
+ assert_equals(error.message, 'Not yet implemented');
+ });
+ navigator.budget.getBudget()
+ .then(function(cost) {
+ assert_unreached('getBudget should have failed.');
+ }, function(error) {
+ assert_equals(error.name, 'NotSupportedError');
+ assert_equals(error.message, 'Not yet implemented');
+ });
+ }, 'NavigatorBudget should be exposed and have the expected interface in a Document.');
Peter Beverloo 2016/08/03 13:25:54 nit: fix indentation in this file
harkness 2016/08/04 14:18:23 Done.
+ </script>
+ </body>
+</html>
« 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