It is widely agreed in empirical studies that allowing for potential structural change in economic processes is an important issue. In existing literature, tests for cointegration between time series data allow for one regime shift. This paper extends three residual-based test statistics for cointegration to the cases that take into account two possible regime shifts. The timing of each shift is unknown a priori and it is determined endogenously. The distributions of the tests are non-standard. We generate new critical values via simulation methods. The size and power properties of these test statistics are evaluated through Monte Carlo simulations, which show the tests have small size distortions and very good power properties. The test methods introduced in this paper are applied to determine whether the financial markets in the US and the UK are integrated.