capybara-webkit 0.13.2 → 0.14.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (91) hide show
  1. data/.travis.yml +10 -0
  2. data/Gemfile.lock +20 -18
  3. data/NEWS.md +20 -1
  4. data/README.md +12 -10
  5. data/capybara-webkit.gemspec +3 -2
  6. data/lib/capybara/webkit/browser.rb +10 -19
  7. data/lib/capybara/webkit/connection.rb +13 -34
  8. data/lib/capybara/webkit/driver.rb +5 -22
  9. data/lib/capybara/webkit/node.rb +10 -2
  10. data/lib/capybara/webkit/version.rb +1 -1
  11. data/lib/capybara_webkit_builder.rb +10 -1
  12. data/spec/browser_spec.rb +1 -1
  13. data/spec/connection_spec.rb +4 -2
  14. data/spec/driver_rendering_spec.rb +2 -2
  15. data/spec/driver_resize_window_spec.rb +29 -40
  16. data/spec/driver_spec.rb +368 -125
  17. data/spec/integration/session_spec.rb +100 -6
  18. data/spec/spec_helper.rb +6 -9
  19. data/spec/support/app_runner.rb +2 -12
  20. data/src/Authenticate.cpp +2 -2
  21. data/src/ClearCookies.cpp +1 -1
  22. data/src/ClearPromptText.cpp +1 -1
  23. data/src/Command.cpp +13 -0
  24. data/src/Command.h +6 -0
  25. data/src/CommandFactory.cpp +1 -3
  26. data/src/Connection.cpp +4 -3
  27. data/src/ConsoleMessages.cpp +4 -1
  28. data/src/CurrentUrl.cpp +1 -16
  29. data/src/CurrentUrl.h +0 -6
  30. data/src/EnableLogging.cpp +1 -1
  31. data/src/Evaluate.cpp +3 -74
  32. data/src/Evaluate.h +0 -8
  33. data/src/Execute.cpp +2 -2
  34. data/src/Find.cpp +2 -2
  35. data/src/FrameFocus.cpp +3 -3
  36. data/src/GetCookies.cpp +1 -1
  37. data/src/GetTimeout.cpp +1 -1
  38. data/src/GetWindowHandle.cpp +1 -1
  39. data/src/GetWindowHandles.cpp +6 -5
  40. data/src/Header.cpp +2 -2
  41. data/src/Headers.cpp +1 -1
  42. data/src/IgnoreSslErrors.cpp +1 -1
  43. data/src/JavascriptAlertMessages.cpp +4 -1
  44. data/src/JavascriptConfirmMessages.cpp +4 -1
  45. data/src/JavascriptPromptMessages.cpp +4 -1
  46. data/src/JsonSerializer.cpp +116 -0
  47. data/src/JsonSerializer.h +20 -0
  48. data/src/NetworkAccessManager.cpp +58 -17
  49. data/src/NetworkAccessManager.h +6 -0
  50. data/src/NoOpReply.cpp +32 -0
  51. data/src/NoOpReply.h +18 -0
  52. data/src/Node.cpp +1 -1
  53. data/src/NullCommand.cpp +1 -1
  54. data/src/PageLoadingCommand.cpp +5 -4
  55. data/src/Render.cpp +1 -1
  56. data/src/Reset.cpp +1 -1
  57. data/src/ResizeWindow.cpp +1 -1
  58. data/src/Response.cpp +3 -3
  59. data/src/Response.h +13 -4
  60. data/src/SetConfirmAction.cpp +1 -1
  61. data/src/SetCookie.cpp +1 -1
  62. data/src/SetPromptAction.cpp +1 -1
  63. data/src/SetPromptText.cpp +1 -1
  64. data/src/SetProxy.cpp +2 -2
  65. data/src/SetSkipImageLoading.cpp +1 -1
  66. data/src/SetTimeout.cpp +2 -2
  67. data/src/SetUrlBlacklist.cpp +15 -0
  68. data/src/SetUrlBlacklist.h +11 -0
  69. data/src/Status.cpp +1 -1
  70. data/src/TimeoutCommand.cpp +6 -6
  71. data/src/TimeoutCommand.h +0 -3
  72. data/src/UnsupportedContentHandler.cpp +1 -4
  73. data/src/Visit.cpp +1 -1
  74. data/src/WebPage.cpp +41 -31
  75. data/src/WebPage.h +14 -12
  76. data/src/WebPageManager.cpp +13 -8
  77. data/src/WebPageManager.h +3 -2
  78. data/src/WindowFocus.cpp +2 -2
  79. data/src/body.cpp +7 -2
  80. data/src/capybara.js +10 -2
  81. data/src/find_command.h +1 -3
  82. data/src/webkit_server.pro +7 -7
  83. metadata +47 -82
  84. checksums.yaml +0 -7
  85. data/spec/integration/driver_spec.rb +0 -21
  86. data/src/RequestedUrl.cpp +0 -13
  87. data/src/RequestedUrl.h +0 -10
  88. data/src/Source.cpp +0 -19
  89. data/src/Source.h +0 -18
  90. data/src/Url.cpp +0 -13
  91. 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
@@ -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
-
@@ -1,10 +0,0 @@
1
- #include "SocketCommand.h"
2
-
3
- class RequestedUrl : public SocketCommand {
4
- Q_OBJECT
5
-
6
- public:
7
- RequestedUrl(WebPageManager *, QStringList &arguments, QObject *parent = 0);
8
- virtual void start();
9
- };
10
-
@@ -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
-
@@ -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
-
@@ -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
-
data/src/Url.h DELETED
@@ -1,10 +0,0 @@
1
- #include "SocketCommand.h"
2
-
3
- class Url : public SocketCommand {
4
- Q_OBJECT
5
-
6
- public:
7
- Url(WebPageManager *, QStringList &arguments, QObject *parent = 0);
8
- virtual void start();
9
- };
10
-