Update DomTreeExtractionBrowserTest.

Assigned Node ID may not be the same for each executions of the test
DomTreeExtractionBrowserTest.RunAsyncTest. This CL clears the value of
backendNodeId to make this test more deterministic.

backendNodeId uses DOMNodIds::IdForNode(). Here are two stack traces
where the ID number 3 is assigned to a different Node.

02 blink::DOMNodeIds::IdForNode()
03 blink::InspectorDOMSnapshotAgent::VisitNode()
04 blink::InspectorDOMSnapshotAgent::VisitContainerChildren()
05 blink::InspectorDOMSnapshotAgent::VisitNode()
06 blink::InspectorDOMSnapshotAgent::getSnapshot()
07 blink::InspectorDOMSnapshotAgent::getSnapshot()
08 blink::protocol::DOMSnapshot::DispatcherImpl::getSnapshot()
09 blink::protocol::DOMSnapshot::DispatcherImpl::dispatch()
10 blink::protocol::UberDispatcher::dispatch()
11 blink::InspectorSession::DispatchProtocolMessage()
12 blink::WebDevToolsAgentImpl::Session::DispatchProtocolCommand()
13 blink::mojom::blink::DevToolsSessionStubDispatch::Accept()

02 blink::DOMNodeIds::IdForNode()
03 blink::CompositedLayerMapping::CreateGraphicsLayer()
04 blink::CompositedLayerMapping::CreatePrimaryGraphicsLayer()
05 blink::CompositedLayerMapping::CompositedLayerMapping()
06 blink::PaintLayer::EnsureCompositedLayerMapping()
07 blink::PaintLayerCompositor::AllocateOrClearCompositedLayerMapping()
08 blink::CompositingLayerAssigner::AssignLayersToBackingsInternal()
09 blink::CompositingLayerAssigner::Assign()
10 blink::PaintLayerCompositor::UpdateIfNeeded()
11 blink::PaintLayerCompositor::UpdateIfNeededRecursiveInternal()
12 blink::PaintLayerCompositor::UpdateIfNeededRecursive()
13 blink::LocalFrameView::UpdateLifecyclePhasesInternal()
14 blink::LocalFrameView::UpdateAllLifecyclePhases()
15 blink::PageAnimator::UpdateAllLifecyclePhases()
16 blink::PageWidgetDelegate::UpdateLifecycle()
17 blink::WebViewImpl::UpdateLifecycle()
18 blink::WebViewFrameWidget::UpdateLifecycle()
19 content::RenderWidget::UpdateVisualState()
20 content::RenderWidgetCompositor::UpdateLayerTreeHost()
21 cc::LayerTreeHost::RequestMainFrameUpdate()

Currently, this test doesn't appear to be flaky. I am working on:
https://crbug.com/831155. It causes the navigation to commit slightly
faster. The test fails one time out of four, all the backendNodeId in
getSnapshot() are shifted by one.

Bug: 831155
Change-Id: I83a30202877bb65953957438284062f13fabeb6c
Reviewed-on: https://chromium-review.googlesource.com/1101693
Reviewed-by: Alex Clarke <alexclarke@chromium.org>
Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
Commit-Queue: Arthur Sonzogni <arthursonzogni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#567640}
2 files changed