on H1B, move to Canada for 1 year and come back


if I am on H1B and I decide to move to Canada for project purposes and come back to US with same employer after 1,1.5 Years, what will happen to my H1B status by then?

Scenario1: H1B stamped till May 2018 but no extension. when i will try to come back from Canada by 2019, would i be allowed?

Scenario2: H1B stamped till May 2018, get extension till 2020(not stamped though), now when i try to come back from canada in 2019, would i be allowed by stamping my latest i797?

Note: i also have approved i140

Any other scenario that you know of and can help understand? Thanks