Fixed for decoder dl speed and mobile warnings on low memory devices.
This commit is contained in:
@@ -70,6 +70,20 @@ describe("shouldWarnBeforeLoad", () => {
|
||||
).toBe(false);
|
||||
});
|
||||
|
||||
// D-029: deviceMemoryGB 2-4 is the ordinary (not just budget) Android
|
||||
// range today — these must still warn for Medium+, the exact class of
|
||||
// phone the original D-027 crash report was about.
|
||||
test("warns on mobile mid-range devices (deviceMemory 2-4) for Medium+", () => {
|
||||
for (const deviceMemoryGB of [2, 4]) {
|
||||
expect(
|
||||
shouldWarnBeforeLoad(
|
||||
{ userAgent: ANDROID_UA, maxTouchPoints: 5, deviceMemoryGB },
|
||||
MEDIUM_PEAK_BYTES,
|
||||
),
|
||||
).toBe(true);
|
||||
}
|
||||
});
|
||||
|
||||
test("falls back to a flat threshold when deviceMemory is unreported (iOS)", () => {
|
||||
expect(
|
||||
shouldWarnBeforeLoad(
|
||||
|
||||
Reference in New Issue
Block a user