mirror of
https://github.com/thoughtbot/capybara-webkit
synced 2023-03-27 23:22:28 -04:00
Merge pull request #1035 from twalpole/font_fix
Only override font in Qt versions where it's needed
This commit is contained in:
commit
c92a2347c6
2 changed files with 7 additions and 1 deletions
|
@ -2069,14 +2069,17 @@ describe Capybara::Webkit::Driver do
|
|||
end
|
||||
|
||||
it "ignores custom fonts" do
|
||||
skip "font replacement not needed for QT >= 5" unless driver.version =~ /Qt: 4/
|
||||
expect(font_family).to eq "Arial"
|
||||
end
|
||||
|
||||
it "ignores custom fonts before an element" do
|
||||
skip "font replacement not needed for QT >= 5" unless driver.version =~ /Qt: 4/
|
||||
expect(font_family).to eq "Arial"
|
||||
end
|
||||
|
||||
it "ignores custom fonts after an element" do
|
||||
skip "font replacement not needed for QT >= 5" unless driver.version =~ /Qt: 4/
|
||||
expect(font_family).to eq "Arial"
|
||||
end
|
||||
end
|
||||
|
|
|
@ -25,7 +25,10 @@ WebPage::WebPage(WebPageManager *manager, QObject *parent) : QWebPage(parent) {
|
|||
|
||||
setForwardUnsupportedContent(true);
|
||||
loadJavascript();
|
||||
setUserStylesheet();
|
||||
|
||||
#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0)
|
||||
setUserStylesheet();
|
||||
#endif
|
||||
|
||||
this->setCustomNetworkAccessManager();
|
||||
|
||||
|
|
Loading…
Reference in a new issue