|
44 | 44 |
|
45 | 45 | @Category(UnitTests.class) |
46 | 46 | public class FirefoxProfileTest { |
47 | | - private static final String FIREBUG_PATH = "third_party/firebug/firebug-1.5.0-fx.xpi"; |
48 | | - private static final String FIREBUG_RESOURCE_PATH = |
49 | | - "java/test/org/openqa/selenium/firefox/firebug-1.5.0-fx.xpi"; |
50 | | - private static final String MOOLTIPASS_PATH = "third_party/firebug/mooltipass-1.1.87.xpi"; |
| 47 | + private static final String EXT_PATH = "common/extensions/webextensions-selenium-example.xpi"; |
| 48 | + private static final String EXT_RESOURCE_PATH = |
| 49 | + "java/test/org/openqa/selenium/firefox/webextensions-selenium-example.xpi"; |
51 | 50 |
|
52 | 51 | private FirefoxProfile profile; |
53 | 52 |
|
@@ -137,48 +136,29 @@ public void shouldAllowSettingFrozenPreferences() throws Exception { |
137 | 136 | assertPreferenceValueEquals("network.http.phishy-userpass-length", 1024); |
138 | 137 | } |
139 | 138 |
|
140 | | - @Test |
141 | | - @Ignore("Need to replace the extension") |
142 | | - public void shouldInstallExtensionFromZip() { |
143 | | - profile.addExtension(InProject.locate(FIREBUG_PATH).toFile()); |
144 | | - File profileDir = profile.layoutOnDisk(); |
145 | | - File extensionFile = new File( profileDir, "extensions/[email protected]"); |
146 | | - assertThat(extensionFile).exists().isFile(); |
147 | | - } |
148 | | - |
149 | 139 | @Test |
150 | 140 | public void shouldInstallWebExtensionFromZip() { |
151 | | - profile.addExtension(InProject.locate(MOOLTIPASS_PATH).toFile()); |
| 141 | + profile.addExtension(InProject.locate(EXT_PATH).toFile()); |
152 | 142 | File profileDir = profile.layoutOnDisk(); |
153 | | - File extensionFile = new File( profileDir, "extensions/[email protected].xpi"); |
| 143 | + File extensionFile = new File( profileDir, "extensions/[email protected].xpi"); |
154 | 144 | assertThat(extensionFile).exists().isFile(); |
155 | 145 | } |
156 | 146 |
|
157 | | - @Test |
158 | | - public void shouldInstallExtensionFromDirectory() throws IOException { |
159 | | - File extension = InProject.locate(FIREBUG_PATH).toFile(); |
160 | | - File unzippedExtension = Zip.unzipToTempDir(new FileInputStream(extension), "unzip", "stream"); |
161 | | - profile.addExtension(unzippedExtension); |
162 | | - File profileDir = profile.layoutOnDisk(); |
163 | | - File extensionDir = new File( profileDir, "extensions/[email protected]"); |
164 | | - assertThat(extensionDir).exists().isDirectory(); |
165 | | - } |
166 | | - |
167 | 147 | @Test |
168 | 148 | public void shouldInstallWebExtensionFromDirectory() throws IOException { |
169 | | - File extension = InProject.locate(MOOLTIPASS_PATH).toFile(); |
| 149 | + File extension = InProject.locate(EXT_PATH).toFile(); |
170 | 150 | File unzippedExtension = Zip.unzipToTempDir(new FileInputStream(extension), "unzip", "stream"); |
171 | 151 | profile.addExtension(unzippedExtension); |
172 | 152 | File profileDir = profile.layoutOnDisk(); |
173 | | - File extensionDir = new File( profileDir, "extensions/[email protected]"); |
| 153 | + File extensionDir = new File( profileDir, "extensions/[email protected]"); |
174 | 154 | assertThat(extensionDir).exists(); |
175 | 155 | } |
176 | 156 |
|
177 | 157 | @Test |
178 | 158 | public void shouldInstallExtensionUsingClasspath() { |
179 | | - profile.addExtension(FirefoxProfileTest.class, FIREBUG_RESOURCE_PATH); |
| 159 | + profile.addExtension(FirefoxProfileTest.class, EXT_RESOURCE_PATH); |
180 | 160 | File profileDir = profile.layoutOnDisk(); |
181 | | - File extensionDir = new File( profileDir, "extensions/[email protected].com.xpi"); |
| 161 | + File extensionDir = new File(profileDir, "extensions/webextensions-selenium-example@example.com.xpi"); |
182 | 162 | assertThat(extensionDir).exists(); |
183 | 163 | } |
184 | 164 |
|
|
0 commit comments