[selenium-core] Fix firefox4

Lubomir Rintel lkundrak at fedoraproject.org
Tue Apr 5 15:37:31 UTC 2011


commit 27595c02a0bc97e06bb5d22ab27fbe5513321ded
Author: Lubomir Rintel <lkundrak at v3.sk>
Date:   Tue Apr 5 17:22:38 2011 +0200

    Fix firefox4

 selenium-core-1.0.2-ant-trax.patch |   52 ------------------------------------
 selenium-core-1.0.2-xray.patch     |   36 +++++++++++++++++++++++++
 selenium-core.spec                 |   14 ++++++---
 3 files changed, 45 insertions(+), 57 deletions(-)
---
diff --git a/selenium-core-1.0.2-xray.patch b/selenium-core-1.0.2-xray.patch
new file mode 100644
index 0000000..0ddce4b
--- /dev/null
+++ b/selenium-core-1.0.2-xray.patch
@@ -0,0 +1,36 @@
+From 5ec848928be1d5f3bb1d6bfe5d653bdc6677d59c Mon Sep 17 00:00:00 2001
+From: Lubomir Rintel <lkundrak at v3.sk>
+Date: Tue, 5 Apr 2011 15:30:57 +0200
+Subject: [PATCH] Unwrap xray objects
+
+Backport from
+http://groups.google.com/group/selenium-developer-activity/browse_thread/thread/5476ee8d15c31a3a
+---
+ .../resources/core/scripts/selenium-browserbot.js  |   11 +++++++++++
+ 1 files changed, 11 insertions(+), 0 deletions(-)
+
+diff --git a/src/main/resources/core/scripts/selenium-browserbot.js b/src/main/resources/core/scripts/selenium-browserbot.js
+index 30fe3ed..a8c3866 100644
+--- a/src/main/resources/core/scripts/selenium-browserbot.js
++++ b/src/main/resources/core/scripts/selenium-browserbot.js
+@@ -1135,6 +1135,17 @@ BrowserBot.prototype.getCurrentWindow = function(doNotModify) {
+         this.newPageLoaded = false;
+     }
+     testWindow = this._handleClosedSubFrame(testWindow, doNotModify);
++
++    // unwrap is not available on older branches (3.5 and 3.6) - Bug 533596
++    if (XPCNativeWrapper && "unwrap" in XPCNativeWrapper) {
++      try {
++        testWindow = XPCNativeWrapper.unwrap(testWindow);
++      } catch(e) {
++        //Unwrapping will fail for JS literals - numbers, for example. Catch
++        // the exception and proceed, it will eventually be returend as-is.
++      }
++    }
++
+     return testWindow;
+ };
+ 
+-- 
+1.7.4
+
diff --git a/selenium-core.spec b/selenium-core.spec
index b24563e..db23651 100644
--- a/selenium-core.spec
+++ b/selenium-core.spec
@@ -1,6 +1,6 @@
 Name:           selenium-core
 Version:        1.0.2
-Release:        0.6.20100324svn%{?dist}
+Release:        0.7.20100324svn%{?dist}
 Summary:        A DHTML test execution framework
 
 Group:          Development/Tools
@@ -15,8 +15,8 @@ URL:            http://seleniumhq.org/projects/core/
 # tar czf selenium-core.tar.gz selenium-core
 Source0:        selenium-core.tar.gz
 Patch0:         selenium-core-1.0.2-no-test-deps.patch
-Patch1:         selenium-core-1.0.2-ant-trax.patch
 Patch2:         selenium-core-1.0.2-svnversion.patch
+Patch3:         selenium-core-1.0.2-xray.patch
 BuildRoot:      %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
 
 BuildRequires:  ant-junit
@@ -46,9 +46,9 @@ mode), but it also can be deployed on the desired application server.
 
 %prep
 %setup -q -n %{name}
-%patch0 -p0 -b .no-test-deps
-%patch1 -p1 -b .ant-trax
-%patch2 -p1 -b .svnversion
+%patch0 -p0
+%patch2 -p1
+%patch3 -p1
 
 
 %build
@@ -109,6 +109,10 @@ rm -rf $RPM_BUILD_ROOT
 
 
 %changelog
+* Tue Apr 05 2011 Lubomir Rintel (GoodData) <lubo.rintel at gooddata.com> - 1.0.2-0.7.20100324svn
+- Drop the broken ant-trax patch
+- Fix Firefox 4 getEval()
+
 * Wed Feb 09 2011 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1.0.2-0.6.20100324svn
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
 


More information about the scm-commits mailing list