Skip to content

Commit

Permalink
Fix web-platform-tests#3009: unable to search for mixed case filenames
Browse files Browse the repository at this point in the history
  • Loading branch information
gsnedders committed Nov 2, 2023
1 parent 3cdefdd commit 424108b
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
2 changes: 1 addition & 1 deletion webapp/components/test-search.js
Original file line number Diff line number Diff line change
Expand Up @@ -510,7 +510,7 @@ class TestSearch extends WPTFlags(PolymerElement) {
}

latchQuery() {
this.query = (this.queryInput || '').toLowerCase();
this.query = (this.queryInput || '');
}

commitQuery() {
Expand Down
20 changes: 20 additions & 0 deletions webapp/components/test/test-search.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
<script type="module">
import { AllBrowserNames } from '../product-info.js';
import { TestSearch } from '../test-search.js';
import { waitingOn } from './util/helpers.js';

suite('<test-search>', () => {
suite('Parser/interpreter', () => {
Expand Down Expand Up @@ -456,6 +457,25 @@
});
});
});
suite('TestSearch.prototype.*', () => {
suite('async latchQuery()', () => {
let search_fixture;

setup(() => {
search_fixture = fixture('test-search-fixture');
});

test('does not lowerCase', () => {
search_fixture.queryInput = "shadow-dom/DocumentOrShadowRoot-prototype-elementFromPoint.html";
return waitingOn(() => search_fixture.structuredQuery)
.then(() => {
assert.equal(search_fixture.structuredQuery, {
exists: [{ pattern: 'shadow-dom/DocumentOrShadowRoot-prototype-elementFromPoint.html' }]
});
});
});
});
});
});
</script>
</body>
Expand Down

0 comments on commit 424108b

Please sign in to comment.