File tree 3 files changed +30
-2
lines changed
3 files changed +30
-2
lines changed Original file line number Diff line number Diff line change 65
65
var info = this . _getPropertyInfo ( property , this . properties ) ;
66
66
if ( ! info ) {
67
67
this . behaviors . some ( function ( b ) {
68
- var info = this . _getPropertyInfo ( property , b . properties ) ;
68
+ return info = this . _getPropertyInfo ( property , b . properties ) ;
69
69
} , this ) ;
70
70
}
71
71
return info || Polymer . nob ;
Original file line number Diff line number Diff line change 17
17
label : {
18
18
type : String ,
19
19
observer : '_labelChanged'
20
+ } ,
21
+
22
+ hasOptionsA : {
23
+ readOnly : true ,
24
+ notify : true
20
25
}
21
26
22
27
} ,
37
42
this . __change = e . detail . value ;
38
43
}
39
44
40
- }
45
+ } ;
41
46
42
47
</ script >
43
48
51
56
type : Boolean ,
52
57
value : false ,
53
58
observer : '_disabledChanged'
59
+ } ,
60
+
61
+ hasOptionsB : {
62
+ readOnly : true ,
63
+ notify : true
54
64
}
55
65
56
66
} ,
Original file line number Diff line number Diff line change 46
46
assert . equal ( el . __change , 'bar' ) ;
47
47
} ) ;
48
48
49
+ test ( 'property info from behavior A' , function ( ) {
50
+ assert . equal ( el . getPropertyInfo ( 'hasOptionsA' ) . notify , true ) ;
51
+ assert . equal ( el . getPropertyInfo ( 'hasOptionsA' ) . readOnly , true ) ;
52
+ assert . equal ( typeof el . _setHasOptionsA , 'function' ) ;
53
+ } ) ;
54
+
49
55
} ) ;
50
56
51
57
suite ( 'multi-behaviors element' , function ( ) {
85
91
assert . equal ( el . __change , 'bar' ) ;
86
92
} ) ;
87
93
94
+ test ( 'property info from behavior A' , function ( ) {
95
+ assert . equal ( el . getPropertyInfo ( 'hasOptionsA' ) . notify , true ) ;
96
+ assert . equal ( el . getPropertyInfo ( 'hasOptionsA' ) . readOnly , true ) ;
97
+ assert . equal ( typeof el . _setHasOptionsA , 'function' ) ;
98
+ } ) ;
99
+
100
+ test ( 'property info from behavior B' , function ( ) {
101
+ assert . equal ( el . getPropertyInfo ( 'hasOptionsB' ) . readOnly , true ) ;
102
+ assert . equal ( el . getPropertyInfo ( 'hasOptionsB' ) . notify , true ) ;
103
+ assert . equal ( typeof el . _setHasOptionsB , 'function' ) ;
104
+ } ) ;
105
+
88
106
} ) ;
89
107
90
108
</ script >
You can’t perform that action at this time.
0 commit comments