File tree Expand file tree Collapse file tree 1 file changed +22
-0
lines changed
Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -33,6 +33,11 @@ class FirefoxProfile {
3333 */
3434 private $ extensions = array ();
3535
36+ /**
37+ * @var string
38+ */
39+ private $ rdfFile ;
40+
3641 /**
3742 * @param string $extension The path to the xpi extension.
3843 * @return FirefoxProfile
@@ -42,6 +47,19 @@ public function addExtension($extension) {
4247 return $ this ;
4348 }
4449
50+ /**
51+ * @param string $rdfFile The path to the rdf file
52+ * @return FirefoxProfile
53+ */
54+ public function setRdfFile ($ rdfFile ) {
55+ if (!is_file ($ rdfFile )) {
56+ return ;
57+ }
58+
59+ $ this ->rdfFile = $ rdfFile ;
60+ return $ this ;
61+ }
62+
4563 /**
4664 * @param string $key
4765 * @param string|bool|int $value
@@ -69,6 +87,10 @@ public function setPreference($key, $value) {
6987 public function encode () {
7088 $ temp_dir = $ this ->createTempDirectory ('WebDriverFirefoxProfile ' );
7189
90+ if (isset ($ this ->rdfFile )) {
91+ copy ($ this ->rdfFile , $ temp_dir . DIRECTORY_SEPARATOR . "mimeTypes.rdf " );
92+ }
93+
7294 foreach ($ this ->extensions as $ extension ) {
7395 $ this ->installExtension ($ extension , $ temp_dir );
7496 }
You can’t perform that action at this time.
0 commit comments