| 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 267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 278 this.sendCommand("Runtime.evaluate", { "expression": string }, function(mess
age) { | 278 this.sendCommand("Runtime.evaluate", { "expression": string }, function(mess
age) { |
| 279 if (message.error) | 279 if (message.error) |
| 280 InspectorTest.log("Error while executing '" + string + "': " + messa
ge.error.message); | 280 InspectorTest.log("Error while executing '" + string + "': " + messa
ge.error.message); |
| 281 else if (callback) | 281 else if (callback) |
| 282 callback(message.result.result.value); | 282 callback(message.result.result.value); |
| 283 }); | 283 }); |
| 284 }; | 284 }; |
| 285 | 285 |
| 286 InspectorTest.evaluateInPageAsync = function(expression) | 286 InspectorTest.evaluateInPageAsync = function(expression) |
| 287 { | 287 { |
| 288 return InspectorTest.sendCommandPromise("Runtime.evaluate", { "expression":
expression, awaitPromise: true }).then((message) => message.result.result.value)
; | 288 return InspectorTest.sendCommandPromise("Runtime.evaluate", { "expression":
expression, awaitPromise: true, returnByValue: true }).then((message) => message
.result.result.value); |
| 289 } | 289 } |
| 290 | 290 |
| 291 InspectorTest.completeTestIfError = function(messageObject) | 291 InspectorTest.completeTestIfError = function(messageObject) |
| 292 { | 292 { |
| 293 if (messageObject.error) { | 293 if (messageObject.error) { |
| 294 InspectorTest.log(messageObject.error.message); | 294 InspectorTest.log(messageObject.error.message); |
| 295 InspectorTest.completeTest(); | 295 InspectorTest.completeTest(); |
| 296 return true; | 296 return true; |
| 297 } | 297 } |
| 298 return false; | 298 return false; |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 356 delete InspectorTest._pageLoadedCallback; | 356 delete InspectorTest._pageLoadedCallback; |
| 357 if (callback) | 357 if (callback) |
| 358 callback(); | 358 callback(); |
| 359 } | 359 } |
| 360 | 360 |
| 361 window.addEventListener("load", InspectorTest.readyForTest.bind(InspectorTest),
false); | 361 window.addEventListener("load", InspectorTest.readyForTest.bind(InspectorTest),
false); |
| 362 | 362 |
| 363 </script> | 363 </script> |
| 364 </head> | 364 </head> |
| 365 </html> | 365 </html> |
| OLD | NEW |