OLD | NEW |
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("Tests that \"console.profileEnd()\" does not cause crash. (we
bkit:105759)"); | 5 let {session, contextGroup, Protocol} = InspectorTest.start("Tests that \"consol
e.profileEnd()\" does not cause crash. (webkit:105759)"); |
6 | 6 |
7 InspectorTest.addScript(` | 7 contextGroup.addScript(` |
8 function collectProfiles() | 8 function collectProfiles() |
9 { | 9 { |
10 console.profile(); | 10 console.profile(); |
11 console.profile("titled"); | 11 console.profile("titled"); |
12 console.profileEnd(); | 12 console.profileEnd(); |
13 console.profileEnd(); | 13 console.profileEnd(); |
14 }`); | 14 }`); |
15 | 15 |
16 InspectorTest.fail = function(message) | 16 InspectorTest.fail = function(message) |
17 { | 17 { |
(...skipping 19 matching lines...) Expand all Loading... |
37 InspectorTest.log("SUCCESS: found 2 profile headers"); | 37 InspectorTest.log("SUCCESS: found 2 profile headers"); |
38 for (var i = 0; i < headers.length; i++) { | 38 for (var i = 0; i < headers.length; i++) { |
39 if (headers[i].title === "titled") { | 39 if (headers[i].title === "titled") { |
40 InspectorTest.log("SUCCESS: titled profile found"); | 40 InspectorTest.log("SUCCESS: titled profile found"); |
41 InspectorTest.completeTest(); | 41 InspectorTest.completeTest(); |
42 return; | 42 return; |
43 } | 43 } |
44 } | 44 } |
45 InspectorTest.fail("Cannot find titled profile"); | 45 InspectorTest.fail("Cannot find titled profile"); |
46 } | 46 } |
OLD | NEW |