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

Side by Side Diff: third_party/WebKit/LayoutTests/http/tests/inspector/debugger-test.js

Issue 2217783002: DevTools: use view locations in the elements and sources sidebars. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: for landing Created 4 years, 4 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
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/http/tests/inspector/elements-test.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 function scheduleTestFunction() 1 function scheduleTestFunction()
2 { 2 {
3 setTimeout(testFunction, 0); 3 setTimeout(testFunction, 0);
4 } 4 }
5 5
6 var initialize_DebuggerTest = function() { 6 var initialize_DebuggerTest = function() {
7 7
8 InspectorTest.preloadPanel("sources"); 8 InspectorTest.preloadPanel("sources");
9 9
10 InspectorTest.startDebuggerTest = function(callback, quiet) 10 InspectorTest.startDebuggerTest = function(callback, quiet)
(...skipping 25 matching lines...) Expand all
36 (function() { 36 (function() {
37 // FIXME: Until there is no window.onerror() for uncaught exceptions in prom ises 37 // FIXME: Until there is no window.onerror() for uncaught exceptions in prom ises
38 // we use this hack to print the exceptions instead of just timing out. 38 // we use this hack to print the exceptions instead of just timing out.
39 39
40 var origThen = Promise.prototype.then; 40 var origThen = Promise.prototype.then;
41 var origCatch = Promise.prototype.catch; 41 var origCatch = Promise.prototype.catch;
42 42
43 Promise.prototype.then = function() 43 Promise.prototype.then = function()
44 { 44 {
45 var result = origThen.apply(this, arguments); 45 var result = origThen.apply(this, arguments);
46 origThen.call(result, undefined, onUncaughtPromiseReject); 46 origThen.call(result, undefined, onUncaughtPromiseReject.bind(null, new Error().stack));
47 return result; 47 return result;
48 } 48 }
49 49
50 Promise.prototype.catch = function() 50 Promise.prototype.catch = function()
51 { 51 {
52 var result = origCatch.apply(this, arguments); 52 var result = origCatch.apply(this, arguments);
53 origThen.call(result, undefined, onUncaughtPromiseReject); 53 origThen.call(result, undefined, onUncaughtPromiseReject.bind(null, new Error().stack));
54 return result; 54 return result;
55 } 55 }
56 56
57 function onUncaughtPromiseReject(e) 57 function onUncaughtPromiseReject(stack, e)
58 { 58 {
59 var message = (typeof e === "object" && e.stack) || e; 59 var message = (typeof e === "object" && e.stack) || e;
60 InspectorTest.addResult("FAIL: Uncaught exception in promise: " + messag e); 60 InspectorTest.addResult("FAIL: Uncaught exception in promise: " + messag e + " " + stack);
61 InspectorTest.completeDebuggerTest(); 61 InspectorTest.completeDebuggerTest();
62 } 62 }
63 })(); 63 })();
64 64
65 InspectorTest.runDebuggerTestSuite = function(testSuite) 65 InspectorTest.runDebuggerTestSuite = function(testSuite)
66 { 66 {
67 var testSuiteTests = testSuite.slice(); 67 var testSuiteTests = testSuite.slice();
68 68
69 function runner() 69 function runner()
70 { 70 {
(...skipping 519 matching lines...) Expand 10 before | Expand all | Expand 10 after
590 var listItem = threadsPane._debuggerModelToListItems.get(WebInspector.Debugg erModel.fromTarget(target)); 590 var listItem = threadsPane._debuggerModelToListItems.get(WebInspector.Debugg erModel.fromTarget(target));
591 threadsPane._onListItemClick(listItem); 591 threadsPane._onListItemClick(listItem);
592 } 592 }
593 593
594 InspectorTest.evaluateOnCurrentCallFrame = function(code) 594 InspectorTest.evaluateOnCurrentCallFrame = function(code)
595 { 595 {
596 return new Promise(succ => InspectorTest.debuggerModel.evaluateOnSelectedCal lFrame(code, "console", false, true, false, false, InspectorTest.safeWrap(succ)) ); 596 return new Promise(succ => InspectorTest.debuggerModel.evaluateOnSelectedCal lFrame(code, "console", false, true, false, false, InspectorTest.safeWrap(succ)) );
597 } 597 }
598 598
599 }; 599 };
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/http/tests/inspector/elements-test.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698