| 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 292 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 303 InspectorTest.log("Exception while running: " + func + "\n" + (e.sta
ck || e)); | 303 InspectorTest.log("Exception while running: " + func + "\n" + (e.sta
ck || e)); |
| 304 if (onexception) | 304 if (onexception) |
| 305 InspectorTest.safeWrap(onexception)(); | 305 InspectorTest.safeWrap(onexception)(); |
| 306 else | 306 else |
| 307 InspectorTest.completeTest(); | 307 InspectorTest.completeTest(); |
| 308 } | 308 } |
| 309 } | 309 } |
| 310 return result; | 310 return result; |
| 311 } | 311 } |
| 312 | 312 |
| 313 InspectorTest.navigate = function(url, callback) |
| 314 { |
| 315 InspectorTest._pageLoadedCallback = InspectorTest.safeWrap(callback); |
| 316 InspectorTest.evaluateInPage("navigateProtocolTest('" + url + "')"); |
| 317 } |
| 318 |
| 319 InspectorTest.pageReloaded = function() |
| 320 { |
| 321 InspectorTest.log("Page reloaded."); |
| 322 var callback = InspectorTest._pageLoadedCallback; |
| 323 delete InspectorTest._pageLoadedCallback; |
| 324 if (callback) |
| 325 callback(); |
| 326 } |
| 327 |
| 313 var lastPromiseEvalId = 0; | 328 var lastPromiseEvalId = 0; |
| 314 var pendingPromiseEvalRequests = {}; | 329 var pendingPromiseEvalRequests = {}; |
| 315 | 330 |
| 316 /** | 331 /** |
| 317 * The given function should take two callback paraters before the arguments: | 332 * The given function should take two callback paraters before the arguments: |
| 318 * * resolve - called when successful (with optional result) | 333 * * resolve - called when successful (with optional result) |
| 319 * * reject - called when there was a failure (with optional error) | 334 * * reject - called when there was a failure (with optional error) |
| 320 */ | 335 */ |
| 321 InspectorTest.invokePageFunctionPromise = function(functionName, parameters) | 336 InspectorTest.invokePageFunctionPromise = function(functionName, parameters) |
| 322 { | 337 { |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 378 function enableInspectorAgent() | 393 function enableInspectorAgent() |
| 379 { | 394 { |
| 380 InspectorTest.sendCommand("Inspector.enable", { }); | 395 InspectorTest.sendCommand("Inspector.enable", { }); |
| 381 } | 396 } |
| 382 | 397 |
| 383 window.addEventListener("load", enableInspectorAgent, false); | 398 window.addEventListener("load", enableInspectorAgent, false); |
| 384 | 399 |
| 385 </script> | 400 </script> |
| 386 </head> | 401 </head> |
| 387 </html> | 402 </html> |
| OLD | NEW |