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

Unified Diff: third_party/WebKit/LayoutTests/http/tests/serviceworker/navigation-preload/resources/helpers.js

Issue 2521793004: service worker: Persist NavigationPreloadState (Closed)
Patch Set: add test and comment Created 4 years, 1 month 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/serviceworker/navigation-preload/resources/helpers.js
diff --git a/third_party/WebKit/LayoutTests/http/tests/serviceworker/navigation-preload/resources/helpers.js b/third_party/WebKit/LayoutTests/http/tests/serviceworker/navigation-preload/resources/helpers.js
new file mode 100644
index 0000000000000000000000000000000000000000..ec0e7df37467429e2f7fa0ad949e8ccdab9a3d37
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/http/tests/serviceworker/navigation-preload/resources/helpers.js
@@ -0,0 +1,5 @@
+function expect_state(state, enabled, header, desc) {
horo 2016/11/24 08:59:46 Nit: This method should have a more specific name.
falken 2016/11/24 13:36:24 Done.
+ assert_equals(Object.keys(state).length, 2, desc + ': # of keys');
+ assert_equals(state.enabled, enabled, desc + ': enabled');
+ assert_equals(state.headerValue, header, desc + ': header');
+}

Powered by Google App Engine
This is Rietveld 408576698