I've got experience as you expect. You can check in for both flights, but in Toronto airport, you gotta check in again and drop your luggage at Air Canada's counter just outside the customs hall, they may ask you to take another flight depending on the availability, coz the planes between Toronto and Ottawa are small. But doesn't matter, usually one flight per hour, you won't wait long.
It's a little bit different from Vancouver airport, where you don't check in again, just drop your luggage to Air Canada's counter. But you made a good choice even you probably pay more, Shanghai via Toronto to Ottawa is much better then via Vancouver on shorter travel time and frequent shuttle flights between Toronto and Ottawa. In Vancouver airport, you have at least 80% chance to miss the only flight from Vancouver to Ottawa in the afternoon. You either find a hotel nearby Vancouver airport and take the flight of early next morning, of course at your own expense for hotel, or wait for available flight to Toronto and then to Ottawa, you'll be exhausted.