@@ -82,31 +82,31 @@ Item {
82
82
function test_oneScript () {
83
83
webEngineView .url = Qt .resolvedUrl (" test1.html" );
84
84
webEngineView .waitForLoadSucceeded ();
85
- compare (webEngineView . title , " Test page 1" );
85
+ tryCompare (webEngineView, " title" , " Test page 1" );
86
86
87
87
webEngineView .userScripts = [ changeDocumentTitleScript ];
88
88
compare (webEngineView .title , " Test page 1" );
89
89
90
90
webEngineView .reload ();
91
91
webEngineView .waitForLoadSucceeded ();
92
- compare (webEngineView . title , " New title" );
92
+ tryCompare (webEngineView, " title" , " New title" );
93
93
94
94
webEngineView .url = Qt .resolvedUrl (" test2.html" );
95
95
webEngineView .waitForLoadSucceeded ();
96
- compare (webEngineView . title , " New title" );
96
+ tryCompare (webEngineView, " title" , " New title" );
97
97
98
98
webEngineView .userScripts = [];
99
99
compare (webEngineView .title , " New title" );
100
100
101
101
webEngineView .reload ();
102
102
webEngineView .waitForLoadSucceeded ();
103
- compare (webEngineView . title , " Test page with huge link area" );
103
+ tryCompare (webEngineView, " title" , " Test page with huge link area" );
104
104
}
105
105
106
106
function test_twoScripts () {
107
107
webEngineView .url = Qt .resolvedUrl (" test1.html" );
108
108
webEngineView .waitForLoadSucceeded ();
109
- compare (webEngineView . title , " Test page 1" );
109
+ tryCompare (webEngineView, " title" , " Test page 1" );
110
110
111
111
webEngineView .userScripts = [ changeDocumentTitleScript, appendDocumentTitleScript ];
112
112
@@ -134,22 +134,22 @@ Item {
134
134
function test_setUserScriptsConditionally () {
135
135
webEngineViewWithConditionalUserScripts .url = Qt .resolvedUrl (" test1.html" );
136
136
webEngineViewWithConditionalUserScripts .waitForLoadSucceeded ();
137
- compare (webEngineViewWithConditionalUserScripts . title , " New title" );
137
+ tryCompare (webEngineViewWithConditionalUserScripts, " title" , " New title" );
138
138
139
139
webEngineViewWithConditionalUserScripts .url = Qt .resolvedUrl (" test2.html" );
140
140
webEngineViewWithConditionalUserScripts .waitForLoadSucceeded ();
141
- compare (webEngineViewWithConditionalUserScripts . title , " Test page with huge link area with appendix" );
141
+ tryCompare (webEngineViewWithConditionalUserScripts, " title" , " Test page with huge link area with appendix" );
142
142
143
143
webEngineViewWithConditionalUserScripts .url = Qt .resolvedUrl (" test3.html" );
144
144
webEngineViewWithConditionalUserScripts .waitForLoadSucceeded ();
145
- compare (webEngineViewWithConditionalUserScripts . title , " Test page 3" );
145
+ tryCompare (webEngineViewWithConditionalUserScripts, " title" , " Test page 3" );
146
146
}
147
147
148
148
function test_bigScript () {
149
149
webEngineView .userScripts = [ bigUserScript ];
150
150
webEngineView .url = Qt .resolvedUrl (" test1.html" );
151
151
webEngineView .waitForLoadSucceeded ();
152
- compare (webEngineView . title , " Big user script changed title" );
152
+ tryCompare (webEngineView , " title" , " Big user script changed title" );
153
153
}
154
154
}
155
155
}
0 commit comments