File tree Expand file tree Collapse file tree 2 files changed +23
-1
lines changed
Expand file tree Collapse file tree 2 files changed +23
-1
lines changed Original file line number Diff line number Diff 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 ( ) {
Original file line number Diff line number Diff line change 1717 < script type ="module ">
1818import { AllBrowserNames } from '../product-info.js' ;
1919import { TestSearch } from '../test-search.js' ;
20+ import { waitingOn } from './util/helpers.js' ;
2021
2122suite ( '<test-search>' , ( ) => {
2223 suite ( 'Parser/interpreter' , ( ) => {
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 >
You can’t perform that action at this time.
0 commit comments