Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Add support for running the testsuite in Opera

  • Loading branch information...
commit 5130903cc509956a078e492f16861f88b720980b 1 parent 2166dbe
@gsnedders authored
Showing with 20 additions and 1 deletion.
  1. +3 −0  test/resources/opera/operaprefs.ini
  2. +17 −1 test/test.py
View
3  test/resources/opera/operaprefs.ini
@@ -0,0 +1,3 @@
+[State]
+Accept License=1
+
View
18 test/test.py
@@ -280,6 +280,21 @@ def start(self, url):
"--no-first-run", "--disable-sync", url])
self.process = subprocess.Popen(cmds, stdout = self.browserLog, stderr = self.browserLog)
+class OperaBrowserCommand(BaseBrowserCommand):
+ def _fixupMacPath(self):
+ self.path = os.path.join(self.path, "Contents", "MacOS", "Opera")
+
+ def setup(self):
+ super(OperaBrowserCommand, self).setup()
+ shutil.copytree(os.path.join(DOC_ROOT, "test", "resources", "opera"),
+ self.profileDir)
+
+ def start(self, url):
+ cmds = [self.path]
+ cmds.extend(["-pd", self.profileDir, "-nosession", url])
+ print repr(cmds)
+ self.process = subprocess.Popen(cmds, stdout = self.browserLog, stderr = self.browserLog)
+
def makeBrowserCommand(browser):
path = browser["path"].lower()
name = browser["name"]
@@ -287,7 +302,8 @@ def makeBrowserCommand(browser):
name = name.lower()
types = {"firefox": FirefoxBrowserCommand,
- "chrome": ChromeBrowserCommand }
+ "chrome": ChromeBrowserCommand,
+ "opera": OperaBrowserCommand }
command = None
for key in types.keys():
if (name and name.find(key) > -1) or path.find(key) > -1:
Please sign in to comment.
Something went wrong with that request. Please try again.