Skip to content

Commit 3e6cdb7

Browse files
committed
WebKit seems to have done better in newest version. Enable all the tests there
1 parent 064b987 commit 3e6cdb7

File tree

4 files changed

+11
-18
lines changed

4 files changed

+11
-18
lines changed

test/.jshintrc

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,10 @@
1616

1717
"require": true,
1818

19-
"ifNotInWebkitIt": true,
2019
"ifNotInWebkitOrBlinkIt": true,
21-
"ifInPhantomJsIt": true,
2220
"ifNotInPhantomJsIt": true,
2321
"ifNotInPhantomJSAndNotLocalRunnerIt": true,
24-
"ifNotInWebKitAndNotLocalRunnerIt": true,
22+
"ifNotLocalRunnerIt": true,
2523
"testHelper": true,
2624
"diffHelper": true,
2725

test/helpers.js

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
(function () {
22
"use strict";
33

4-
var isWebkit = navigator.userAgent.indexOf("WebKit") >= 0 &&
5-
navigator.userAgent.indexOf("Chrome") < 0,
6-
isWebkitOrBlink = navigator.userAgent.indexOf("WebKit") >= 0,
4+
var isWebkitOrBlink = navigator.userAgent.indexOf("WebKit") >= 0,
75
isPhantomJs = navigator.userAgent.indexOf("PhantomJS") >= 0,
86
isLocalRunner = document.baseURI.substr(0, 'file://'.length) === 'file://',
97
testDisabledOnCondition = function (condition, text, functionHandle) {
@@ -13,9 +11,6 @@
1311
}
1412
return spec;
1513
};
16-
window.ifNotInWebkitIt = function(text, functionHandle) {
17-
return testDisabledOnCondition(isWebkit, text, functionHandle);
18-
};
1914
window.ifNotInWebkitOrBlinkIt = function (text, functionHandle) {
2015
return testDisabledOnCondition(isWebkitOrBlink, text, functionHandle);
2116
};
@@ -28,7 +23,7 @@
2823
window.ifNotInPhantomJSAndNotLocalRunnerIt = function (text, functionHandle) {
2924
return testDisabledOnCondition(isPhantomJs || isLocalRunner, text, functionHandle);
3025
};
31-
window.ifNotInWebKitAndNotLocalRunnerIt = function (text, functionHandle) {
32-
return testDisabledOnCondition(isWebkit || isLocalRunner, text, functionHandle);
26+
window.ifNotLocalRunnerIt = function (text, functionHandle) {
27+
return testDisabledOnCondition(isLocalRunner, text, functionHandle);
3328
};
3429
}());

test/specs/IntegrationSpec.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ describe("Integration test", function () {
2828
callback = jasmine.createSpy("callback").and.callFake(function () { finished = true; });
2929
});
3030

31-
ifNotInWebkitIt("should take a document, inline all displayable content and render to the given canvas", function (done) {
31+
ifNotInPhantomJsIt("should take a document, inline all displayable content and render to the given canvas", function (done) {
3232
testHelper.readHTMLDocumentFixture("test.html").then(function (doc) {
3333
rasterizeHTML.drawDocument(doc, canvas, {
3434
cache: 'none',
@@ -51,7 +51,7 @@ describe("Integration test", function () {
5151
});
5252
});
5353

54-
ifNotInWebkitIt("should take a HTML string, inline all displayable content and render to the given canvas", function (done) {
54+
ifNotInPhantomJsIt("should take a HTML string, inline all displayable content and render to the given canvas", function (done) {
5555
testHelper.readHTMLFixture("test.html").then(function (html) {
5656
rasterizeHTML.drawHTML(html, canvas, {
5757
baseUrl: testHelper.fixturesPath,
@@ -73,7 +73,7 @@ describe("Integration test", function () {
7373
});
7474
});
7575

76-
ifNotInWebkitIt("should take a URL, inline all displayable content and render to the given canvas", function (done) {
76+
ifNotInPhantomJsIt("should take a URL, inline all displayable content and render to the given canvas", function (done) {
7777
rasterizeHTML.drawURL(testHelper.fixturesPath + "testScaled50PercentWithJs.html", canvas, {
7878
cache: 'none',
7979
executeJs: true,
@@ -95,7 +95,7 @@ describe("Integration test", function () {
9595
}).finally(done);
9696
});
9797

98-
ifNotInWebkitIt("should render a URL without canvas", function (done) {
98+
ifNotInPhantomJsIt("should render a URL without canvas", function (done) {
9999
rasterizeHTML.drawURL(testHelper.fixturesPath + "testScaled50PercentWithJs.html", {
100100
cache: 'none',
101101
width: width,
@@ -135,7 +135,7 @@ describe("Integration test", function () {
135135
}).finally(done);
136136
});
137137

138-
ifNotInWebKitAndNotLocalRunnerIt("should work around Firefox bug with `null` style properties", function (done) {
138+
ifNotLocalRunnerIt("should work around Firefox bug with `null` style properties", function (done) {
139139
// The bug only turns up when there's no JS executed which creates a new document
140140
// In addition this test will fail due to https://bugzilla.mozilla.org/show_bug.cgi?id=942138
141141
rasterizeHTML.drawURL(testHelper.fixturesPath + "test.html", {

test/specs/Svg2ImageSpec.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ describe("Svg to Image", function () {
1212
jasmine.addMatchers(imagediff.jasmine);
1313
});
1414

15-
ifNotInWebkitIt("should render the SVG", function (done) {
15+
ifNotInPhantomJsIt("should render the SVG", function (done) {
1616
var referenceImg = createElementFrom('<img src="' + testHelper.fixturesPath + 'rednblue.png" alt="test image"/>'),
1717
twoColorSvg = (
1818
'<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100">' +
@@ -45,7 +45,7 @@ describe("Svg to Image", function () {
4545
};
4646
});
4747

48-
ifNotInWebkitIt("should render an SVG with inline image", function (done) {
48+
ifNotInPhantomJsIt("should render an SVG with inline image", function (done) {
4949
var referenceImg = createElementFrom('<img src="' + testHelper.fixturesPath + 'rednblue.png" alt="test image"/>'),
5050
twoColorSvg = (
5151
'<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100">' +

0 commit comments

Comments
 (0)