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

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

Issue 211193006: DevTools: [CSS] use setStyleText as undo action for setPropertyText (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: add testcase 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
« no previous file with comments | « no previous file | LayoutTests/inspector-protocol/css/css-protocol-test.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 if (msg.error) { 59 if (msg.error) {
60 InspectorTest.log("ERROR: " + msg.error.message); 60 InspectorTest.log("ERROR: " + msg.error.message);
61 InspectorTest.completeTest(); 61 InspectorTest.completeTest();
62 return; 62 return;
63 } 63 }
64 if (callback) 64 if (callback)
65 callback(msg.result); 65 callback(msg.result);
66 } 66 }
67 } 67 }
68 68
69 InspectorTest.domUndo = function(callback)
70 {
71 InspectorTest.sendCommandOrDie("DOM.undo", {}, callback);
72 }
73
74 InspectorTest.undoAndNext = function(next)
75 {
76 return InspectorTest.domUndo.bind(InspectorTest, next);
77 }
78
79 InspectorTest.runTestSuite = function(testSuite)
80 {
81 function nextTest()
82 {
83 if (!testSuite.length) {
84 InspectorTest.completeTest();
85 return;
86 }
87 var fun = testSuite.shift();
88 InspectorTest.log("\nRunning test: " + fun.name);
89 fun.call(null, nextTest);
apavlov 2014/03/26 13:15:38 Why not fun(nextTest); ?
lushnikov 2014/03/26 13:23:23 Done.
90 }
91
92 nextTest();
93 }
94
69 /** 95 /**
70 * @param {function(object)=} callback 96 * @param {function(object)=} callback
71 */ 97 */
72 InspectorTest.wrapCallback = function(callback) 98 InspectorTest.wrapCallback = function(callback)
73 { 99 {
74 /** 100 /**
75 * @param {object} message 101 * @param {object} message
76 */ 102 */
77 function callbackWrapper(message) 103 function callbackWrapper(message)
78 { 104 {
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after
330 initializers += "(" + window[symbol].toString() + ")();\n"; 356 initializers += "(" + window[symbol].toString() + ")();\n";
331 } 357 }
332 inspectorFrontend.postMessage(initializers + "(" + testFunction.toSt ring() +")();", "*"); 358 inspectorFrontend.postMessage(initializers + "(" + testFunction.toSt ring() +")();", "*");
333 return; 359 return;
334 } 360 }
335 // Kill waiting process if failed to send. 361 // Kill waiting process if failed to send.
336 alert("Failed to send test function"); 362 alert("Failed to send test function");
337 testRunner.notifyDone(); 363 testRunner.notifyDone();
338 }); 364 });
339 } 365 }
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/inspector-protocol/css/css-protocol-test.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698