Skip to content
This repository has been archived by the owner on Mar 3, 2020. It is now read-only.

Commit

Permalink
Set viewport size so overflow hidden doesn't always hide content
Browse files Browse the repository at this point in the history
  • Loading branch information
halogenandtoast committed Oct 21, 2011
1 parent 714d880 commit 8d2251d
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 3 deletions.
32 changes: 29 additions & 3 deletions spec/driver_spec.rb
Expand Up @@ -20,7 +20,7 @@
p_id = "greeting"
msg = "hello"
iframe = "<iframe id=\"f\" src=\"/?iframe=true\"></iframe>"
end
end
body = <<-HTML
<html>
<head>
Expand Down Expand Up @@ -842,7 +842,7 @@ def wait_for_error_to_complete
[body]]
end
end

it "raises a webkit error for the requested url" do
make_the_server_go_away
expect {
Expand All @@ -857,7 +857,7 @@ def make_the_server_come_back
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)
Expand Down Expand Up @@ -1022,6 +1022,32 @@ def set_automatic_reload(value)
end
end

context "css overflow app" do
before(:all) do
@app = lambda do |env|
body = <<-HTML
<html>
<head>
<style type="text/css">
#overflow { overflow: hidden }
</style>
</head>
<body>
<div id="overflow">Overflow</div>
</body>
</html>
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|
Expand Down
1 change: 1 addition & 0 deletions src/WebPage.cpp
Expand Up @@ -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() {
Expand Down

0 comments on commit 8d2251d

Please sign in to comment.