In both cases, you would not have won ELO, unless you keep playing the game until the end, with same opponent.In both cases, original opponent loses ELO, as if he had lost against you, even if he's leading the game.