{"ScriptPreparationCode":"//Add 100,000 elements\r\nvar frag = document.createDocumentFragment();\r\nfor (var i=0; i\u003C10; i\u002B\u002B){\r\n var outDiv = document.createElement(\u0027div\u0027);\r\n for (var j=0; j\u003C100; j\u002B\u002B){\r\n var midDiv = document.createElement(\u0027div\u0027);\r\n for (var k=0; k\u003C100; k\u002B\u002B){\r\n var inDiv = document.createElement(\u0027div\u0027);\r\n if(i==6 \u0026\u0026 j==60){\r\n if(k==60)\r\n inDiv.id=\u0022one\u0022;\r\n else if(k==61)\r\n inDiv.id=\u0022two\u0022;\r\n }\r\n midDiv.appendChild(inDiv)\r\n }\r\n outDiv.appendChild(midDiv)\r\n }\r\n frag.appendChild(outDiv);\r\n}\r\ndocument.body.appendChild(frag);\r\n\r\n\t// A simple way to check for HTML strings\r\n\t// Prioritize #id over \u003Ctag\u003E to avoid XSS via location.hash (#9521)\r\n\t// Strict HTML recognition (#11290: must start with \u003C)\r\n\t// Shortcut simple #id case for speed\r\nvar rquickExpr = /^(?:\\s*(\u003C[\\w\\W]\u002B\u003E)[^\u003E]*|#([\\w-]\u002B))$/;\r\n\r\nvar selectorOne = \u0027#one\u0027;\r\nvar selectorTwo = \u0027#two\u0027;\r\nvar selectorBoth = selectorOne \u002B \u0027,\u0027 \u002BselectorTwo;","TestCases":[{"Name":"Original selector","Code":"var elements = document.querySelectorAll(selectorBoth);\r\nif( $(elements).length != 2 ) throw Error()","IsDeferred":false},{"Name":"Parse selector","Code":"var selectors = selectorBoth.split(\u0027,\u0027);\r\nvar ids = true;\r\nfor(var i=0; i\u003Cselectors.length; i\u002B\u002B)\r\n{\r\n var match = rquickExpr.exec( selectors[i] );\r\n ids = ids \u0026\u0026 (selectors[i] = match[2]);\r\n}\r\n\r\nvar elements = [];\r\nif(ids){\r\n for(selector in selectors){\r\n elements.push( document.getElementById(selector) )\r\n }\r\n}\r\nelse\r\n{\r\n elements = document.querySelectorAll(selectorBoth)\r\n throw Error(\u0022querySelectorAll\u0022);\r\n}\r\nif( $(elements).length != 2 ) throw Error()\r\n\r\n","IsDeferred":false},{"Name":"select one two jquery add","Code":"if( $(\u0027#one\u0027).add(\u0027#two\u0027).length != 2 ) throw Error()","IsDeferred":false},{"Name":"Select one two array","Code":"if( $([document.getElementById(\u0027one\u0027),document.getElementById(\u0027two\u0027)]).length != 2 ) throw Error()","IsDeferred":false}]}