In this case the test was "substantive speech". IANAL, but my layman's understanding is that in order for some action to be protected under free speech laws it has to intentionally communicating some coherent message.
So, for example, if I was kicked out of a restaurant for not wearing shoes I couldn't generally claim free speech protections for my lack of footwear. However if I did so as part of some theoretical organized protest involving shoes then I could, as in the second case my unshod state was clearly intended to convey some message.