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

Unified Diff: third_party/WebKit/LayoutTests/http/tests/budget/resources/instrumentation-service-worker.js

Issue 2578513002: Expose BudgetState interface to Workers. (Closed)
Patch Set: Created 4 years 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/resources/instrumentation-service-worker.js
diff --git a/third_party/WebKit/LayoutTests/http/tests/budget/resources/instrumentation-service-worker.js b/third_party/WebKit/LayoutTests/http/tests/budget/resources/instrumentation-service-worker.js
index c4491ec18e191abe9c78231046a2f40cf57669fc..e2686ad5d2abf17e37135700b44d62e772f7dd05 100644
--- a/third_party/WebKit/LayoutTests/http/tests/budget/resources/instrumentation-service-worker.js
+++ b/third_party/WebKit/LayoutTests/http/tests/budget/resources/instrumentation-service-worker.js
@@ -54,7 +54,10 @@ self.addEventListener('message', function(workerEvent) {
WorkerNavigator.prototype.hasOwnProperty('budget') &&
BudgetService.prototype.hasOwnProperty('getCost') &&
BudgetService.prototype.hasOwnProperty('getBudget') &&
- BudgetService.prototype.hasOwnProperty('reserve')
+ BudgetService.prototype.hasOwnProperty('reserve') &&
+ 'BudgetState' in self &&
+ BudgetState.prototype.hasOwnProperty('budgetAt') &&
+ BudgetState.prototype.hasOwnProperty('time');
Peter Beverloo 2016/12/14 11:37:08 Something that crossed my mind - we have no tests
harkness 2016/12/14 13:48:58 Sure, I can look into adding something for one or
} catch(err) {
message = err.message;
}

Powered by Google App Engine
This is Rietveld 408576698