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

Side by Side Diff: third_party/WebKit/LayoutTests/inspector/sources/debugger/debugger-completions-on-call-frame.html

Issue 2493373002: DevTools: rename WebInspector into modules. (Closed)
Patch Set: for bots Created 4 years, 1 month 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 1
2 <html> 2 <html>
3 <head> 3 <head>
4 <script src="../../../http/tests/inspector/inspector-test.js"></script> 4 <script src="../../../http/tests/inspector/inspector-test.js"></script>
5 <script src="../../../http/tests/inspector/debugger-test.js"></script> 5 <script src="../../../http/tests/inspector/debugger-test.js"></script>
6 <script> 6 <script>
7 7
8 var a = 1; 8 var a = 1;
9 function testFunction() 9 function testFunction()
10 { 10 {
11 var var1 = 2; 11 var var1 = 2;
12 var var2 = 3; 12 var var2 = 3;
13 var arr1 = [1,2,3]; 13 var arr1 = [1,2,3];
14 var arr2 = new Uint8Array(new ArrayBuffer(Math.pow(2, 29))); 14 var arr2 = new Uint8Array(new ArrayBuffer(Math.pow(2, 29)));
15 debugger; 15 debugger;
16 } 16 }
17 17
18 function test() 18 function test()
19 { 19 {
20 InspectorTest.runDebuggerTestSuite([ 20 InspectorTest.runDebuggerTestSuite([
21 function step1(next) 21 function step1(next)
22 { 22 {
23 InspectorTest.runTestFunctionAndWaitUntilPaused(next); 23 InspectorTest.runTestFunctionAndWaitUntilPaused(next);
24 }, 24 },
25 25
26 function step2(next) 26 function step2(next)
27 { 27 {
28 WebInspector.JavaScriptAutocomplete.completionsForExpression("", "va r").then(checkAgainstGolden.bind(this, ["var1", "var2"], [], next)); 28 Components.JavaScriptAutocomplete.completionsForExpression("", "var" ).then(checkAgainstGolden.bind(this, ["var1", "var2"], [], next));
29 }, 29 },
30 30
31 function step3(next) 31 function step3(next)
32 { 32 {
33 WebInspector.JavaScriptAutocomplete.completionsForExpression("", "di ").then(checkAgainstGolden.bind(this, ["dir", "dirxml"], [], next)); 33 Components.JavaScriptAutocomplete.completionsForExpression("", "di") .then(checkAgainstGolden.bind(this, ["dir", "dirxml"], [], next));
34 }, 34 },
35 35
36 function step4(next) 36 function step4(next)
37 { 37 {
38 WebInspector.JavaScriptAutocomplete.completionsForExpression("", "wi n").then(checkAgainstGolden.bind(this, ["window"], [], next)); 38 Components.JavaScriptAutocomplete.completionsForExpression("", "win" ).then(checkAgainstGolden.bind(this, ["window"], [], next));
39 }, 39 },
40 40
41 function step5(next) 41 function step5(next)
42 { 42 {
43 WebInspector.JavaScriptAutocomplete.completionsForExpression("", "t" ).then(checkAgainstGolden.bind(this, ["this"], [], next)); 43 Components.JavaScriptAutocomplete.completionsForExpression("", "t"). then(checkAgainstGolden.bind(this, ["this"], [], next));
44 }, 44 },
45 45
46 function step6(next) 46 function step6(next)
47 { 47 {
48 WebInspector.JavaScriptAutocomplete.completionsForExpression("var1." , "toExp").then(checkAgainstGolden.bind(this, ["toExponential"], [], next)); 48 Components.JavaScriptAutocomplete.completionsForExpression("var1.", "toExp").then(checkAgainstGolden.bind(this, ["toExponential"], [], next));
49 }, 49 },
50 50
51 function step7(next) 51 function step7(next)
52 { 52 {
53 WebInspector.JavaScriptAutocomplete.completionsForExpression("123.", "toExp").then(checkAgainstGolden.bind(this, [], ["toExponential"], next)); 53 Components.JavaScriptAutocomplete.completionsForExpression("123.", " toExp").then(checkAgainstGolden.bind(this, [], ["toExponential"], next));
54 }, 54 },
55 55
56 function step8(next) 56 function step8(next)
57 { 57 {
58 WebInspector.JavaScriptAutocomplete.completionsForExpression("", "" ).then(checkAgainstGolden.bind(this, [], ["$"], next)); 58 Components.JavaScriptAutocomplete.completionsForExpression("", ""). then(checkAgainstGolden.bind(this, [], ["$"], next));
59 }, 59 },
60 60
61 function step9(next) 61 function step9(next)
62 { 62 {
63 WebInspector.JavaScriptAutocomplete.completionsForExpression("", "", true).then(checkAgainstGolden.bind(this, ["$", "window"], [], next)); 63 Components.JavaScriptAutocomplete.completionsForExpression("", "", t rue).then(checkAgainstGolden.bind(this, ["$", "window"], [], next));
64 }, 64 },
65 65
66 function step10(next) 66 function step10(next)
67 { 67 {
68 WebInspector.JavaScriptAutocomplete.completionsForExpression("consol e.", "log('bar');").then(checkAgainstGolden.bind(this, [], ["$"], next)); 68 Components.JavaScriptAutocomplete.completionsForExpression("console. ", "log('bar');").then(checkAgainstGolden.bind(this, [], ["$"], next));
69 }, 69 },
70 70
71 function step11(next) 71 function step11(next)
72 { 72 {
73 WebInspector.JavaScriptAutocomplete.completionsForExpression("arr1." , "").then(checkAgainstGolden.bind(this, ["length"], ["1", "2", "3"], next)); 73 Components.JavaScriptAutocomplete.completionsForExpression("arr1.", "").then(checkAgainstGolden.bind(this, ["length"], ["1", "2", "3"], next));
74 }, 74 },
75 75
76 function step12(next) 76 function step12(next)
77 { 77 {
78 WebInspector.JavaScriptAutocomplete.completionsForExpression("arr1[" , "").then(checkAgainstGolden.bind(this, ["\"length\"]"], ["3]"], next)); 78 Components.JavaScriptAutocomplete.completionsForExpression("arr1[", "").then(checkAgainstGolden.bind(this, ["\"length\"]"], ["3]"], next));
79 }, 79 },
80 80
81 function step13_ShouldNotCrash(next) 81 function step13_ShouldNotCrash(next)
82 { 82 {
83 WebInspector.JavaScriptAutocomplete.completionsForExpression("arr2." , "").then(checkAgainstGolden.bind(this, ["length"], ["1", "2", "3"], next)); 83 Components.JavaScriptAutocomplete.completionsForExpression("arr2.", "").then(checkAgainstGolden.bind(this, ["length"], ["1", "2", "3"], next));
84 }, 84 },
85 85
86 function step14(next) 86 function step14(next)
87 { 87 {
88 WebInspector.JavaScriptAutocomplete.completionsForExpression("docume nt\n","E").then(checkAgainstGolden.bind(this, ["Element"], ["ELEMENT_NODE"], nex t)); 88 Components.JavaScriptAutocomplete.completionsForExpression("document \n","E").then(checkAgainstGolden.bind(this, ["Element"], ["ELEMENT_NODE"], next) );
89 } 89 }
90 ]); 90 ]);
91 91
92 function checkAgainstGolden(golden, antiGolden, continuation, completions) 92 function checkAgainstGolden(golden, antiGolden, continuation, completions)
93 { 93 {
94 var failed = false; 94 var failed = false;
95 for (var i = 0; i < golden.length; ++i) { 95 for (var i = 0; i < golden.length; ++i) {
96 if (completions.indexOf(golden[i]) === -1) { 96 if (completions.indexOf(golden[i]) === -1) {
97 failed = true; 97 failed = true;
98 InspectorTest.addResult("FAIL: NOT FOUND: " + golden[i]); 98 InspectorTest.addResult("FAIL: NOT FOUND: " + golden[i]);
(...skipping 17 matching lines...) Expand all
116 </script> 116 </script>
117 </head> 117 </head>
118 118
119 <body onload="runTest()"> 119 <body onload="runTest()">
120 <p> 120 <p>
121 Test that completions in the context of the call frame will result in names 121 Test that completions in the context of the call frame will result in names
122 of its scope variables. 122 of its scope variables.
123 </p> 123 </p>
124 </body> 124 </body>
125 </html> 125 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698