package browser import "testing" // TestCdpCloseWrappers es un smoke nil-safe de los wrappers nombrados. Sin Chrome: // con conexión nil y pid 0 no hay nada que cerrar ni matar, así que no debe error. func TestCdpCloseWrappers(t *testing.T) { t.Run("CdpDisconnect(nil) no error (nada que cerrar)", func(t *testing.T) { if err := CdpDisconnect(nil); err != nil { t.Errorf("CdpDisconnect(nil) = %v, esperaba nil", err) } }) t.Run("CdpQuit(nil, 0) no error (sin conexion ni pid)", func(t *testing.T) { if err := CdpQuit(nil, 0); err != nil { t.Errorf("CdpQuit(nil, 0) = %v, esperaba nil", err) } }) t.Run("CdpClose(nil, 0) sigue siendo no-op", func(t *testing.T) { if err := CdpClose(nil, 0); err != nil { t.Errorf("CdpClose(nil, 0) = %v, esperaba nil", err) } }) }