Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(83)

Unified Diff: third_party/WebKit/LayoutTests/typedcssom/computedstyle/custom-properties.html

Issue 2877933002: [Typed CSSOM] Add test for relative URLs with custom image properties
Patch Set: Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/typedcssom/computedstyle/custom-properties-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/typedcssom/computedstyle/custom-properties.html
diff --git a/third_party/WebKit/LayoutTests/typedcssom/computedstyle/custom-properties.html b/third_party/WebKit/LayoutTests/typedcssom/computedstyle/custom-properties.html
index a423ca47d4f047694bc02da04c1143e332f77efa..11bf78bc885635dd9a9775aaba90917711308bae 100644
--- a/third_party/WebKit/LayoutTests/typedcssom/computedstyle/custom-properties.html
+++ b/third_party/WebKit/LayoutTests/typedcssom/computedstyle/custom-properties.html
@@ -108,6 +108,24 @@ function t2Callback() {
t2.done();
}
+var t3 = async_test('Getting a relative URL image type registered property returns a CSSURLImageValue');
+function t3Callback() {
+ t3.step(function() {
+ testElement.style = '--my-image: url(\"resources/1x1-green.png\");';
+ assert_true(computedStyleMap.has('--my-image'));
+ var result = computedStyleMap.get('--my-image');
+ assert_true(result instanceof CSSURLImageValue);
+ assert_equals(result.cssText, 'url(\"' + imagePath + '\")');
+ // FIXME: This section of this test fails. It seems to be a bug in custom properties. See
+ // crbug.com/719838
+ assert_equals(result.state, 'loaded');
+ assert_equals(result.intrinsicWidth, 1);
+ assert_equals(result.intrinsicHeight, 1);
+ assert_equals(result.intrinsicRatio, 1);
+ });
+ t3.done();
+}
+
test(function() {
assert_true(childComputedStyleMap.has('--my-inherited-length'));
var result = childComputedStyleMap.get('--my-inherited-length');
@@ -154,6 +172,7 @@ document.onreadystatechange = function() {
if(document.readyState == 'complete') {
t1Callback();
t2Callback();
+ t3Callback();
}
};
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/typedcssom/computedstyle/custom-properties-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698