Bug 1551952: Rename assertAuthenticatedRequest r=leplatrem
authorEthan Glasser-Camp <ethan@betacantrips.com>
Thu, 16 May 2019 13:11:53 +0000
changeset 474059 7cc38bae111155727ac9ccb6963caa338b4c8288
parent 474058 8b9b08b7c3ff7529044d7950a1fdd697209d50a9
child 474060 14b42e8bd2b5bd973323690c11e823237a8f08a4
push id36022
push userncsoregi@mozilla.com
push dateThu, 16 May 2019 21:55:16 +0000
treeherdermozilla-central@96802be91766 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersleplatrem
bugs1551952
milestone68.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1551952: Rename assertAuthenticatedRequest r=leplatrem This doesn't apply to httpd requests, so give it a name that makes it clear what applies to. Differential Revision: https://phabricator.services.mozilla.com/D31378
toolkit/components/extensions/test/xpcshell/test_ext_storage_sync.js
--- a/toolkit/components/extensions/test/xpcshell/test_ext_storage_sync.js
+++ b/toolkit/components/extensions/test/xpcshell/test_ext_storage_sync.js
@@ -460,38 +460,38 @@ async function withSignedInUser(user, f)
   };
   let extensionStorageSync = new ExtensionStorageSync(fxaServiceMock, telemetryMock);
   await f(extensionStorageSync, fxaServiceMock);
 }
 
 // Some assertions that make it easier to write tests about what was
 // posted and when.
 
-// Assert that the request was made with the correct access token.
+// Assert that a post in a batch was made with the correct access token.
 // This should be true of all requests, so this is usually called from
 // another assertion.
-function assertAuthenticatedRequest(post) {
+function assertAuthenticatedPost(post) {
   equal(post.headers.Authorization, "Bearer some-access-token");
 }
 
 // Assert that this post was made with the correct request headers to
 // create a new resource while protecting against someone else
 // creating it at the same time (in other words, "If-None-Match: *").
-// Also calls assertAuthenticatedRequest(post).
+// Also calls assertAuthenticatedPost(post).
 function assertPostedNewRecord(post) {
-  assertAuthenticatedRequest(post);
+  assertAuthenticatedPost(post);
   equal(post.headers["If-None-Match"], "*");
 }
 
 // Assert that this post was made with the correct request headers to
 // update an existing resource while protecting against concurrent
 // modification (in other words, `If-Match: "${etag}"`).
-// Also calls assertAuthenticatedRequest(post).
+// Also calls assertAuthenticatedPost(post).
 function assertPostedUpdatedRecord(post, since) {
-  assertAuthenticatedRequest(post);
+  assertAuthenticatedPost(post);
   equal(post.headers["If-Match"], `"${since}"`);
 }
 
 // Assert that this post was an encrypted keyring, and produce the
 // decrypted body. Sanity check the body while we're here.
 const assertPostedEncryptedKeys = async function(fxaService, post) {
   equal(post.path, collectionRecordsPath("storage-sync-crypto") + "/keys");