This repository was archived by the owner on Oct 8, 2021. It is now read-only.
File tree 2 files changed +22
-0
lines changed
2 files changed +22
-0
lines changed Original file line number Diff line number Diff line change 145
145
same ( $ ( "#encoded" ) . getEncodedText ( ) , "foo>" ) ;
146
146
same ( $ ( "#unencoded" ) . getEncodedText ( ) , "foo" ) ;
147
147
} ) ;
148
+
149
+ test ( "closestPageData returns the parent's page data" , function ( ) {
150
+ var pageChild = $ ( "#page-child" ) ;
151
+
152
+ $ ( "#parent-page" ) . data ( "page" , { foo : "bar" } ) ;
153
+ same ( pageChild . closestPageData ( ) . foo , "bar" ) ;
154
+ } ) ;
155
+
156
+ test ( "closestPageData returns the parent dialog's page data" , function ( ) {
157
+ var dialogChild = $ ( "#dialog-child" ) ;
158
+
159
+ $ ( "#parent-dialog" ) . data ( "page" , { foo : "bar" } ) ;
160
+ same ( dialogChild . closestPageData ( ) . foo , "bar" ) ;
161
+ } ) ;
148
162
} ) ( jQuery ) ;
Original file line number Diff line number Diff line change @@ -35,6 +35,14 @@ <h2 id="qunit-userAgent"></h2>
35
35
< div id ="dependent "> </ div >
36
36
< div id ="encoded "> foo></ div >
37
37
< div id ="unencoded "> < script > foo </ script > </ div >
38
+
39
+ < div id ="parent-page " data-nstest-role ="page ">
40
+ < div id ="page-child "> </ div >
41
+ </ div >
42
+
43
+ < div id ="parent-dialog " data-nstest-role ="dialog ">
44
+ < div id ="dialog-child "> </ div >
45
+ </ div >
38
46
</ div >
39
47
</ body >
40
48
</ html >
You can’t perform that action at this time.
0 commit comments