Topology manifesting in many branches of physics deepens our understanding on state of matters. Topological photonics has recently become a rapidly growing field since artificial photonic structures can be well designed and constructed to support topological states, especially a promising large-scale implementation of these states using photonic chips. Meanwhile, due to the inapplicability of Hall conductance to photons, it is still an elusive problem to directly measure the integer topological invariants and topological phase transitions for photons. Here, we present a direct observation of topological winding numbers by using bulk-state photon dynamics on a chip. Furthermore, we for the first time experimentally observe the topological phase transition points via single-photon dynamics. The integrated topological structures, direct measurement in the single-photon regime and strong robustness against disorder add the key elements into the toolbox of `quantum topological photonics and may enable topologically protected quantum information processing in large scale.