File tree 1 file changed +19
-0
lines changed
java/client/test/org/openqa/selenium/firefox
1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change 36
36
import static org .junit .Assert .assertEquals ;
37
37
import static org .junit .Assert .assertNotNull ;
38
38
import static org .junit .Assert .assertTrue ;
39
+ import static org .junit .Assert .fail ;
39
40
40
41
public class FirefoxProfileTest {
41
42
private static final String FIREBUG_PATH = "third_party/firebug/firebug-1.5.0-fx.xpi" ;
@@ -104,6 +105,24 @@ public void shouldSetBooleanPreferences() throws Exception {
104
105
assertPreferenceValueEquals ("cheese" , false );
105
106
}
106
107
108
+ @ Test
109
+ public void shouldSetDefaultPreferences () throws Exception {
110
+ assertPreferenceValueEquals ("network.http.phishy-userpass-length" , 255 );
111
+ }
112
+
113
+ @ Test
114
+
115
+ public void shouldNotResetFrozenPreferences () throws Exception {
116
+ try {
117
+ profile .setPreference ("network.http.phishy-userpass-length" , 1024 );
118
+ fail ("Should not be able to reset a frozen preference" );
119
+ } catch (IllegalArgumentException ex ) {
120
+ // expected
121
+ }
122
+
123
+ assertPreferenceValueEquals ("network.http.phishy-userpass-length" , 255 );
124
+ }
125
+
107
126
@ Test
108
127
public void shouldInstallExtensionFromZip () throws IOException {
109
128
FirefoxProfile profile = new FirefoxProfile ();
You can’t perform that action at this time.
0 commit comments