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

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

Issue 177963004: DevTools: Split creating inspector stylesheet and adding a new rule into stylesheet in protocol. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fixed test Created 6 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 * 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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 44
45 var messageObject = { "method": method, 45 var messageObject = { "method": method,
46 "params": params, 46 "params": params,
47 "id": this._requestId }; 47 "id": this._requestId };
48 48
49 InspectorFrontendHost.sendMessageToBackend(JSON.stringify(messageObject)); 49 InspectorFrontendHost.sendMessageToBackend(JSON.stringify(messageObject));
50 50
51 return this._requestId; 51 return this._requestId;
52 } 52 }
53 53
54 InspectorTest.sendCommandOrDie = function(command, properties, callback)
55 {
56 InspectorTest.sendCommand(command, properties || {}, commandCallback);
57 function commandCallback(msg)
58 {
59 if (msg.error) {
60 InspectorTest.log("ERROR: " + msg.error.message);
61 InspectorTest.completeTest();
62 return;
63 }
64 if (callback)
65 callback(msg.result);
66 }
67 }
68
54 /** 69 /**
55 * @param {function(object)=} callback 70 * @param {function(object)=} callback
56 */ 71 */
57 InspectorTest.wrapCallback = function(callback) 72 InspectorTest.wrapCallback = function(callback)
58 { 73 {
59 /** 74 /**
60 * @param {object} message 75 * @param {object} message
61 */ 76 */
62 function callbackWrapper(message) 77 function callbackWrapper(message)
63 { 78 {
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after
315 initializers += "(" + window[symbol].toString() + ")();\n"; 330 initializers += "(" + window[symbol].toString() + ")();\n";
316 } 331 }
317 inspectorFrontend.postMessage(initializers + "(" + testFunction.toSt ring() +")();", "*"); 332 inspectorFrontend.postMessage(initializers + "(" + testFunction.toSt ring() +")();", "*");
318 return; 333 return;
319 } 334 }
320 // Kill waiting process if failed to send. 335 // Kill waiting process if failed to send.
321 alert("Failed to send test function"); 336 alert("Failed to send test function");
322 testRunner.notifyDone(); 337 testRunner.notifyDone();
323 }); 338 });
324 } 339 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698