| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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> |
| OLD | NEW |