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

Unified Diff: third_party/WebKit/LayoutTests/http/tests/subresource_filter/image-disallowed.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
Index: third_party/WebKit/LayoutTests/http/tests/subresource_filter/image-disallowed.html
diff --git a/third_party/WebKit/LayoutTests/http/tests/subresource_filter/image-disallowed.html b/third_party/WebKit/LayoutTests/http/tests/subresource_filter/image-disallowed.html
index 34bcfcb9c03184e8387effcd9857d1dabaaf0250..25460c8ffebb9944811e5cbd2f5061ccd0a33984 100644
--- a/third_party/WebKit/LayoutTests/http/tests/subresource_filter/image-disallowed.html
+++ b/third_party/WebKit/LayoutTests/http/tests/subresource_filter/image-disallowed.html
@@ -16,6 +16,8 @@ async_test(t => {
i.onload = t.step_func_done(_ => {
assert_equals(i.clientWidth, 100, "Images that are not disallowed should be displayed at their natural width.");
assert_equals(i.clientHeight, 100, "Images that are not disallowed should be displayed at their natural height.");
+ let style = window.getComputedStyle(i);
+ assert_equals(style.display, "inline", "Images that are not disallowed should be display:inline");
});
i.onerror = t.unreached_func();
i.src = "resources/alpha.png";
@@ -30,6 +32,8 @@ async_test(t => {
assert_equals(i.clientHeight, 0, "Images that are disallowed should be collapsed.");
assert_equals(i.naturalWidth, 0, "Images that are disallowed should not be loaded.");
assert_equals(i.naturalHeight, 0, "Images that are disallowed should not be loaded.");
+ let style = window.getComputedStyle(i);
+ assert_equals(style.display, "none", "Images that are disallowed should be set to display:none");
});
i.src = "resources/beta.png";
document.body.append(i);

Powered by Google App Engine
This is Rietveld 408576698