@@ -17,92 +17,6 @@ describe('frameStateUtil', function () {
17
17
this . windowState = Immutable . fromJS ( Object . assign ( { } , defaultWindowStore . toJS ( ) ) )
18
18
} )
19
19
20
- describe ( 'cloneFrame' , function ( ) {
21
- before ( function ( ) {
22
- this . frameOpts = {
23
- key : 1 ,
24
- tabId : 2 ,
25
- parentFrameKey : 3 ,
26
- audioMuted : true ,
27
- canGoBack : true ,
28
- canGoForward : true ,
29
- icon : 'icon' ,
30
- title : 'title' ,
31
- isPrivate : true ,
32
- partitionNumber : 4 ,
33
- themeColor : 'ffffff' ,
34
- computedThemeColor : 'aaaaaa' ,
35
- history : [ 'http://brave.com' ] ,
36
- location : 'http://brave.com/about'
37
- }
38
- this . aboutFrameOpts = { }
39
- Object . assign ( this . aboutFrameOpts , this . frameOpts )
40
- this . aboutFrameOpts [ 'aboutDetails' ] =
41
- {
42
- errorCode : - 1 ,
43
- frameKey : 1
44
- }
45
- this . clonedFrame = frameStateUtil . cloneFrame ( this . frameOpts , 4 )
46
- this . key = 6
47
- this . aboutClonedFrame = frameStateUtil . cloneFrame ( this . aboutFrameOpts , 5 , this . key )
48
- } )
49
-
50
- it ( 'does not copy the key' , function ( ) {
51
- assert . equal ( this . frameOpts . key , 1 )
52
- assert . equal ( this . clonedFrame . key , undefined )
53
- } )
54
-
55
- it ( 'does not copy the tabId' , function ( ) {
56
- assert . equal ( this . frameOpts . tabId , 2 )
57
- assert . equal ( this . clonedFrame . tabId , undefined )
58
- } )
59
-
60
- it ( 'sets the parentFrameKey to frameOpts.key' , function ( ) {
61
- assert . equal ( this . frameOpts . parentFrameKey , 3 )
62
- assert . equal ( this . clonedFrame . parentFrameKey , 1 )
63
- } )
64
-
65
- it ( 'sets the delayedLoadUrl to frameOpts.location' , function ( ) {
66
- assert . equal ( this . clonedFrame . delayedLoadUrl , 'http://brave.com/about' )
67
- } )
68
-
69
- it ( 'sets the location to about:blank' , function ( ) {
70
- assert . equal ( this . clonedFrame . location , 'about:blank' )
71
- } )
72
-
73
- it ( 'sets the src to about:blank' , function ( ) {
74
- assert . equal ( this . clonedFrame . src , 'about:blank' )
75
- } )
76
-
77
- it ( 'sets the guestInstanceId' , function ( ) {
78
- assert . equal ( this . clonedFrame . guestInstanceId , 4 )
79
- } )
80
-
81
- it ( 'copies audioMuted, canGoBack, canGoForward, icon, title, isPrivate, partitionNumber, themeColor, computere and history' , function ( ) {
82
- // attributes that should be copied
83
- assert . equal ( this . clonedFrame . audioMuted , true )
84
- assert . equal ( this . clonedFrame . canGoBack , true )
85
- assert . equal ( this . clonedFrame . canGoForward , true )
86
- assert . equal ( this . clonedFrame . icon , 'icon' )
87
- assert . equal ( this . clonedFrame . title , 'title' )
88
- assert . equal ( this . clonedFrame . isPrivate , true )
89
- assert . equal ( this . clonedFrame . partitionNumber , 4 )
90
- assert . equal ( this . clonedFrame . themeColor , 'ffffff' )
91
- assert . equal ( this . clonedFrame . computedThemeColor , 'aaaaaa' )
92
- assert . deepEqual ( this . clonedFrame . history , [ 'http://brave.com' ] )
93
- assert ( this . clonedFrame . history !== this . frameOpts . history )
94
- } )
95
-
96
- it ( 'clone without aboutDetails' , function ( ) {
97
- assert . equal ( this . clonedFrame . aboutDetails , undefined )
98
- } )
99
-
100
- it ( 'copies aboutDetails with key' , function ( ) {
101
- assert . equal ( this . aboutClonedFrame . aboutDetails . errorCode , this . aboutFrameOpts . aboutDetails . errorCode )
102
- assert . equal ( this . aboutClonedFrame . aboutDetails . frameKey , this . key )
103
- } )
104
- } )
105
-
106
20
describe ( 'query' , function ( ) {
107
21
before ( function ( ) {
108
22
this . frames = Immutable . fromJS ( [
0 commit comments