Backed out 11 changesets (bug 1804903, bug 1804902, bug 1804900, bug 1804899, bug 1712329, bug 1804898, bug 1804894, bug 1804904, bug 1804896, bug 1804905) for breaking gecko decision task. CLOSED TREE
Backed out changeset 9e7813271e6b (bug 1712329) Backed out changeset 29aa1d032dd3 (bug 1804903) Backed out changeset 22ef0b00cc99 (bug 1804905) Backed out changeset 8fad832a574e (bug 1804904) Backed out changeset 60f185a3a485 (bug 1804902) Backed out changeset 8b69824de6e2 (bug 1804900) Backed out changeset 140f75f3f919 (bug 1804899) Backed out changeset f4da44b1a219 (bug 1804898) Backed out changeset 7cf946ae8295 (bug 1804896) Backed out changeset 07d62af0767f (bug 1804894) Backed out changeset 1e3e02cc3b1f (bug 1712329)
This commit is contained in:
@@ -116,18 +116,6 @@ var AttributionCode = {
|
||||
* @param {String} code to write.
|
||||
*/
|
||||
async writeAttributionFile(code) {
|
||||
// Writing attribution codes is only needed to support the Return-to-AMO
|
||||
// flow. In theory, we could support this with MSIX by "writing" them to
|
||||
// somewhere in memory, and making sure reads also read from there.
|
||||
if (
|
||||
AppConstants.platform === "win" &&
|
||||
Services.sysinfo.getProperty("hasWinPackageId")
|
||||
) {
|
||||
Services.console.logStringMessage(
|
||||
"Attribution code cannot be written for MSIX builds, aborting."
|
||||
);
|
||||
return;
|
||||
}
|
||||
let file = AttributionCode.attributionFile;
|
||||
await IOUtils.makeDirectory(file.parent.path);
|
||||
let bytes = new TextEncoder().encode(code);
|
||||
|
||||
@@ -40,27 +40,20 @@ add_task(async function test_parse_error() {
|
||||
);
|
||||
|
||||
// Write an invalid file to trigger a decode error
|
||||
// Skip this for MSIX packages though - we can't write or delete
|
||||
// the attribution file there, everything happens in memory instead.
|
||||
if (
|
||||
AppConstants.platform === "win" &&
|
||||
!Services.sysinfo.getProperty("hasWinPackageId")
|
||||
) {
|
||||
await AttributionCode.deleteFileAsync();
|
||||
AttributionCode._clearCache();
|
||||
// Empty string is valid on macOS.
|
||||
await AttributionCode.writeAttributionFile(
|
||||
AppConstants.platform == "macosx" ? "invalid" : ""
|
||||
);
|
||||
result = await AttributionCode.getAttrDataAsync();
|
||||
Assert.deepEqual(result, {}, "Should have failed to parse");
|
||||
await AttributionCode.deleteFileAsync();
|
||||
AttributionCode._clearCache();
|
||||
// Empty string is valid on macOS.
|
||||
await AttributionCode.writeAttributionFile(
|
||||
AppConstants.platform == "macosx" ? "invalid" : ""
|
||||
);
|
||||
result = await AttributionCode.getAttrDataAsync();
|
||||
Assert.deepEqual(result, {}, "Should have failed to parse");
|
||||
|
||||
// `assertHistogram` also ensures that `read_error` index 0 is 0
|
||||
// as we should not have recorded telemetry from the previous `getAttrDataAsync` call
|
||||
TelemetryTestUtils.assertHistogram(histogram, INDEX_DECODE_ERROR, 1);
|
||||
// Reset
|
||||
histogram.clear();
|
||||
}
|
||||
// `assertHistogram` also ensures that `read_error` index 0 is 0
|
||||
// as we should not have recorded telemetry from the previous `getAttrDataAsync` call
|
||||
TelemetryTestUtils.assertHistogram(histogram, INDEX_DECODE_ERROR, 1);
|
||||
// Reset
|
||||
histogram.clear();
|
||||
});
|
||||
|
||||
add_task(async function test_read_error() {
|
||||
|
||||
Reference in New Issue
Block a user