Fix race condition in frameElement.html.

I am working on https://crbug.com/831155. Some tests that are relying
on how things are scheduled in Blink are failing.

There was a race condition in this test. The iframe "#fr2" was asked to
navigate to a first URL, but soon after, a javascript function
modifies the iframe.src to navigate elsewhere.

What happened when it didn't work?
1) The first navigation starts.
2) The second navigation is scheduled (See blink's NavigationScheduler)
3) The first navigation commits. FrameLoader::CommitProvisionalLoad()
   executes: frame_->GetNavigationScheduler().Cancel(). It cancels the
   second navigation.

This CL fixes the race condition.

Bug: 831155
Change-Id: I2dd951140b4c5a671c749348ca0247f1901d8b77
Reviewed-on: https://chromium-review.googlesource.com/1069013
Commit-Queue: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/master@{#561659}
1 file changed