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

Side by Side Diff: third_party/WebKit/LayoutTests/inspector/sources/debugger-ui/show-function-definition.html

Issue 1808533002: DevTools: wrap console evaluation with user gesture indicator for convenience. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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 <html> 1 <html>
2 <head> 2 <head>
3 <script src="../../../http/tests/inspector/inspector-test.js"></script> 3 <script src="../../../http/tests/inspector/inspector-test.js"></script>
4 <script src="../../../http/tests/inspector/console-test.js"></script> 4 <script src="../../../http/tests/inspector/console-test.js"></script>
5 <script> 5 <script>
6 6
7 function jumpToMe() 7 function jumpToMe()
8 { 8 {
9 var result = 12345; 9 var result = 12345;
10 return window.foo || result; 10 return window.foo || result;
11 } 11 }
12 12
13 function test() 13 function test()
14 { 14 {
15 var panel = WebInspector.panels.sources; 15 var panel = WebInspector.panels.sources;
16 16
17 InspectorTest.runTestSuite([ 17 InspectorTest.runTestSuite([
18 function testRevealFunctionDefinition(next) 18 function testRevealFunctionDefinition(next)
19 { 19 {
20 InspectorTest.addSniffer(panel, "showUISourceCode", showUISourceCode Hook); 20 InspectorTest.addSniffer(panel, "showUISourceCode", showUISourceCode Hook);
21 WebInspector.context.flavor(WebInspector.ExecutionContext).evaluate( "jumpToMe", "", false, true, false, false, didGetFunction); 21 WebInspector.context.flavor(WebInspector.ExecutionContext).evaluate( "jumpToMe", "", false, true, false, false, false, didGetFunction);
22 22
23 function didGetFunction(funcObject, wasThrown) 23 function didGetFunction(funcObject, wasThrown)
24 { 24 {
25 var error = !funcObject || wasThrown; 25 var error = !funcObject || wasThrown;
26 InspectorTest.assertTrue(!error); 26 InspectorTest.assertTrue(!error);
27 panel._showFunctionDefinition(funcObject); 27 panel._showFunctionDefinition(funcObject);
28 } 28 }
29 29
30 function showUISourceCodeHook(uiSourceCode, lineNumber, columnNumber , forceShowInPanel) 30 function showUISourceCodeHook(uiSourceCode, lineNumber, columnNumber , forceShowInPanel)
31 { 31 {
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 </script> 64 </script>
65 </head> 65 </head>
66 66
67 <body onload="runTest()"> 67 <body onload="runTest()">
68 <p> 68 <p>
69 Tests that "Show Function Definition" jumps to the correct location. 69 Tests that "Show Function Definition" jumps to the correct location.
70 </p> 70 </p>
71 71
72 </body> 72 </body>
73 </html> 73 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698