| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2012 Samsung Electronics. All rights reserved. | 2 * Copyright (C) 2012 Samsung Electronics. All rights reserved. |
| 3 * Copyright (C) 2013 Google Inc. All rights reserved. | 3 * Copyright (C) 2013 Google Inc. All rights reserved. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 8 * | 8 * |
| 9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. Redistributions of source code must retain the above copyright |
| 10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
| (...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 210 if (condition) | 210 if (condition) |
| 211 return; | 211 return; |
| 212 InspectorTest.log("FAIL: assertion failed: " + message); | 212 InspectorTest.log("FAIL: assertion failed: " + message); |
| 213 InspectorTest.completeTest(); | 213 InspectorTest.completeTest(); |
| 214 } | 214 } |
| 215 | 215 |
| 216 InspectorTest.assertEquals = function(expected, actual, message) | 216 InspectorTest.assertEquals = function(expected, actual, message) |
| 217 { | 217 { |
| 218 if (expected === actual) | 218 if (expected === actual) |
| 219 return; | 219 return; |
| 220 InspectorTest,assert(false, "expected: `" + expected + "', actual: `" + actu
al + "'" + (message ? ", " + message : "")); | 220 InspectorTest.assert(false, "expected: `" + expected + "', actual: `" + actu
al + "'" + (message ? ", " + message : "")); |
| 221 } | 221 } |
| 222 | 222 |
| 223 /** | 223 /** |
| 224 * @param {string} scriptName | 224 * @param {string} scriptName |
| 225 */ | 225 */ |
| 226 InspectorTest.importScript = function(scriptName) | 226 InspectorTest.importScript = function(scriptName) |
| 227 { | 227 { |
| 228 var xhr = new XMLHttpRequest(); | 228 var xhr = new XMLHttpRequest(); |
| 229 xhr.open("GET", scriptName, false); | 229 xhr.open("GET", scriptName, false); |
| 230 xhr.send(null); | 230 xhr.send(null); |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 315 initializers += "(" + window[symbol].toString() + ")();\n"; | 315 initializers += "(" + window[symbol].toString() + ")();\n"; |
| 316 } | 316 } |
| 317 inspectorFrontend.postMessage(initializers + "(" + testFunction.toSt
ring() +")();", "*"); | 317 inspectorFrontend.postMessage(initializers + "(" + testFunction.toSt
ring() +")();", "*"); |
| 318 return; | 318 return; |
| 319 } | 319 } |
| 320 // Kill waiting process if failed to send. | 320 // Kill waiting process if failed to send. |
| 321 alert("Failed to send test function"); | 321 alert("Failed to send test function"); |
| 322 testRunner.notifyDone(); | 322 testRunner.notifyDone(); |
| 323 }); | 323 }); |
| 324 } | 324 } |
| OLD | NEW |