// Copyright 2018 the V8 project authors. All rights reserved.// Use of this source code is governed by a BSD-style license that can be// found in the LICENSE file.let{session,contextGroup,Protocol}=InspectorTest.start('Checks hash in Debugger.scriptParsed event');(asyncfunctionmain(){Protocol.Debugger.enable();consttests=[{firstScript:'1',secondScript:'2'}];for(letlength=1;length<=10;++length){for(letdifferentChar=0;differentChar<length;++differentChar){constfirstScript=' '.repeat(differentChar)+'1'+' '.repeat(length-differentChar-1)+';';constsecondScript=' '.repeat(differentChar)+'2'+' '.repeat(length-differentChar-1)+';';tests.push({firstScript,secondScript});}}for(const{firstScript,secondScript}oftests){InspectorTest.log(firstScript);constfirstScriptParsed=Protocol.Debugger.onceScriptParsed();Protocol.Runtime.evaluate({expression:firstScript});consthash1=(awaitfirstScriptParsed).params.hash;InspectorTest.log(secondScript);constsecondScriptParsed=Protocol.Debugger.onceScriptParsed();Protocol.Runtime.evaluate({expression:secondScript});consthash2=(awaitsecondScriptParsed).params.hash;InspectorTest.log(hash1===hash2?'Error: the same hash!':'PASS');}InspectorTest.completeTest();})();