Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 371252 | Differences between
and this patch

Collapse All | Expand All

(-)js/org/eclipse/rwt/protocol/Processor.js (-15 / +50 lines)
Lines 17-23 Link Here
17
    this.processMeta( messageObject.meta );
17
    this.processMeta( messageObject.meta );
18
    var operations = messageObject.operations;
18
    var operations = messageObject.operations;
19
    for( var i = 0; i < operations.length; i++ ) {
19
    for( var i = 0; i < operations.length; i++ ) {
20
      this.processOperation( operations[ i ] );
20
      this.processOperationArray( operations[ i ] );
21
    }
21
    }
22
  },
22
  },
23
23
Lines 28-50 Link Here
28
    }
28
    }
29
  },
29
  },
30
30
31
  processOperation : function( operation ) {
31
  processOperationArray : function( operation ) {
32
    var action = operation[ 0 ];
32
    try {
33
    try {
33
      switch( operation.action ) {
34
      switch( action ) {
34
        case "create":
35
        case "create":
35
          this._processCreate( operation.target, operation.type, operation.properties );
36
          this._processCreate( operation[ 1 ], operation[ 2 ], operation[ 3 ] );
36
        break;
37
        break;
37
        case "set":
38
        case "set":
38
          this._processSet( operation.target, operation.properties );
39
          this._processSet( operation[ 1 ], operation[ 2 ] );
39
        break; 
40
        break; 
40
        case "destroy":
41
        case "listen":
41
          this._processDestroy( operation.target );
42
          this._processListen( operation[ 1 ], operation[ 2 ] );
42
        break; 
43
        break; 
43
        case "call":
44
        case "call":
44
          this._processCall( operation.target, operation.method, operation.properties );
45
          this._processCall( operation[ 1 ], operation[ 2 ], operation[ 3 ] );
45
        break; 
46
        break; 
46
        case "listen":
47
        case "destroy":
47
          this._processListen( operation.target, operation.properties );
48
          this._processDestroy( operation[ 1 ] );
48
        break; 
49
        break; 
49
      }
50
      }
50
    } catch( ex ) {
51
    } catch( ex ) {
Lines 52-57 Link Here
52
    }
53
    }
53
  },
54
  },
54
55
56
  processOperation : function( operation ) {
57
    switch( operation.action ) {
58
      case "create":
59
        this._processCreate( operation.target, operation.type, operation.properties );
60
      break;
61
      case "set":
62
        this._processSet( operation.target, operation.properties );
63
      break; 
64
      case "destroy":
65
        this._processDestroy( operation.target );
66
      break; 
67
      case "call":
68
        this._processCall( operation.target, operation.method, operation.properties );
69
      break; 
70
      case "listen":
71
        this._processListen( operation.target, operation.properties );
72
      break; 
73
    }
74
  },
75
55
  ////////////
76
  ////////////
56
  // Internals
77
  // Internals
57
78
Lines 133-141 Link Here
133
    } else {
154
    } else {
134
      errorstr = "No Error given!";
155
      errorstr = "No Error given!";
135
    }
156
    }
136
    var msg = "Operation \"" + operation.action + "\"";
157
    var msg = "Operation \"" + operation[ 0 ] + "\"";
137
    msg += " on target \"" +  operation.target + "\"";
158
    msg += " on target \"" +  operation[ 1 ] + "\"";
138
    var objectEntry = org.eclipse.rwt.protocol.ObjectManager.getEntry( operation.target );
159
    var objectEntry = org.eclipse.rwt.protocol.ObjectManager.getEntry( operation[ 1 ] );
139
    var target = objectEntry ? objectEntry.object : null;
160
    var target = objectEntry ? objectEntry.object : null;
140
    msg += " of type \"" +  ( target && target.classname ? target.classname : target ) + "\"";
161
    msg += " of type \"" +  ( target && target.classname ? target.classname : target ) + "\"";
141
    msg += " failed:";
162
    msg += " failed:";
Lines 146-153 Link Here
146
  
167
  
147
  _getPropertiesString : function( operation ) {
168
  _getPropertiesString : function( operation ) {
148
    var result = "";
169
    var result = "";
149
    for( var key in operation.properties ) {
170
    var properties;
150
      result += key + " = " + operation.properties[ key ] + "\n";
171
    switch( operation[ 0 ] ) {
172
      case "set":
173
      case "listen":
174
        properties = operation[ 2 ];
175
      break;
176
      case "create":
177
      case "call":
178
        properties = operation[ 3 ];
179
      break;
180
      default:
181
        properties = {};
182
      break;
183
    }
184
    for( var key in properties ) {
185
      result += key + " = " + properties[ key ] + "\n";
151
    }
186
    }
152
    return result;
187
    return result;
153
  },
188
  },
(-)js/org/eclipse/rwt/test/tests/ProtocolTest.js (-233 / +32 lines)
Lines 40-51 Link Here
40
        "height" : 33,
40
        "height" : 33,
41
        "width" : 24
41
        "width" : 24
42
      };
42
      };
43
      var operation = {
43
      var operation = [ "set", "dummyId", properties ];
44
        "target" : "dummyId",
44
      processor.processOperationArray( operation );
45
        "action" : "set",
46
        "properties" : properties
47
      };
48
      processor.processOperation( operation );
49
      assertEquals( [ "width", 24, "height", 33 ], targetObject.getLog() );
45
      assertEquals( [ "width", 24, "height", 33 ], targetObject.getLog() );
50
      registry.remove( "dummyType" );
46
      registry.remove( "dummyType" );
51
    },
47
    },
Lines 60-71 Link Here
60
      var properties = {
56
      var properties = {
61
        "height" : 33
57
        "height" : 33
62
      };
58
      };
63
      var operation = {
59
      processor.processOperationArray( [ "set", "dummyId", properties ] );
64
        "target" : "dummyId",
65
        "action" : "set",
66
        "properties" : properties
67
      };
68
      processor.processOperation( operation );
69
      assertEquals( [ "height", 33 ], targetObject.getLog() );
60
      assertEquals( [ "height", 33 ], targetObject.getLog() );
70
      registry.remove( "dummyType" );
61
      registry.remove( "dummyType" );
71
    },
62
    },
Lines 82-93 Link Here
82
        "width" : 24,
73
        "width" : 24,
83
        "top" : 14
74
        "top" : 14
84
      };
75
      };
85
      var operation = {
76
      processor.processOperationArray( [ "set", "dummyId", properties ] );
86
        "target" : "dummyId",
87
        "action" : "set",
88
        "properties" : properties
89
      };
90
      processor.processOperation( operation );
91
      assertEquals( [ "width", 24, "height", 33 ], targetObject.getLog() );
77
      assertEquals( [ "width", 24, "height", 33 ], targetObject.getLog() );
92
      registry.remove( "dummyType" );
78
      registry.remove( "dummyType" );
93
    },
79
    },
Lines 101-112 Link Here
101
        "height" : 33,
87
        "height" : 33,
102
        "width" : 24
88
        "width" : 24
103
      };
89
      };
104
      var operation = {
90
      processor.processOperationArray( [ "set", "dummyId", properties ] );
105
        "target" : "dummyId",
106
        "action" : "set",
107
        "properties" : properties
108
      };
109
      processor.processOperation( operation );
110
      assertEquals( [], targetObject.getLog() );
91
      assertEquals( [], targetObject.getLog() );
111
      registry.remove( "dummyType" );
92
      registry.remove( "dummyType" );
112
    },
93
    },
Lines 126-137 Link Here
126
      var properties = {
107
      var properties = {
127
        "awesomeness" : 1
108
        "awesomeness" : 1
128
      };
109
      };
129
      var operation = {
110
      processor.processOperationArray( [ "set", "dummyId", properties ] );
130
        "target" : "dummyId",
131
        "action" : "set",
132
        "properties" : properties
133
      };
134
      processor.processOperation( operation );
135
      assertEquals( [ "coolness", 100 ], targetObject.getLog() );
111
      assertEquals( [ "coolness", 100 ], targetObject.getLog() );
136
      registry.remove( "dummyType" );
112
      registry.remove( "dummyType" );
137
    },
113
    },
Lines 147-159 Link Here
147
      var properties = {
123
      var properties = {
148
        style : []
124
        style : []
149
      };
125
      };
150
      var operation = {
126
      processor.processOperationArray( [ "create", "dummyId", "dummyType", properties ] );
151
        type : "dummyType",
152
        "target" : "dummyId",
153
        "action" : "create",
154
        "properties" : properties
155
      };
156
      processor.processOperation( operation );
157
      var result = this._getTargetById( "dummyId" );
127
      var result = this._getTargetById( "dummyId" );
158
      assertEquals( "myclass", result.classname );
128
      assertEquals( "myclass", result.classname );
159
      registry.remove( "dummyType" );
129
      registry.remove( "dummyType" );
Lines 162-180 Link Here
162
    testProcessCreateAdapterHasNoConstructorFails : function() {
132
    testProcessCreateAdapterHasNoConstructorFails : function() {
163
      var registry = org.eclipse.rwt.protocol.AdapterRegistry;
133
      var registry = org.eclipse.rwt.protocol.AdapterRegistry;
164
      var processor = org.eclipse.rwt.protocol.Processor;
134
      var processor = org.eclipse.rwt.protocol.Processor;
165
      registry.add( "dummyType", {
135
      registry.add( "dummyType", {} );
166
      } );
136
      var properties = {};
167
      var properties = {
168
      };
169
      var error = null;
137
      var error = null;
170
      var operation = {
171
        type : "dummyType",
172
        "target" : "dummyId",
173
        "action" : "create",
174
        "properties" : properties
175
      };
176
      try { 
138
      try { 
177
        processor.processOperation( operation );
139
        processor.processOperationArray( [ "create", "dummyId", "dummyType", properties ] );
178
      } catch ( ex ) {
140
      } catch ( ex ) {
179
        error = ex;
141
        error = ex;
180
      }
142
      }
Lines 191-203 Link Here
191
      var properties = {
153
      var properties = {
192
        style : [ "BORDER", "FLAT" ]
154
        style : [ "BORDER", "FLAT" ]
193
      };
155
      };
194
      var operation = {
156
      processor.processOperationArray( [ "create", "dummyId", "dummyType", properties ] );
195
        type : "dummyType",
196
        "target" : "dummyId",
197
        "action" : "create",
198
        "properties" : properties
199
      };
200
      processor.processOperation( operation );
201
      var result = this._getTargetById( "dummyId" );
157
      var result = this._getTargetById( "dummyId" );
202
      // NOTE: Order is NOT relevant!
158
      // NOTE: Order is NOT relevant!
203
      assertTrue( result.getLog().indexOf( "rwt_BORDER" ) !== -1 );
159
      assertTrue( result.getLog().indexOf( "rwt_BORDER" ) !== -1 );
Lines 214-226 Link Here
214
      var properties = {
170
      var properties = {
215
        style : [ "BORDER", "FLAT" ]
171
        style : [ "BORDER", "FLAT" ]
216
      };
172
      };
217
      var operation = {
173
      processor.processOperationArray( [ "create", "dummyId", "dummyType", properties ] );
218
        type : "dummyType",
219
        "target" : "dummyId",
220
        "action" : "create",
221
        "properties" : properties
222
      };
223
      processor.processOperation( operation );
224
      var result = this._getTargetById( "dummyId" );
174
      var result = this._getTargetById( "dummyId" );
225
      var style = result.getStyleMap();
175
      var style = result.getStyleMap();
226
      assertTrue( style.BORDER );
176
      assertTrue( style.BORDER );
Lines 237-249 Link Here
237
      var properties = {
187
      var properties = {
238
        style : [ "BORDER", "FLAT" ]
188
        style : [ "BORDER", "FLAT" ]
239
      };
189
      };
240
      var operation = {
190
      processor.processOperationArray( [ "create", "dummyId", "dummyType", properties ] );
241
        type : "dummyType",
242
        "target" : "dummyId",
243
        "action" : "create",
244
        "properties" : properties
245
      };
246
      processor.processOperation( operation );
247
      var result = this._getTargetById( "dummyId" );
191
      var result = this._getTargetById( "dummyId" );
248
      assertIdentical( properties.style, result.getProperties().style );
192
      assertIdentical( properties.style, result.getProperties().style );
249
      registry.remove( "dummyType" );
193
      registry.remove( "dummyType" );
Lines 260-272 Link Here
260
        style : [],
204
        style : [],
261
        width : 34
205
        width : 34
262
      };
206
      };
263
      var operation = {
207
      processor.processOperationArray( [ "create", "dummyId", "dummyType", properties ] );
264
        type : "dummyType",
265
        "target" : "dummyId",
266
        "action" : "create",
267
        "properties" : properties
268
      };
269
      processor.processOperation( operation );
270
      var result = this._getTargetById( "dummyId" );
208
      var result = this._getTargetById( "dummyId" );
271
      assertEquals( [ "width", 34 ], result.getLog() );
209
      assertEquals( [ "width", 34 ], result.getLog() );
272
      registry.remove( "dummyType" );
210
      registry.remove( "dummyType" );
Lines 309-319 Link Here
309
          return [ target ];
247
          return [ target ];
310
        }
248
        }
311
      } );
249
      } );
312
      var operation = {
250
      processor.processOperationArray( [ "destroy", "dummyId" ] );
313
        "target" : "dummyId",
314
        "action" : "destroy"
315
      };
316
      processor.processOperation( operation );
317
      assertEquals( [ "destroy" ], target.getLog() );  
251
      assertEquals( [ "destroy" ], target.getLog() );  
318
      assertNull( target.getParent() );  
252
      assertNull( target.getParent() );  
319
      assertTrue( this._getTargetById( "dummyId" ) == null );
253
      assertTrue( this._getTargetById( "dummyId" ) == null );
Lines 335-345 Link Here
335
          return [ target ];
269
          return [ target ];
336
        }
270
        }
337
      } );
271
      } );
338
      var operation = {
272
      processor.processOperationArray( [ "destroy", "dummyId" ] );
339
        "target" : "dummyId",
340
        "action" : "destroy"
341
      };
342
      processor.processOperation( operation );
343
      assertEquals( [ "foo", "destroy" ], target.getLog() );
273
      assertEquals( [ "foo", "destroy" ], target.getLog() );
344
      assertTrue( this._getTargetById( "dummyId" ) == null );
274
      assertTrue( this._getTargetById( "dummyId" ) == null );
345
      registry.remove( "dummyType" );
275
      registry.remove( "dummyType" );
Lines 352-366 Link Here
352
        methods : [ "doFoo" ]
282
        methods : [ "doFoo" ]
353
      } );
283
      } );
354
      var targetObject = this._getDummyTarget( "dummyId" );
284
      var targetObject = this._getDummyTarget( "dummyId" );
355
      var properties = {
285
      var properties = {};
356
      };
286
      processor.processOperationArray( [ "call", "dummyId", "doFoo", properties ] );
357
      var operation = {
358
        "target" : "dummyId",
359
        "action" : "call",
360
        "method" : "doFoo",
361
        "properties" : properties
362
      };
363
      processor.processOperation( operation );
364
      assertEquals( "foo", targetObject.getLog()[ 0 ] );
287
      assertEquals( "foo", targetObject.getLog()[ 0 ] );
365
      assertIdentical( properties, targetObject.getLog()[ 1 ] );
288
      assertIdentical( properties, targetObject.getLog()[ 1 ] );
366
      registry.remove( "dummyType" );
289
      registry.remove( "dummyType" );
Lines 379-391 Link Here
379
      } );
302
      } );
380
      var targetObject = this._getDummyTarget( "dummyId" );
303
      var targetObject = this._getDummyTarget( "dummyId" );
381
      var properties = {};
304
      var properties = {};
382
      var operation = {
305
      processor.processOperationArray( [ "call", "dummyId", "doBar", properties ] );
383
        "target" : "dummyId",
384
        "action" : "call",
385
        "method" : "doBar",
386
        "properties" : properties
387
      };
388
      processor.processOperation( operation );
389
      assertEquals( "foo", targetObject.getLog()[ 0 ] );
306
      assertEquals( "foo", targetObject.getLog()[ 0 ] );
390
      assertIdentical( properties, targetObject.getLog()[ 1 ] );
307
      assertIdentical( properties, targetObject.getLog()[ 1 ] );
391
      registry.remove( "dummyType" );
308
      registry.remove( "dummyType" );
Lines 401-413 Link Here
401
      var properties = {
318
      var properties = {
402
        "foo" : [ 17, 42 ]
319
        "foo" : [ 17, 42 ]
403
     };
320
     };
404
      var operation = {
321
      processor.processOperationArray( [ "call", "dummyId", "doFoo", properties ] );
405
        "target" : "dummyId",
406
        "action" : "call",
407
        "method" : "doFoo",
408
        "properties" : properties
409
      };
410
      processor.processOperation( operation );
411
      assertEquals( "foo", targetObject.getLog()[ 0 ] );
322
      assertEquals( "foo", targetObject.getLog()[ 0 ] );
412
      var args = targetObject.getLog()[ 1 ];
323
      var args = targetObject.getLog()[ 1 ];
413
      assertEquals( properties, args );
324
      assertEquals( properties, args );
Lines 424-435 Link Here
424
      var properties = {
335
      var properties = {
425
        name : "doFoo"
336
        name : "doFoo"
426
      };
337
      };
427
      var operation = {
338
      processor.processOperationArray( [ "call", "dummyId", undefined, properties ] );
428
        "target" : "dummyId",
429
        "action" : "call",
430
        "properties" : properties
431
      };
432
      processor.processOperation( operation );
433
      assertEquals( 0, targetObject.getLog().length );
339
      assertEquals( 0, targetObject.getLog().length );
434
      registry.remove( "dummyType" );
340
      registry.remove( "dummyType" );
435
    },
341
    },
Lines 439-453 Link Here
439
      var processor = org.eclipse.rwt.protocol.Processor;
345
      var processor = org.eclipse.rwt.protocol.Processor;
440
      registry.add( "dummyType", { } );
346
      registry.add( "dummyType", { } );
441
      var targetObject = this._getDummyTarget( "dummyId" );
347
      var targetObject = this._getDummyTarget( "dummyId" );
442
      var properties = {
348
      var properties = { name : "doFoo" };
443
        name : "doFoo"
349
      processor.processOperationArray( [ "call", "dummyId", "", properties ] );
444
      };
445
      var operation = {
446
        "target" : "dummyId",
447
        "action" : "call",
448
        "properties" : properties
449
      };
450
      processor.processOperation( operation );
451
      assertEquals( 0, targetObject.getLog().length );
350
      assertEquals( 0, targetObject.getLog().length );
452
      registry.remove( "dummyType" );
351
      registry.remove( "dummyType" );
453
    },
352
    },
Lines 462-473 Link Here
462
      var properties = {
361
      var properties = {
463
        add : [ "foo" ]
362
        add : [ "foo" ]
464
      };
363
      };
465
      var operation = {
364
      processor.processOperationArray( [ "listen", "dummyId", properties ] ); 
466
        "target" : "dummyId",
467
        "action" : "listen",
468
        "properties" : properties
469
      };
470
      processor.processOperation( operation ); 
471
      // succeeds by not crashing
365
      // succeeds by not crashing
472
      registry.remove( "dummyType" );
366
      registry.remove( "dummyType" );
473
      targetObject.destroy();
367
      targetObject.destroy();
Lines 481-492 Link Here
481
      var properties = {
375
      var properties = {
482
        add : [ "mouse" ]
376
        add : [ "mouse" ]
483
      };
377
      };
484
      var operation = {
378
      processor.processOperationArray( [ "listen", "dummyId", properties ] ); 
485
        "target" : "dummyId",
486
        "action" : "listen",
487
        "properties" : properties
488
      };
489
      processor.processOperation( operation );
490
      // NOTE: hasEventListeners may return "undefined" instead of "false"      
379
      // NOTE: hasEventListeners may return "undefined" instead of "false"      
491
      assertTrue( !targetObject.hasEventListeners( "mousedown" ) );
380
      assertTrue( !targetObject.hasEventListeners( "mousedown" ) );
492
      assertTrue( !targetObject.hasEventListeners( "mouseup" ) );
381
      assertTrue( !targetObject.hasEventListeners( "mouseup" ) );
Lines 504-524 Link Here
504
      var properties = {
393
      var properties = {
505
        "foo" : true
394
        "foo" : true
506
      };
395
      };
507
      var operation = {
396
      processor.processOperationArray( [ "listen", "dummyId", properties ] ); 
508
        "target" : "dummyId",
509
        "action" : "listen",
510
        "properties" : properties
511
      };
512
      processor.processOperation( operation );
513
      properties = {
397
      properties = {
514
        "foo" : false
398
        "foo" : false
515
      };
399
      };
516
      var operation = {
400
      processor.processOperationArray( [ "listen", "dummyId", properties ] ); 
517
        "target" : "dummyId",
518
        "action" : "listen",
519
        "properties" : properties
520
      };
521
      processor.processOperation( operation );
522
      assertEquals(  [ "fooListener", true, "fooListener", false ], targetObject.getLog() );
401
      assertEquals(  [ "fooListener", true, "fooListener", false ], targetObject.getLog() );
523
      targetObject.destroy();
402
      targetObject.destroy();
524
    },
403
    },
Lines 538-615 Link Here
538
      var properties = {
417
      var properties = {
539
        "bar" : true
418
        "bar" : true
540
      };
419
      };
541
      var operation = {
420
      processor.processOperationArray( [ "listen", "dummyId", properties ] ); 
542
        "target" : "dummyId",
543
        "action" : "listen",
544
        "properties" : properties
545
      };
546
      processor.processOperation( operation );
547
      assertTrue( targetObject.getMyData( "barListener" ) );
421
      assertTrue( targetObject.getMyData( "barListener" ) );
548
      properties = {
422
      properties = {
549
        "bar" : false
423
        "bar" : false
550
      };
424
      };
551
      var operation = {
425
      processor.processOperationArray( [ "listen", "dummyId", properties ] ); 
552
        "target" : "dummyId",
553
        "action" : "listen",
554
        "properties" : properties
555
      };
556
      processor.processOperation( operation );
557
      assertNull( targetObject.getMyData( "barListener" ) );
426
      assertNull( targetObject.getMyData( "barListener" ) );
558
      targetObject.destroy();
427
      targetObject.destroy();
559
    },
428
    },
560
429
561
    testProcessExecuteWrongType : function() {
562
      var registry = org.eclipse.rwt.protocol.AdapterRegistry;
563
      var processor = org.eclipse.rwt.protocol.Processor;
564
      globalTemp = 1;
565
      var properties = {
566
        scriptType : "java",
567
        script : "globalTemp++;"
568
      };
569
      var operation = {
570
        "target" : "dummyId",
571
        "action" : "executeScript",
572
        "properties" : properties
573
      };
574
      processor.processOperation( operation );
575
      assertEquals( 1, globalTemp );
576
      delete globalTemp;
577
    },
578
579
    testProcessExecuteScriptMissing : function() {
580
      var registry = org.eclipse.rwt.protocol.AdapterRegistry;
581
      var processor = org.eclipse.rwt.protocol.Processor;
582
      globalTemp = 1;
583
      var properties = {
584
        scriptType : "text/javascript"
585
      };
586
      var operation = {
587
        "target" : "dummyId",
588
        "action" : "executeScript",
589
        "properties" : properties
590
      };
591
      processor.processOperation( operation );
592
      assertEquals( 1, globalTemp );
593
      delete globalTemp;
594
    },
595
596
597
    testProcessExecuteScriptWithError : function() {
598
      var registry = org.eclipse.rwt.protocol.AdapterRegistry;
599
      var processor = org.eclipse.rwt.protocol.Processor;
600
      var properties = {
601
        scriptType : "text/javascript",
602
        script : "x=null;x.test().bla();"
603
      };
604
      var operation = {
605
        "target" : "dummyId",
606
        "action" : "executeScript",
607
        "properties" : properties
608
      };
609
      processor.processOperation( operation );
610
      //suceeds by not crashing
611
    },
612
    
613
    testProcessMessage : function() {
430
    testProcessMessage : function() {
614
      var registry = org.eclipse.rwt.protocol.AdapterRegistry;
431
      var registry = org.eclipse.rwt.protocol.AdapterRegistry;
615
      var processor = org.eclipse.rwt.protocol.Processor;
432
      var processor = org.eclipse.rwt.protocol.Processor;
Lines 617-636 Link Here
617
        properties : [ "width", "height" ]
434
        properties : [ "width", "height" ]
618
      } );
435
      } );
619
      var targetObject = this._getDummyTarget( "dummyId" );
436
      var targetObject = this._getDummyTarget( "dummyId" );
620
      var operation1 = {
437
      var operation1 = [ "set", "dummyId", { "height" : 33 } ];
621
        "target" : "dummyId",
438
      var operation2 = [ "set", "dummyId", { "width" : 24 } ];
622
        "action" : "set",
623
        "properties" : {
624
          "height" : 33
625
        }
626
      };
627
      var operation2 = {
628
        "target" : "dummyId",
629
        "action" : "set",
630
        "properties" : {
631
          "width" : 24
632
        }
633
      };
634
      var message = {
439
      var message = {
635
        "meta" : {},
440
        "meta" : {},
636
        "operations" : [ operation1, operation2 ]
441
        "operations" : [ operation1, operation2 ]
Lines 647-659 Link Here
647
        properties : [ "width", "height", "fail" ]
452
        properties : [ "width", "height", "fail" ]
648
      } );
453
      } );
649
      var targetObject = this._getDummyTarget( "dummyId" );
454
      var targetObject = this._getDummyTarget( "dummyId" );
650
      var operation = {
455
      var operation = [ "set", "dummyId", { "fail" : 99 } ];
651
        "target" : "dummyId",
652
        "action" : "set",
653
        "properties" : {
654
          "fail" : 99
655
        }
656
      };
657
      var message = {
456
      var message = {
658
        "meta" : {},
457
        "meta" : {},
659
        "operations" : [ operation ]
458
        "operations" : [ operation ]

Return to bug 371252