Commit 58ed5a32 authored by Noel Gordon's avatar Noel Gordon Committed by Commit Bot

Use descendant combinator in openQuickViewUsb browser test

Code search for USB_VOLUME_QUERY suggests many uses of child selectors
from the #directory-tree. Alternative is to use descendant combinator:
#directory-tree [volume-type-icon="xxxxx"] to query for volumes, which
is shorter and more idiomatic with the volume code selectors.

Unless we need to test a child element for [active], or similar, it is
perhaps less confusing to use the descendant combinator [1].

[1] Future changes might clean up the use of child selectors in volume
MTP|USB|ETC_VOLUME_QUERY in the relevant test cases.

No change in behavior, no new tests.

Test: browser_test --gtest_filter="QuickView/FilesApp*"
Bug: 851888
Cq-Include-Trybots: master.tryserver.chromium.linux:closure_compilation
Change-Id: I2f64c624e05d0051750ee49ed6e7fabbef43b512
Reviewed-on: https://chromium-review.googlesource.com/1098905Reviewed-by: default avatarNaoki Fukino <fukino@chromium.org>
Commit-Queue: Noel Gordon <noel@chromium.org>
Cr-Commit-Position: refs/heads/master@{#567075}
parent 4576fad3
......@@ -126,8 +126,7 @@ testcase.closeQuickView = function() {
testcase.openQuickViewUsb = function() {
let appId;
const USB_VOLUME_QUERY = '#directory-tree > .tree-item > .tree-row > ' +
'.item-icon[volume-type-icon="removable"]';
const USB_VOLUME_QUERY = '#directory-tree [volume-type-icon="removable"]';
StepsRunner.run([
// Open Files app on local Downloads.
......
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