chore(l10n): Update from l10n-central Thu Dec 06 2018 17:41:23 GMT-0500 (EST) (#4584)
This commit is contained in:
Родитель
8f0bbbffef
Коммит
31c55d661c
|
@ -27,7 +27,7 @@ export class _StartupOverlay extends React.PureComponent {
|
|||
try {
|
||||
this.didFetch = true;
|
||||
const fxaParams = "entrypoint=activity-stream-firstrun&utm_source=activity-stream&utm_campaign=firstrun&form_type=email";
|
||||
const response = await fetch(`${this.props.fxa_endpoint}/metrics-flow?${fxaParams}`);
|
||||
const response = await fetch(`${this.props.fxa_endpoint}/metrics-flow?${fxaParams}`, {credentials: "omit"});
|
||||
if (response.status === 200) {
|
||||
const {flowId, flowBeginTime} = await response.json();
|
||||
this.setState({flowId, flowBeginTime});
|
||||
|
|
|
@ -47,7 +47,7 @@ export class SubmitFormSnippet extends React.PureComponent {
|
|||
{url: this.refs.form.action, formData: new FormData(this.refs.form)};
|
||||
|
||||
try {
|
||||
const fetchRequest = new Request(url, {body: formData, method: "POST"});
|
||||
const fetchRequest = new Request(url, {body: formData, method: "POST", credentials: "omit"});
|
||||
const response = await fetch(fetchRequest);
|
||||
json = await response.json();
|
||||
} catch (err) {
|
||||
|
|
|
@ -29,7 +29,7 @@ this.TippyTopProvider = class TippyTopProvider {
|
|||
async init() {
|
||||
// Load the Tippy Top sites from the json manifest.
|
||||
try {
|
||||
for (const site of await (await fetch(TIPPYTOP_JSON_PATH)).json()) {
|
||||
for (const site of await (await fetch(TIPPYTOP_JSON_PATH, {credentials: "omit"})).json()) {
|
||||
// The tippy top manifest can have a url property (string) or a
|
||||
// urls property (array of strings)
|
||||
for (const url of site.url ? [site.url] : site.urls || []) {
|
||||
|
|
|
@ -168,7 +168,7 @@ this.TopStoriesFeed = class TopStoriesFeed {
|
|||
return;
|
||||
}
|
||||
try {
|
||||
const response = await fetch(this.stories_endpoint);
|
||||
const response = await fetch(this.stories_endpoint, {credentials: "omit"});
|
||||
if (!response.ok) {
|
||||
throw new Error(`Stories endpoint returned unexpected status: ${response.status}`);
|
||||
}
|
||||
|
@ -288,7 +288,7 @@ this.TopStoriesFeed = class TopStoriesFeed {
|
|||
return;
|
||||
}
|
||||
try {
|
||||
const response = await fetch(this.topics_endpoint);
|
||||
const response = await fetch(this.topics_endpoint, {credentials: "omit"});
|
||||
if (!response.ok) {
|
||||
throw new Error(`Topics endpoint returned unexpected status: ${response.status}`);
|
||||
}
|
||||
|
|
|
@ -267,7 +267,7 @@ describe("Top Stories Feed", () => {
|
|||
|
||||
assert.calledOnce(fetchStub);
|
||||
assert.calledOnce(shortURLStub);
|
||||
assert.calledWithExactly(fetchStub, instance.stories_endpoint);
|
||||
assert.calledWithExactly(fetchStub, instance.stories_endpoint, {credentials: "omit"});
|
||||
assert.calledOnce(sectionsManagerStub.updateSection);
|
||||
assert.calledWith(sectionsManagerStub.updateSection, SECTION_ID, {rows: stories});
|
||||
assert.calledOnce(instance.cache.set);
|
||||
|
@ -335,7 +335,7 @@ describe("Top Stories Feed", () => {
|
|||
await instance.onInit();
|
||||
|
||||
assert.calledOnce(fetchStub);
|
||||
assert.calledWithExactly(fetchStub, instance.stories_endpoint);
|
||||
assert.calledWithExactly(fetchStub, instance.stories_endpoint, {credentials: "omit"});
|
||||
assert.equal(instance.storiesLastUpdated, 0);
|
||||
assert.called(Cu.reportError);
|
||||
});
|
||||
|
@ -397,7 +397,7 @@ describe("Top Stories Feed", () => {
|
|||
await instance.onInit();
|
||||
|
||||
assert.calledOnce(fetchStub);
|
||||
assert.calledWithExactly(fetchStub, instance.topics_endpoint);
|
||||
assert.calledWithExactly(fetchStub, instance.topics_endpoint, {credentials: "omit"});
|
||||
assert.calledOnce(sectionsManagerStub.updateSection);
|
||||
assert.calledWithMatch(sectionsManagerStub.updateSection, SECTION_ID, {topics});
|
||||
assert.calledOnce(instance.cache.set);
|
||||
|
@ -413,7 +413,7 @@ describe("Top Stories Feed", () => {
|
|||
await instance.fetchTopics();
|
||||
|
||||
assert.calledOnce(fetchStub);
|
||||
assert.calledWithExactly(fetchStub, instance.topics_endpoint);
|
||||
assert.calledWithExactly(fetchStub, instance.topics_endpoint, {credentials: "omit"});
|
||||
assert.notCalled(instance.store.dispatch);
|
||||
assert.called(Cu.reportError);
|
||||
});
|
||||
|
|
Загрузка…
Ссылка в новой задаче