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

Side by Side Diff: third_party/WebKit/LayoutTests/storage/quota/storagemanager-estimate.html

Issue 1926813004: Replace assert_promise_rejects with upstream promise_rejects. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove all testharness-helpers.js references Created 4 years, 7 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
« no previous file with comments | « third_party/WebKit/LayoutTests/resources/testharness-helpers.js ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <title>StorageManager: estimate()</title> 2 <title>StorageManager: estimate()</title>
3 <script src="../../resources/testharness.js"></script> 3 <script src="../../resources/testharness.js"></script>
4 <script src="../../resources/testharnessreport.js"></script> 4 <script src="../../resources/testharnessreport.js"></script>
5 <script src="resources/testharness-helpers.js"></script>
6 <script> 5 <script>
7 6
8 test(function(t) { 7 test(function(t) {
9 assert_true('estimate' in window.navigator.storage); 8 assert_true('estimate' in window.navigator.storage);
10 assert_equals(typeof window.navigator.storage.estimate, 'function'); 9 assert_equals(typeof window.navigator.storage.estimate, 'function');
11 assert_true(window.navigator.storage.estimate() instanceof Promise); 10 assert_true(window.navigator.storage.estimate() instanceof Promise);
12 }, 'estimate() method exists and returns a Promise'); 11 }, 'estimate() method exists and returns a Promise');
13 12
14 promise_test(function(t) { 13 promise_test(function(t) {
15 return window.navigator.storage.estimate().then(function(result) { 14 return window.navigator.storage.estimate().then(function(result) {
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 // the data or pre-allocate blocks larger than the value being store d. 72 // the data or pre-allocate blocks larger than the value being store d.
74 assert_greater_than_equal(after - before, large_value.length, 73 assert_greater_than_equal(after - before, large_value.length,
75 'increase should be at least as large as value stored'); 74 'increase should be at least as large as value stored');
76 75
77 db.close(); 76 db.close();
78 return deleteDB(name); 77 return deleteDB(name);
79 }); 78 });
80 }, 'estimate() shows usage increase after large value is stored'); 79 }, 'estimate() shows usage increase after large value is stored');
81 80
82 </script> 81 </script>
OLDNEW
« no previous file with comments | « third_party/WebKit/LayoutTests/resources/testharness-helpers.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698