diff --git a/spec/driver_spec.rb b/spec/driver_spec.rb index b0c18a9..505383c 100644 --- a/spec/driver_spec.rb +++ b/spec/driver_spec.rb @@ -20,7 +20,7 @@ describe Capybara::Driver::Webkit do p_id = "greeting" msg = "hello" iframe = "" - end + end body = <<-HTML @@ -842,7 +842,7 @@ describe Capybara::Driver::Webkit do [body]] end end - + it "raises a webkit error for the requested url" do make_the_server_go_away expect { @@ -857,7 +857,7 @@ describe Capybara::Driver::Webkit do subject.browser.instance_variable_get(:@socket).unstub!(:puts) subject.browser.instance_variable_get(:@socket).unstub!(:print) end - + def make_the_server_go_away subject.browser.instance_variable_get(:@socket).stub!(:gets).and_return(nil) subject.browser.instance_variable_get(:@socket).stub!(:puts) @@ -1022,6 +1022,32 @@ describe Capybara::Driver::Webkit do end end + context "css overflow app" do + before(:all) do + @app = lambda do |env| + body = <<-HTML + + + + + +
Overflow
+ + + HTML + [200, + { 'Content-Type' => 'text/html', 'Content-Length' => body.length.to_s }, + [body]] + end + end + + it "handles overflow hidden" do + subject.find("//div[@id='overflow']").first.text.should == "Overflow" + end + end + context "javascript redirect app" do before(:all) do @app = lambda do |env| diff --git a/src/WebPage.cpp b/src/WebPage.cpp index 0a410c1..3127afd 100644 --- a/src/WebPage.cpp +++ b/src/WebPage.cpp @@ -20,6 +20,7 @@ WebPage::WebPage(QObject *parent) : QWebPage(parent) { this, SLOT(frameCreated(QWebFrame *))); connect(this, SIGNAL(unsupportedContent(QNetworkReply*)), this, SLOT(handleUnsupportedContent(QNetworkReply*))); + this->setViewportSize(QSize(1680, 1050)); } void WebPage::setCustomNetworkAccessManager() {