This paper proposed an X-band phase shifter for the very compact inverse Compton scattering gamma-ray source program at Tsinghua University and conducted its structure design, numerical simulation, fabrication, cold test, and high-power testing. This phase shifter is composed of a polarizer, circular waveguide, and a piston with a choke structure. The simulation results show that the reflection coefficient of the phase shifter is under -40 dB and the insertion coefficient exceeds -0.06 dB at the operating frequency of 11.424GHz. The phase variation is 20°/mm, and a linear phase change from 0° to 360° can be achieved with a piston displacement of 18mm. The manufactured phase shifter has exhibited good performance in the cold test by using the vector network analyzer. After 16h conditioning in the Tsinghua X-band high-power test stand, the phase shifter reached a peak power of 72MW at 230ns pulse width and a peak power of 82MW at 130ns pulse width. After processing signals from the high-speed oscilloscope, it was found that the transmission phase variations were in good agreement with the simulation results.