Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(269)

Side by Side Diff: LayoutTests/http/tests/inspector-protocol/resources/protocol-test.html

Issue 1021543002: DevTools: remove InspectorTest.assert from inspector-protocol tests (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
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>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698