capybara-webkit 0.13.2 → 0.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/.travis.yml +10 -0
- data/Gemfile.lock +20 -18
- data/NEWS.md +20 -1
- data/README.md +12 -10
- data/capybara-webkit.gemspec +3 -2
- data/lib/capybara/webkit/browser.rb +10 -19
- data/lib/capybara/webkit/connection.rb +13 -34
- data/lib/capybara/webkit/driver.rb +5 -22
- data/lib/capybara/webkit/node.rb +10 -2
- data/lib/capybara/webkit/version.rb +1 -1
- data/lib/capybara_webkit_builder.rb +10 -1
- data/spec/browser_spec.rb +1 -1
- data/spec/connection_spec.rb +4 -2
- data/spec/driver_rendering_spec.rb +2 -2
- data/spec/driver_resize_window_spec.rb +29 -40
- data/spec/driver_spec.rb +368 -125
- data/spec/integration/session_spec.rb +100 -6
- data/spec/spec_helper.rb +6 -9
- data/spec/support/app_runner.rb +2 -12
- data/src/Authenticate.cpp +2 -2
- data/src/ClearCookies.cpp +1 -1
- data/src/ClearPromptText.cpp +1 -1
- data/src/Command.cpp +13 -0
- data/src/Command.h +6 -0
- data/src/CommandFactory.cpp +1 -3
- data/src/Connection.cpp +4 -3
- data/src/ConsoleMessages.cpp +4 -1
- data/src/CurrentUrl.cpp +1 -16
- data/src/CurrentUrl.h +0 -6
- data/src/EnableLogging.cpp +1 -1
- data/src/Evaluate.cpp +3 -74
- data/src/Evaluate.h +0 -8
- data/src/Execute.cpp +2 -2
- data/src/Find.cpp +2 -2
- data/src/FrameFocus.cpp +3 -3
- data/src/GetCookies.cpp +1 -1
- data/src/GetTimeout.cpp +1 -1
- data/src/GetWindowHandle.cpp +1 -1
- data/src/GetWindowHandles.cpp +6 -5
- data/src/Header.cpp +2 -2
- data/src/Headers.cpp +1 -1
- data/src/IgnoreSslErrors.cpp +1 -1
- data/src/JavascriptAlertMessages.cpp +4 -1
- data/src/JavascriptConfirmMessages.cpp +4 -1
- data/src/JavascriptPromptMessages.cpp +4 -1
- data/src/JsonSerializer.cpp +116 -0
- data/src/JsonSerializer.h +20 -0
- data/src/NetworkAccessManager.cpp +58 -17
- data/src/NetworkAccessManager.h +6 -0
- data/src/NoOpReply.cpp +32 -0
- data/src/NoOpReply.h +18 -0
- data/src/Node.cpp +1 -1
- data/src/NullCommand.cpp +1 -1
- data/src/PageLoadingCommand.cpp +5 -4
- data/src/Render.cpp +1 -1
- data/src/Reset.cpp +1 -1
- data/src/ResizeWindow.cpp +1 -1
- data/src/Response.cpp +3 -3
- data/src/Response.h +13 -4
- data/src/SetConfirmAction.cpp +1 -1
- data/src/SetCookie.cpp +1 -1
- data/src/SetPromptAction.cpp +1 -1
- data/src/SetPromptText.cpp +1 -1
- data/src/SetProxy.cpp +2 -2
- data/src/SetSkipImageLoading.cpp +1 -1
- data/src/SetTimeout.cpp +2 -2
- data/src/SetUrlBlacklist.cpp +15 -0
- data/src/SetUrlBlacklist.h +11 -0
- data/src/Status.cpp +1 -1
- data/src/TimeoutCommand.cpp +6 -6
- data/src/TimeoutCommand.h +0 -3
- data/src/UnsupportedContentHandler.cpp +1 -4
- data/src/Visit.cpp +1 -1
- data/src/WebPage.cpp +41 -31
- data/src/WebPage.h +14 -12
- data/src/WebPageManager.cpp +13 -8
- data/src/WebPageManager.h +3 -2
- data/src/WindowFocus.cpp +2 -2
- data/src/body.cpp +7 -2
- data/src/capybara.js +10 -2
- data/src/find_command.h +1 -3
- data/src/webkit_server.pro +7 -7
- metadata +47 -82
- checksums.yaml +0 -7
- data/spec/integration/driver_spec.rb +0 -21
- data/src/RequestedUrl.cpp +0 -13
- data/src/RequestedUrl.h +0 -10
- data/src/Source.cpp +0 -19
- data/src/Source.h +0 -18
- data/src/Url.cpp +0 -13
- data/src/Url.h +0 -10
checksums.yaml
DELETED
@@ -1,7 +0,0 @@
|
|
1
|
-
---
|
2
|
-
SHA1:
|
3
|
-
metadata.gz: f29fa35e8dfe96d7612ec5dba3b5dfc72c6116d7
|
4
|
-
data.tar.gz: c81ef853e098741a275e5f3162d08686d7c299f2
|
5
|
-
SHA512:
|
6
|
-
metadata.gz: 889ae13be3485d1916ab5a43a517603a1681dc8cf04bf29bfff172342bcf109b96825e4927906b868547fcedfc212df06f4b7b7b3e07132a1cc51a40a451845d
|
7
|
-
data.tar.gz: d924b65aba22b6f83113e55879d16e9dac88a05a4d7cc81b82dab5e6a3029b0c79714ff6b30c04beb8c5b33490b2b363891a0bde19de5ef84d2550cd360fdc38
|
@@ -1,21 +0,0 @@
|
|
1
|
-
require 'spec_helper'
|
2
|
-
require 'capybara/webkit/driver'
|
3
|
-
|
4
|
-
describe Capybara::Webkit::Driver do
|
5
|
-
before do
|
6
|
-
@driver = Capybara::Webkit::Driver.new(TestApp, :browser => $webkit_browser)
|
7
|
-
end
|
8
|
-
|
9
|
-
it_should_behave_like "driver"
|
10
|
-
it_should_behave_like "driver with javascript support"
|
11
|
-
it_should_behave_like "driver with cookies support"
|
12
|
-
it_should_behave_like "driver with header support"
|
13
|
-
it_should_behave_like "driver with status code support"
|
14
|
-
it_should_behave_like "driver with frame support"
|
15
|
-
it_should_behave_like "driver with support for window switching"
|
16
|
-
|
17
|
-
it "returns the rack server port" do
|
18
|
-
@driver.server_port.should eq(@driver.instance_variable_get(:@rack_server).port)
|
19
|
-
end
|
20
|
-
|
21
|
-
end
|
data/src/RequestedUrl.cpp
DELETED
@@ -1,13 +0,0 @@
|
|
1
|
-
#include "RequestedUrl.h"
|
2
|
-
#include "WebPage.h"
|
3
|
-
#include "WebPageManager.h"
|
4
|
-
|
5
|
-
RequestedUrl::RequestedUrl(WebPageManager *manager, QStringList &arguments, QObject *parent) : SocketCommand(manager, arguments, parent) {
|
6
|
-
}
|
7
|
-
|
8
|
-
void RequestedUrl::start() {
|
9
|
-
QUrl humanUrl = page()->currentFrame()->requestedUrl();
|
10
|
-
QByteArray encodedBytes = humanUrl.toEncoded();
|
11
|
-
emit finished(new Response(true, encodedBytes));
|
12
|
-
}
|
13
|
-
|
data/src/RequestedUrl.h
DELETED
data/src/Source.cpp
DELETED
@@ -1,19 +0,0 @@
|
|
1
|
-
#include "Source.h"
|
2
|
-
#include "WebPage.h"
|
3
|
-
#include "WebPageManager.h"
|
4
|
-
|
5
|
-
Source::Source(WebPageManager *manager, QStringList &arguments, QObject *parent) : SocketCommand(manager, arguments, parent) {
|
6
|
-
}
|
7
|
-
|
8
|
-
void Source::start() {
|
9
|
-
QNetworkAccessManager* accessManager = page()->networkAccessManager();
|
10
|
-
QNetworkRequest request(page()->currentFrame()->requestedUrl());
|
11
|
-
reply = accessManager->get(request);
|
12
|
-
|
13
|
-
connect(reply, SIGNAL(finished()), this, SLOT(sourceLoaded()));
|
14
|
-
}
|
15
|
-
|
16
|
-
void Source::sourceLoaded() {
|
17
|
-
emit finished(new Response(true, reply->readAll()));
|
18
|
-
}
|
19
|
-
|
data/src/Source.h
DELETED
@@ -1,18 +0,0 @@
|
|
1
|
-
#include "SocketCommand.h"
|
2
|
-
|
3
|
-
class QNetworkReply;
|
4
|
-
|
5
|
-
class Source : public SocketCommand {
|
6
|
-
Q_OBJECT
|
7
|
-
|
8
|
-
public:
|
9
|
-
Source(WebPageManager *, QStringList &arguments, QObject *parent = 0);
|
10
|
-
virtual void start();
|
11
|
-
|
12
|
-
public slots:
|
13
|
-
void sourceLoaded();
|
14
|
-
|
15
|
-
private:
|
16
|
-
QNetworkReply *reply;
|
17
|
-
};
|
18
|
-
|
data/src/Url.cpp
DELETED
@@ -1,13 +0,0 @@
|
|
1
|
-
#include "Url.h"
|
2
|
-
#include "WebPage.h"
|
3
|
-
#include "WebPageManager.h"
|
4
|
-
|
5
|
-
Url::Url(WebPageManager *manager, QStringList &arguments, QObject *parent) : SocketCommand(manager, arguments, parent) {
|
6
|
-
}
|
7
|
-
|
8
|
-
void Url::start() {
|
9
|
-
QUrl humanUrl = page()->currentFrame()->url();
|
10
|
-
QByteArray encodedBytes = humanUrl.toEncoded();
|
11
|
-
emit finished(new Response(true, encodedBytes));
|
12
|
-
}
|
13
|
-
|