Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(167)

Side by Side Diff: test/inspector/debugger/script-on-after-compile.js

Issue 2891213002: [inspector] Refactor protocol-test.js (Closed)
Patch Set: comments addressed Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2016 the V8 project authors. All rights reserved. 1 // Copyright 2016 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 InspectorTest.log("Checks that inspector correctly process compiled scripts"); 5 let {session, contextGroup, Protocol} = InspectorTest.start("Checks that inspect or correctly process compiled scripts");
6 6
7 function addScripts() { 7 function addScripts() {
8 // sourceURL in the same line 8 // sourceURL in the same line
9 return addScript("function foo1(){}//# sourceURL=oneline.js\n") 9 return addScript("function foo1(){}//# sourceURL=oneline.js\n")
10 // sourceURL without end line 10 // sourceURL without end line
11 .then(() => addScript("function foo2(){}//# sourceURL=oneline-without-nl.js" )) 11 .then(() => addScript("function foo2(){}//# sourceURL=oneline-without-nl.js" ))
12 // other source urls 12 // other source urls
13 .then(() => addScript("function foo3(){}\n//# sourceURL=twoline.js\n")) 13 .then(() => addScript("function foo3(){}\n//# sourceURL=twoline.js\n"))
14 .then(() => addScript("function foo4(){}\n\n//# sourceURL=threeline.js\n")) 14 .then(() => addScript("function foo4(){}\n\n//# sourceURL=threeline.js\n"))
15 15
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 .then((sourceMessage) => dumpScriptParsed(scriptParsedMessage, sourceMessage , scriptParsed)); 64 .then((sourceMessage) => dumpScriptParsed(scriptParsedMessage, sourceMessage , scriptParsed));
65 } 65 }
66 66
67 function dumpScriptParsed(scriptParsedMessage, sourceMessage, scriptParsed) { 67 function dumpScriptParsed(scriptParsedMessage, sourceMessage, scriptParsed) {
68 var sourceResult = sourceMessage.result; 68 var sourceResult = sourceMessage.result;
69 sourceResult.scriptSource = sourceResult.scriptSource.replace(/\n/g, "<nl>"); 69 sourceResult.scriptSource = sourceResult.scriptSource.replace(/\n/g, "<nl>");
70 InspectorTest.log(scriptParsed ? "scriptParsed" : "scriptFailedToParse"); 70 InspectorTest.log(scriptParsed ? "scriptParsed" : "scriptFailedToParse");
71 InspectorTest.logObject(sourceResult); 71 InspectorTest.logObject(sourceResult);
72 InspectorTest.logMessage(scriptParsedMessage.params); 72 InspectorTest.logMessage(scriptParsedMessage.params);
73 } 73 }
OLDNEW
« no previous file with comments | « test/inspector/debugger/script-end-location.js ('k') | test/inspector/debugger/script-parsed-for-runtime-evaluate.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698