Skip to content

Commit a7ea74a

Browse files
committed
Fix #3009: unable to search for mixed case filenames
1 parent e5058b7 commit a7ea74a

File tree

2 files changed

+23
-1
lines changed

2 files changed

+23
-1
lines changed

webapp/components/test-search.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -518,7 +518,7 @@ class TestSearch extends WPTFlags(PolymerElement) {
518518
}
519519

520520
latchQuery() {
521-
this.query = (this.queryInput || '').toLowerCase();
521+
this.query = (this.queryInput || '');
522522
}
523523

524524
commitQuery() {

webapp/components/test/test-search.html

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
<script type="module">
1818
import { AllBrowserNames } from '../product-info.js';
1919
import { TestSearch } from '../test-search.js';
20+
import { waitingOn } from './util/helpers.js';
2021

2122
suite('<test-search>', () => {
2223
suite('Parser/interpreter', () => {
@@ -460,6 +461,27 @@
460461
});
461462
});
462463
});
464+
suite('TestSearch.prototype.*', () => {
465+
suite('async latchQuery()', () => {
466+
let search_fixture;
467+
468+
setup(() => {
469+
search_fixture = fixture('test-search-fixture');
470+
search_fixture._setStructuredQueries(true);
471+
});
472+
473+
test('does not lowerCase', () => {
474+
search_fixture.queryInput = 'a'; // First set triggers early return (oldQuery=undefined)
475+
search_fixture.queryInput = 'shadow-dom/DocumentOrShadowRoot-prototype-elementFromPoint.html';
476+
return waitingOn(() => search_fixture.structuredQuery)
477+
.then(() => {
478+
assert.deepEqual(search_fixture.structuredQuery, {
479+
exists: [{ pattern: 'shadow-dom/DocumentOrShadowRoot-prototype-elementFromPoint.html' }]
480+
});
481+
});
482+
});
483+
});
484+
});
463485
});
464486
</script>
465487
</body>

0 commit comments

Comments
 (0)