| 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 259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 270 return true; | 270 return true; |
| 271 } | 271 } |
| 272 | 272 |
| 273 InspectorTest.log("FAIL: " + name + ": " + JSON.stringify(messageObject)); | 273 InspectorTest.log("FAIL: " + name + ": " + JSON.stringify(messageObject)); |
| 274 InspectorTest.completeTest(); | 274 InspectorTest.completeTest(); |
| 275 return false; | 275 return false; |
| 276 } | 276 } |
| 277 InspectorTest.expectedSuccess = InspectorTest.checkExpectation.bind(null, false)
; | 277 InspectorTest.expectedSuccess = InspectorTest.checkExpectation.bind(null, false)
; |
| 278 InspectorTest.expectedError = InspectorTest.checkExpectation.bind(null, true); | 278 InspectorTest.expectedError = InspectorTest.checkExpectation.bind(null, true); |
| 279 | 279 |
| 280 InspectorTest.assert = function(condition, message) | |
| 281 { | |
| 282 if (condition) | |
| 283 return; | |
| 284 InspectorTest.log("FAIL: assertion failed: " + message); | |
| 285 InspectorTest.completeTest(); | |
| 286 } | |
| 287 | |
| 288 InspectorTest.assertEquals = function(expected, actual, message) | |
| 289 { | |
| 290 if (expected === actual) | |
| 291 return; | |
| 292 InspectorTest.assert(false, "expected: `" + expected + "', actual: `" + actu
al + "'" + (message ? ", " + message : "")); | |
| 293 } | |
| 294 | |
| 295 /** | 280 /** |
| 296 * @param {string} scriptName | 281 * @param {string} scriptName |
| 297 */ | 282 */ |
| 298 InspectorTest.importScript = function(scriptName) | 283 InspectorTest.importScript = function(scriptName) |
| 299 { | 284 { |
| 300 var xhr = new XMLHttpRequest(); | 285 var xhr = new XMLHttpRequest(); |
| 301 xhr.open("GET", scriptName, false); | 286 xhr.open("GET", scriptName, false); |
| 302 xhr.send(null); | 287 xhr.send(null); |
| 303 window.eval(xhr.responseText + "\n//@ sourceURL=" + scriptName); | 288 window.eval(xhr.responseText + "\n//@ sourceURL=" + scriptName); |
| 304 } | 289 } |
| (...skipping 12 matching lines...) Expand all Loading... |
| 317 function enableInspectorAgent() | 302 function enableInspectorAgent() |
| 318 { | 303 { |
| 319 InspectorTest.sendCommand("Inspector.enable", { }); | 304 InspectorTest.sendCommand("Inspector.enable", { }); |
| 320 } | 305 } |
| 321 | 306 |
| 322 window.addEventListener("load", enableInspectorAgent, false); | 307 window.addEventListener("load", enableInspectorAgent, false); |
| 323 | 308 |
| 324 </script> | 309 </script> |
| 325 </head> | 310 </head> |
| 326 </html> | 311 </html> |
| OLD | NEW |