Two sets of V and Rc light curves of V789 Her and one complete set of BVRcIc light curves of V1007 Cas were observed and presented. By analyzing all these light curves together with the Sloan g'i' light curves observed by Kjurkchieva et al., we determined that both systems are W-subtype contact binaries and that V789 Her is a medium contact system, while V1007 Cas is a shallow contact system. Because the two binaries show totally eclipsing primary minima, the photometric results are reliable. In addition, the light curves of the two systems are asymmetric, requiring a dark spot on the primary or the secondary component in the modeling. By compiling all available times of minimum light including literatures, SuperWASP archive and ours, we analyzed the orbital period variations. We derived that the O - C diagram of V789 Her displays a periodic oscillation whose period and amplitude are 29.2 years and 0.0179 days and the period of V1007 Cas exhibits a continuous decrease at dP/dt = -1.78(±0.09) x 10–7 days yr–1. The cyclic period modulation of V789 Her is probably attributed to the light travel time effect via a tertiary companion with very small mass. The continuous period decrease of V1007 Cas may result from the mass transfer between the two components. However, we cannot rule out the possibility of angular momentum loss because V1007 Cas shows strong magnetic activity. By analyzing the evolutionary status of the components of the two systems, we determined that they exhibit typical characteristics of other W-subtype contact binaries.