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

Unified Diff: third_party/WebKit/LayoutTests/http/tests/subresource_filter/image-allow-disallow-transitions.html

Issue 2627953003: Make `getComputedStyle` return the correct style for collapsed <img> elements. (Closed)
Patch Set: Rebase. Created 3 years, 10 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/http/tests/subresource_filter/image-disallowed.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/http/tests/subresource_filter/image-allow-disallow-transitions.html
diff --git a/third_party/WebKit/LayoutTests/http/tests/subresource_filter/image-allow-disallow-transitions.html b/third_party/WebKit/LayoutTests/http/tests/subresource_filter/image-allow-disallow-transitions.html
index 168c1e9e318cf6ee4a0dfaf3aaafa60c039ce1ec..46d26cf8274ccad341b05a4e647737f74eb06649 100644
--- a/third_party/WebKit/LayoutTests/http/tests/subresource_filter/image-allow-disallow-transitions.html
+++ b/third_party/WebKit/LayoutTests/http/tests/subresource_filter/image-allow-disallow-transitions.html
@@ -37,6 +37,12 @@ var EXPECTED_WIDTH = {
"collapsed": 0
};
+var EXPECTED_DISPLAY = {
+ "primary": "inline",
+ "fallback": "inline",
+ "collapsed": "none",
+};
+
var numPendingImages =
Object.keys(INITIAL_URLS).length * Object.keys(FINAL_URLS).length;
@@ -68,8 +74,11 @@ for (let [initialState, initialUrl] of Object.entries(INITIAL_URLS)) {
.then(t.step_func_done(_ => {
assert_equals(img.clientWidth, EXPECTED_WIDTH[finalState],
"Image has incorrect width for the expected final state.");
+ let style = window.getComputedStyle(img);
+ assert_equals(style.display, EXPECTED_DISPLAY[finalState],
+ "Images has incorrect computed style for the final state.");
}));
- }, "State transition " + initialState + " to " + finalState);
+ }, "State transition " + initialState + " to " + finalState + ". ");
cell.append(img);
}
}
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/http/tests/subresource_filter/image-disallowed.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698