Change from ES6 Map to old-fashioned object

This fixes the Kokoro tests broken by []

Unfortunately this means that the return type changes from a Map to an Object as well,
so all of the .get() lines need to turn into [].  Yay weakly typed languages. And
apparently in some error conditions this method could already return the Object type
anyway, even if you passed in a Map, so it's just poorly designed.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=213808477
This commit is contained in:
mcilwain 2018-09-20 07:30:42 -07:00 committed by Ben McIlwain
parent 399cde1291
commit ae2c1071f1
4 changed files with 21 additions and 20 deletions

View file

@ -135,7 +135,7 @@ function testNavToResources() {
assertTrue(xhr.isActive());
assertEquals('/registrar-settings', xhr.getLastUri());
assertEquals(test.testXsrfToken,
xhr.getLastRequestHeaders().get('X-CSRF-Token'));
xhr.getLastRequestHeaders()['X-CSRF-Token']);
xhr.simulateResponse(200, goog.json.serialize({
status: 'SUCCESS',
message: 'OK',
@ -161,7 +161,7 @@ function testNavToContactUs() {
assertTrue(xhr.isActive());
assertEquals('/registrar-settings', xhr.getLastUri());
assertEquals(test.testXsrfToken,
xhr.getLastRequestHeaders().get('X-CSRF-Token'));
xhr.getLastRequestHeaders()['X-CSRF-Token']);
var passcode = '5-5-5-5-5';
xhr.simulateResponse(200, goog.json.serialize({
status: 'SUCCESS',