diff --git a/lib/capybara/webkit/browser.rb b/lib/capybara/webkit/browser.rb index befbb2d..b871e77 100644 --- a/lib/capybara/webkit/browser.rb +++ b/lib/capybara/webkit/browser.rb @@ -34,10 +34,6 @@ module Capybara::Webkit command("Body") end - def source - command("Source") - end - def status_code command("Status").to_i end diff --git a/lib/capybara/webkit/driver.rb b/lib/capybara/webkit/driver.rb index b5aa151..310e7ad 100644 --- a/lib/capybara/webkit/driver.rb +++ b/lib/capybara/webkit/driver.rb @@ -33,10 +33,6 @@ module Capybara::Webkit browser.find(query).map { |native| Node.new(self, native) } end - def source - browser.source - end - def html browser.body end diff --git a/spec/driver_spec.rb b/spec/driver_spec.rb index 64e8d91..7595409 100644 --- a/spec/driver_spec.rb +++ b/spec/driver_spec.rb @@ -356,10 +356,6 @@ describe Capybara::Webkit::Driver do driver.current_url.should =~ /hello#display_none/ end - it "returns the source code for the page" do - driver.source.should =~ %r{.*greeting.*}m - end - it "evaluates Javascript and returns a string" do result = driver.evaluate_script(%) result.should == "hello" @@ -1683,18 +1679,6 @@ describe Capybara::Webkit::Driver do it_behaves_like "a keyupdown app" end - context "null byte app" do - let(:driver) do - driver_for_html("Hello\0World") - end - - before { visit("/") } - - it "should include all the bytes in the source" do - driver.source.should == "Hello\0World" - end - end - context "javascript new window app" do let(:driver) do driver_for_app do diff --git a/src/CommandFactory.cpp b/src/CommandFactory.cpp index 9d57d18..9a7f35e 100644 --- a/src/CommandFactory.cpp +++ b/src/CommandFactory.cpp @@ -5,7 +5,6 @@ #include "Find.h" #include "Reset.h" #include "Node.h" -#include "Source.h" #include "Evaluate.h" #include "Execute.h" #include "FrameFocus.h" diff --git a/src/Source.cpp b/src/Source.cpp deleted file mode 100644 index 0543543..0000000 --- a/src/Source.cpp +++ /dev/null @@ -1,20 +0,0 @@ -#include "Source.h" -#include "WebPage.h" -#include "WebPageManager.h" -#include "NetworkAccessManager.h" - -Source::Source(WebPageManager *manager, QStringList &arguments, QObject *parent) : SocketCommand(manager, arguments, parent) { -} - -void Source::start() { - NetworkAccessManager* accessManager = page()->networkAccessManager(); - QNetworkRequest request(page()->currentFrame()->requestedUrl()); - reply = accessManager->get(request); - - connect(reply, SIGNAL(finished()), this, SLOT(sourceLoaded())); -} - -void Source::sourceLoaded() { - emit finished(new Response(true, reply->readAll())); -} - diff --git a/src/Source.h b/src/Source.h deleted file mode 100644 index 57d6d2f..0000000 --- a/src/Source.h +++ /dev/null @@ -1,18 +0,0 @@ -#include "SocketCommand.h" - -class QNetworkReply; - -class Source : public SocketCommand { - Q_OBJECT - - public: - Source(WebPageManager *, QStringList &arguments, QObject *parent = 0); - virtual void start(); - - public slots: - void sourceLoaded(); - - private: - QNetworkReply *reply; -}; - diff --git a/src/find_command.h b/src/find_command.h index 0cb8f6f..633e116 100644 --- a/src/find_command.h +++ b/src/find_command.h @@ -7,7 +7,6 @@ CHECK_COMMAND(Visit) CHECK_COMMAND(Find) CHECK_COMMAND(Reset) CHECK_COMMAND(Node) -CHECK_COMMAND(Source) CHECK_COMMAND(Evaluate) CHECK_COMMAND(Execute) CHECK_COMMAND(FrameFocus) diff --git a/src/webkit_server.pro b/src/webkit_server.pro index 55a036d..0fc0b2f 100644 --- a/src/webkit_server.pro +++ b/src/webkit_server.pro @@ -25,7 +25,6 @@ HEADERS = \ Reset.h \ Node.h \ JavascriptInvocation.h \ - Source.h \ Evaluate.h \ Execute.h \ FrameFocus.h \ @@ -82,7 +81,6 @@ SOURCES = \ Reset.cpp \ Node.cpp \ JavascriptInvocation.cpp \ - Source.cpp \ Evaluate.cpp \ Execute.cpp \ FrameFocus.cpp \