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..b8f0fd870c9827fb8db4aa2df12e2e32be6762ab |
--- /dev/null |
+++ b/third_party/WebKit/LayoutTests/http/tests/budget/interfaces.html |
@@ -0,0 +1,40 @@ |
+<!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> |
+ <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.
|
+ </head> |
+ <body> |
+ <script> |
+ 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.
|
+ assert_own_property(Navigator.prototype, 'getCost'); |
+ assert_own_property(Navigator.prototype, 'getBudget'); |
+ assert_own_property(Navigator.prototype, 'getBudgetDetails'); |
+ |
+ navigator.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.getBudget() |
+ .then(function(cost) { |
+ assert_unreached('getBudget should have failed.'); |
+ }, function(error) { |
+ assert_equals(error.name, 'NotSupportedError'); |
+ assert_equals(error.message, 'Not yet implemented'); |
+ }); |
+ navigator.getBudgetDetails() |
+ .then(function(cost) { |
+ assert_unreached('getBudgetDetails 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.'); |
+ </script> |
+ </body> |
+</html> |