diff --git a/CHANGELOG b/CHANGELOG index a02620e90..168c19569 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,5 +1,7 @@ *SVN* +* Fix jstest.rb Konqueror support. Closes #7140. [Christophe Porteneuve] + * Fix regression in which no-argument calls to Element.addMethods() would not add the methods defined in Form.Methods and Form.Element.Methods. Closes #8206. [Tobie Langel, fwittekind] * Fix Element#readAttribute to work with the 'type' attribute in IE. Closes #8160. [Tobie Langel, Wiktor Ihárosi] diff --git a/test/lib/jstest.rb b/test/lib/jstest.rb index 4ed06ebc6..5128afa9b 100644 --- a/test/lib/jstest.rb +++ b/test/lib/jstest.rb @@ -1,6 +1,8 @@ require 'rake/tasklib' require 'thread' require 'webrick' +require 'fileutils' +include FileUtils class Browser def supported?; true; end @@ -100,9 +102,33 @@ def to_s end class KonquerorBrowser < Browser + @@configDir = File.join(ENV['HOME'], '.kde', 'share', 'config') + @@globalConfig = File.join(@@configDir, 'kdeglobals') + @@konquerorConfig = File.join(@@configDir, 'konquerorrc') + def supported? linux? end + + # Forces KDE's default browser to be Konqueror during the tests, and forces + # Konqueror to open external URL requests in new tabs instead of a new + # window. + def setup + cd @@configDir, :verbose => false do + copy @@globalConfig, "#{@@globalConfig}.bak", :preserve => true, :verbose => false + copy @@konquerorConfig, "#{@@konquerorConfig}.bak", :preserve => true, :verbose => false + # Too lazy to write it in Ruby... Is sed dependency so bad? + system "sed -ri /^BrowserApplication=/d '#{@@globalConfig}'" + system "sed -ri /^KonquerorTabforExternalURL=/s:false:true: '#{@@konquerorConfig}'" + end + end + + def teardown + cd @@configDir, :verbose => false do + copy "#{@@globalConfig}.bak", @@globalConfig, :preserve => true, :verbose => false + copy "#{@@konquerorConfig}.bak", @@konquerorConfig, :preserve => true, :verbose => false + end + end def visit(url) system("kfmclient openURL #{url}")