  Wheeler's delayed-choice experiment investigates the indeterminacy of
wave-particle duality and the role played by the measurement apparatus in
quantum theory. Due to the inconsistency with classical physics, it has been
generally believed that it is not possible to reproduce the delayed-choice
experiment using a hidden variable theory. Recently, it was shown that this
assumption was incorrect, and in fact Wheeler's delayed-choice experiment can
be explained by a causal two dimensional hidden-variable theory [R. Chaves, G.
B. Lemos, and J. Pienaar, Phys. Rev. Lett. 120, 190401 (2018)]. Here, we carry
out an experiment of a device-independent delayed-choice experiment using
photon states that are space-like separated, and demonstrate a loophole-free
version of the delayed-choice protocol that is consistent with quantum theory
but inconsistent with any causal two-dimensional hidden variable theory. This
salvages Wheeler's thought experiment and shows that causality can be used to
test quantum theory in a complementary way to the Bell and Leggett-Garg tests.
