Index: LayoutTests/fast/exclusions/script-tests/parsing-wrap-shape-inside.js |
diff --git a/LayoutTests/fast/exclusions/script-tests/parsing-wrap-shape-inside.js b/LayoutTests/fast/exclusions/script-tests/parsing-wrap-shape-inside.js |
index 88dd5ceb1ecae0d2cd1970e3df5d6bd1d9ca8861..540badd4d295b52c24820459072f9d0d5d349e77 100644 |
--- a/LayoutTests/fast/exclusions/script-tests/parsing-wrap-shape-inside.js |
+++ b/LayoutTests/fast/exclusions/script-tests/parsing-wrap-shape-inside.js |
@@ -49,6 +49,20 @@ function test(value, expected) { |
shouldBeEqualToString('testComputedStyle(' + unevaledString + ')', expected); |
} |
+// Need to remove the base URL to avoid having local paths in the expected results. |
+function removeBaseURL(src) { |
+ var urlRegexp = /url\(([^\)]*)\)/g; |
+ return src.replace(urlRegexp, function(match, url) { |
+ return "url(" + url.substr(url.lastIndexOf("/") + 1) + ")"; |
+ }); |
+} |
+ |
+function testLocalURL(value, expected) { |
+ var unevaledString = '"' + value.replace(/\\/g, "\\\\").replace(/"/g, "\"").replace(/\n/g, "\\n").replace(/\r/g, "\\r") + '"'; |
+ shouldBeEqualToString('removeBaseURL(testCSSText(' + unevaledString + '))', expected); |
+ shouldBeEqualToString('removeBaseURL(testComputedStyle(' + unevaledString + '))', expected); |
+} |
+ |
function negative_test(value) { |
var unevaledString = '"' + value.replace(/\\/g, "\\\\").replace(/"/g, "\"").replace(/\n/g, "\\n").replace(/\r/g, "\\r") + '"'; |
shouldBeEqualToString('testCSSText(' + unevaledString + ')', ''); |
@@ -71,6 +85,8 @@ test("polygon(10px 20px, 30px 40px, 40px 50px)", "polygon(nonzero, 10px 20px, 30 |
test("polygon(evenodd, 10px 20px, 30px 40px, 40px 50px)", "polygon(evenodd, 10px 20px, 30px 40px, 40px 50px)"); |
test("polygon(nonzero, 10px 20px, 30px 40px, 40px 50px)", "polygon(nonzero, 10px 20px, 30px 40px, 40px 50px)"); |
+testLocalURL("url(\'image\')", "url(image)"); |
+ |
shouldBeEqualToString('testNotInherited("auto", "rectangle(10px, 20px, 30px, 40px)")', "parent: auto, child: rectangle(10px, 20px, 30px, 40px)"); |
shouldBeEqualToString('testNotInherited("outside-shape", "rectangle(10px, 20px, 30px, 40px)")', "parent: outside-shape, child: rectangle(10px, 20px, 30px, 40px)"); |
shouldBeEqualToString('testNotInherited("rectangle(10px, 20px, 30px, 40px)", "initial")', "parent: rectangle(10px, 20px, 30px, 40px), child: outside-shape"); |