From 64d34e57ea41c48b09ce847f7932d37519c038e0 Mon Sep 17 00:00:00 2001 From: Joe Ferris Date: Sat, 26 Feb 2011 17:05:28 -0500 Subject: [PATCH] Fixed cookies not being reset after each session --- spec/integration/driver_spec.rb | 3 +-- src/Reset.cpp | 1 + 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/spec/integration/driver_spec.rb b/spec/integration/driver_spec.rb index 1dbd21e..1264aaa 100644 --- a/spec/integration/driver_spec.rb +++ b/spec/integration/driver_spec.rb @@ -12,8 +12,7 @@ describe Capybara::Driver::Webkit do # TODO: bug with drag and drop # it_should_behave_like "driver with javascript support" - # TODO: needs to reset cookies after each test - # it_should_behave_like "driver with cookies support" + it_should_behave_like "driver with cookies support" # Can't support: # it_should_behave_like "driver with header support" diff --git a/src/Reset.cpp b/src/Reset.cpp index b32886c..d20662b 100644 --- a/src/Reset.cpp +++ b/src/Reset.cpp @@ -9,6 +9,7 @@ void Reset::start(QStringList &arguments) { page()->triggerAction(QWebPage::Stop); page()->mainFrame()->setHtml(""); + page()->networkAccessManager()->setCookieJar(new QNetworkCookieJar()); QString response = ""; emit finished(true, response); }