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

Side by Side Diff: third_party/WebKit/LayoutTests/http/tests/inspector-protocol/resources/protocol-test.html

Issue 2185233002: [DevTools] Added Runtime.awaitPromise protocol method (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: alligned output 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/inspector-protocol/runtime/runtime-await-promise.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <!-- 1 <!--
2 Copyright (C) 2012 Samsung Electronics. All rights reserved. 2 Copyright (C) 2012 Samsung Electronics. All rights reserved.
3 3
4 Redistribution and use in source and binary forms, with or without 4 Redistribution and use in source and binary forms, with or without
5 modification, are permitted provided that the following conditions 5 modification, are permitted provided that the following conditions
6 are met: 6 are met:
7 7
8 1. Redistributions of source code must retain the above copyright 8 1. Redistributions of source code must retain the above copyright
9 notice, this list of conditions and the following disclaimer. 9 notice, this list of conditions and the following disclaimer.
10 2. Redistributions in binary form must reproduce the above copyright 10 2. Redistributions in binary form must reproduce the above copyright
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 if (msg.error) { 68 if (msg.error) {
69 InspectorTest.log("ERROR: " + msg.error.message); 69 InspectorTest.log("ERROR: " + msg.error.message);
70 InspectorTest.completeTest(); 70 InspectorTest.completeTest();
71 return; 71 return;
72 } 72 }
73 if (callback) 73 if (callback)
74 callback(msg.result); 74 callback(msg.result);
75 } 75 }
76 } 76 }
77 77
78 InspectorTest.sendCommandPromise = function(method, params)
79 {
80 var callback;
81 var promise = new Promise(fulfill => callback = fulfill);
82 InspectorTest.sendCommand(method, params, callback);
83 return promise;
84 }
85
78 InspectorTest.domUndo = function(callback) 86 InspectorTest.domUndo = function(callback)
79 { 87 {
80 InspectorTest.sendCommandOrDie("DOM.undo", {}, callback); 88 InspectorTest.sendCommandOrDie("DOM.undo", {}, callback);
81 } 89 }
82 90
83 InspectorTest.undoAndNext = function(next) 91 InspectorTest.undoAndNext = function(next)
84 { 92 {
85 return InspectorTest.domUndo.bind(InspectorTest, next); 93 return InspectorTest.domUndo.bind(InspectorTest, next);
86 } 94 }
87 95
(...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after
422 var callback = didResolve ? callbacks.resolve : callbacks.reject; 430 var callback = didResolve ? callbacks.resolve : callbacks.reject;
423 delete pendingPromiseEvalRequests[callId]; 431 delete pendingPromiseEvalRequests[callId];
424 callback(value); 432 callback(value);
425 } 433 }
426 434
427 window.addEventListener("load", InspectorTest.readyForTest.bind(InspectorTest), false); 435 window.addEventListener("load", InspectorTest.readyForTest.bind(InspectorTest), false);
428 436
429 </script> 437 </script>
430 </head> 438 </head>
431 </html> 439 </html>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/inspector-protocol/runtime/runtime-await-promise.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698