Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #3009: unable to search for mixed case filenames #3577

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
22 changes: 22 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,27 @@
});
});
});
suite('TestSearch.prototype.*', () => {
suite('async latchQuery()', () => {
let search_fixture;

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

test('does not lowerCase', () => {
search_fixture.structuredQueries = true;
search_fixture.queryInput = 'a'; // first set is debounced
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
24 changes: 12 additions & 12 deletions webapp/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion webapp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
"multer@<1.4.5": "1.4.5-lts.1"
},
"scripts": {
"test": "wct --local chrome && wct --local firefox",
"test": "wct --local chrome",
"lint": "eslint 'components/*.js' && eslint --plugin html 'components/test/*.html'",
"lint-fix": "eslint --fix 'components/**/*.js' && eslint --fix --plugin html 'components/test/*.html' ",
"postinstall": "cpy 'node_modules/@browser-logos/{chrome,chrome-beta,chrome-canary,chrome-dev,chromium,deno,edge,edge-beta,edge-canary,edge-dev,firefox,firefox-beta,firefox-nightly,geckoview,node.js,safari,servo,uc}/*_64x64.png' static && cpy 'node_modules/@browser-logos/firefox-developer-edition/*_64x64.png' static --rename=firefox-dev_64x64.png && cpy 'node_modules/@browser-logos/safari/*_64x64.png' static --rename=safari-beta_64x64.png && cpy 'node_modules/@browser-logos/safari-technology-preview/*_64x64.png' static --rename=safari-dev_64x64.png && cpy 'node_modules/@browser-logos/safari-technology-preview/*_64x64.png' static --rename=safari-preview_64x64.png && cpy 'node_modules/@browser-logos/webkit-nightly/*_64x64.png' static --rename=wktr_64x64.png",
Expand Down