OLD | NEW |
---|---|
1 var initialize_DebuggerTest = function() { | 1 var initialize_DebuggerTest = function() { |
2 | 2 |
3 InspectorTest.startDebuggerTest = function(callback, quiet) | 3 InspectorTest.startDebuggerTest = function(callback, quiet) |
4 { | 4 { |
5 if (quiet !== undefined) | 5 if (quiet !== undefined) |
6 InspectorTest._quiet = quiet; | 6 InspectorTest._quiet = quiet; |
7 WebInspector.showPanel("sources"); | 7 WebInspector.showPanel("sources"); |
8 | 8 |
9 if (WebInspector.debuggerModel.debuggerEnabled()) | 9 if (WebInspector.debuggerModel.debuggerEnabled()) |
10 startTest(); | 10 startTest(); |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
76 InspectorTest.evaluateInConsole("setTimeout(testFunction, 0)"); | 76 InspectorTest.evaluateInConsole("setTimeout(testFunction, 0)"); |
77 InspectorTest.addResult("Set timer for test function."); | 77 InspectorTest.addResult("Set timer for test function."); |
78 } | 78 } |
79 | 79 |
80 InspectorTest.runTestFunctionAndWaitUntilPaused = function(callback) | 80 InspectorTest.runTestFunctionAndWaitUntilPaused = function(callback) |
81 { | 81 { |
82 InspectorTest.runTestFunction(); | 82 InspectorTest.runTestFunction(); |
83 InspectorTest.waitUntilPaused(callback); | 83 InspectorTest.waitUntilPaused(callback); |
84 }; | 84 }; |
85 | 85 |
86 InspectorTest.waitUntilPaused = function(callback) | 86 InspectorTest.waitUntilPaused = function(callback, forceWait) |
yurys
2013/11/08 06:38:26
I'd rather have separate methods for the forced ca
aandrey
2013/11/08 09:10:39
Done.
| |
87 { | 87 { |
88 callback = InspectorTest.safeWrap(callback); | 88 callback = InspectorTest.safeWrap(callback); |
89 | 89 |
90 if (InspectorTest._pausedScriptArguments) | 90 if (InspectorTest._pausedScriptArguments && !forceWait) |
91 callback.apply(callback, InspectorTest._pausedScriptArguments); | 91 callback.apply(callback, InspectorTest._pausedScriptArguments); |
92 else | 92 else |
93 InspectorTest._waitUntilPausedCallback = callback; | 93 InspectorTest._waitUntilPausedCallback = callback; |
94 }; | 94 }; |
95 | 95 |
96 InspectorTest.waitUntilResumed = function(callback) | 96 InspectorTest.waitUntilResumed = function(callback, forceWait) |
97 { | 97 { |
98 callback = InspectorTest.safeWrap(callback); | 98 callback = InspectorTest.safeWrap(callback); |
99 | 99 |
100 if (!InspectorTest._pausedScriptArguments) | 100 if (!InspectorTest._pausedScriptArguments && !forceWait) |
101 callback(); | 101 callback(); |
102 else | 102 else |
103 InspectorTest._waitUntilResumedCallback = callback; | 103 InspectorTest._waitUntilResumedCallback = callback; |
104 }; | 104 }; |
105 | 105 |
106 InspectorTest.resumeExecution = function(callback) | 106 InspectorTest.resumeExecution = function(callback) |
107 { | 107 { |
108 if (WebInspector.panels.sources.paused) | 108 if (WebInspector.panels.sources.paused) |
109 WebInspector.panels.sources._togglePause(); | 109 WebInspector.panels.sources._togglePause(); |
110 InspectorTest.waitUntilResumed(callback); | 110 InspectorTest.waitUntilResumed(callback); |
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
308 | 308 |
309 InspectorTest.checkUILocation = function(uiSourceCode, lineNumber, columnNumber, location) | 309 InspectorTest.checkUILocation = function(uiSourceCode, lineNumber, columnNumber, location) |
310 { | 310 { |
311 InspectorTest.assertEquals(uiSourceCode, location.uiSourceCode, "Incorrect u iSourceCode, expected '" + (uiSourceCode ? uiSourceCode.originURL() : null) + "' ," + | 311 InspectorTest.assertEquals(uiSourceCode, location.uiSourceCode, "Incorrect u iSourceCode, expected '" + (uiSourceCode ? uiSourceCode.originURL() : null) + "' ," + |
312 " but got '" + (location.uiSourceCode ? location.uiSourceCode.originURL() : null) + "'"); | 312 " but got '" + (location.uiSourceCode ? location.uiSourceCode.originURL() : null) + "'"); |
313 InspectorTest.assertEquals(lineNumber, location.lineNumber, "Incorrect lineN umber, expected '" + lineNumber + "', but got '" + location.lineNumber + "'"); | 313 InspectorTest.assertEquals(lineNumber, location.lineNumber, "Incorrect lineN umber, expected '" + lineNumber + "', but got '" + location.lineNumber + "'"); |
314 InspectorTest.assertEquals(columnNumber, location.columnNumber, "Incorrect c olumnNumber, expected '" + columnNumber + "', but got '" + location.columnNumber + "'"); | 314 InspectorTest.assertEquals(columnNumber, location.columnNumber, "Incorrect c olumnNumber, expected '" + columnNumber + "', but got '" + location.columnNumber + "'"); |
315 }; | 315 }; |
316 | 316 |
317 }; | 317 }; |
OLD | NEW |