package com.peachpasswords.autofill import org.junit.Assert.assertEquals import org.junit.Assert.assertTrue import org.junit.Test /** * Regression pin for the 2026-08-07 Fold 7 crash loop: Facebook Messenger * presented an autofillHints array containing a null entry and classify() * dereferenced it, crashing the autofill service on every fill request * (One UI then surfaces the repeated "app keeps stopping" dialog). Hint * arrays are third-party input and must never crash the parser. */ class AssistStructureNullHintsTest { @Test fun null_hint_entries_are_dropped() { assertEquals( listOf("password", "username"), AssistStructureParser.nonNullHints(arrayOf(null, "password", null, "username")), ) } @Test fun all_null_array_is_empty() { assertTrue(AssistStructureParser.nonNullHints(arrayOf(null, null)).isEmpty()) } @Test fun absent_hints_is_empty() { assertTrue(AssistStructureParser.nonNullHints(null).isEmpty()) } }