Commit 9ee1f839 authored by Andrey Lushnikov's avatar Andrey Lushnikov Committed by Commit Bot

DevTools: fix elements-panel-restore-selection-when-node-comes-later.js

BUG=660295
TBR=dgozman

Change-Id: I977dc25453e2dbe0f92e95bf1111d6122de747b7
Reviewed-on: https://chromium-review.googlesource.com/828148
Commit-Queue: Andrey Lushnikov <lushnikov@chromium.org>
Reviewed-by: default avatarAndrey Lushnikov <lushnikov@chromium.org>
Cr-Commit-Position: refs/heads/master@{#524291}
parent 4cbe8ee5
...@@ -2583,7 +2583,6 @@ crbug.com/701047 [ Mac10.12 ] editing/style/block-style-002.html [ Failure ] ...@@ -2583,7 +2583,6 @@ crbug.com/701047 [ Mac10.12 ] editing/style/block-style-002.html [ Failure ]
crbug.com/701047 [ Mac10.12 ] editing/style/block-style-003.html [ Failure ] crbug.com/701047 [ Mac10.12 ] editing/style/block-style-003.html [ Failure ]
crbug.com/701047 [ Mac10.12 ] editing/style/block-styles-007.html [ Failure ] crbug.com/701047 [ Mac10.12 ] editing/style/block-styles-007.html [ Failure ]
crbug.com/660295 http/tests/devtools/elements/elements-panel-restore-selection-when-node-comes-later.js [ Pass Failure ]
crbug.com/735245 http/tests/devtools/application-panel/storage-view-reports-quota.js [ Pass Timeout Failure ] crbug.com/735245 http/tests/devtools/application-panel/storage-view-reports-quota.js [ Pass Timeout Failure ]
# [css-grid] # [css-grid]
......
...@@ -5,6 +5,7 @@ Running: selectNode ...@@ -5,6 +5,7 @@ Running: selectNode
Selected node: 'span' Selected node: 'span'
Running: firstReloadWithoutNodeInDOM Running: firstReloadWithoutNodeInDOM
Page reloaded.
Selected node: 'body' Selected node: 'body'
Running: secondReloadWithNodeInDOM Running: secondReloadWithNodeInDOM
......
...@@ -7,16 +7,7 @@ ...@@ -7,16 +7,7 @@
`Verify that last selected element is restored properly later, even if it failed to do so once.\n`); `Verify that last selected element is restored properly later, even if it failed to do so once.\n`);
await TestRunner.loadModule('elements_test_runner'); await TestRunner.loadModule('elements_test_runner');
await TestRunner.showPanel('elements'); await TestRunner.showPanel('elements');
await TestRunner.loadHTML(` await TestRunner.navigatePromise('./resources/elements-panel-restore-selection-when-node-comes-later.html');
<p>
Verify that last selected element is restored properly later, even if
it failed to do so once.
</p>
<div>
<span id="inspected"></span>
</div>
`);
await TestRunner.addScriptTag('../resources/elements-panel-shadow-selection-on-refresh.js');
var node; var node;
...@@ -80,17 +71,15 @@ ...@@ -80,17 +71,15 @@
} }
/** /**
* @param {string} pathToIgnore * @param {string} pathToIgnore
*/ */
function overridePushNodeForPath(pathToIgnore) { function overridePushNodeForPath(pathToIgnore) {
var original = TestRunner.override(SDK.DOMModel.prototype, 'pushNodeByPathToFrontend', override); var original = TestRunner.override(SDK.DOMModel.prototype, 'pushNodeByPathToFrontend', override);
function override(nodePath, callback) { function override(nodePath) {
if (nodePath === pathToIgnore) { if (nodePath === pathToIgnore)
setTimeout(callback.bind(null), 0); return Promise.resolve(null);
return; return original(nodePath);
}
original(nodePath, callback);
} }
} }
})(); })();
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment