The detection of gravitational waves by Advanced LIGO and Advanced Virgo provides an opportunity to test general relativity in a regime that is inaccessible to traditional astronomical observations and laboratory tests. We present four tests of the consistency of the data with binary black hole gravitational waveforms predicted by general relativity. One test subtracts the best-fit waveform from the data and checks the consistency of the residual with detector noise. The second test checks the consistency of the low- and high-frequency parts of the observed signals. The third test checks that phenomenological deviations introduced in the waveform model (including in the post-Newtonian coefficients) are consistent with zero. The fourth test constrains modifications to the propagation of gravitational waves due to a modified dispersion relation, including that from a massive graviton. We present results both for individual events and also results obtained by combining together particularly strong events from the first and second observing runs of Advanced LIGO and Advanced Virgo, as collected in the catalog GWTC-1. We do not find any inconsistency of the data with the predictions of general relativity and improve our previously presented combined constraints by factors of 1.1 to 2.5. In particular, we bound the mass of the graviton to be mg ≤ 4.7 x 10-23 eV/c2 (90% credible level), an improvement of a factor of 1.6 over our previously presented results. Additionally, we check that the four gravitational-wave events published for the first time in GWTC-1 do not lead to stronger constraints on alternative polarizations than those published previously.