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

Unified Diff: LayoutTests/imported/web-platform-tests/html/semantics/embedded-content/the-img-element/current-pixel-density/error.html

Issue 1144143009: W3C Test: Import web-platform-tests/html/semantics (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 6 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: LayoutTests/imported/web-platform-tests/html/semantics/embedded-content/the-img-element/current-pixel-density/error.html
diff --git a/LayoutTests/imported/web-platform-tests/html/semantics/embedded-content/the-img-element/current-pixel-density/error.html b/LayoutTests/imported/web-platform-tests/html/semantics/embedded-content/the-img-element/current-pixel-density/error.html
new file mode 100644
index 0000000000000000000000000000000000000000..7bdd4ceca8586712cef42efc371537c7a0b78281
--- /dev/null
+++ b/LayoutTests/imported/web-platform-tests/html/semantics/embedded-content/the-img-element/current-pixel-density/error.html
@@ -0,0 +1,30 @@
+<!doctype html>
+<title>img current pixel density error</title>
+<script src="../../../../../../../resources/testharness.js"></script>
+<script src="../../../../../../../resources/testharnessreport.js"></script>
+<div id=log></div>
+<img id=ref src="404" alt="testing">
+<img srcset="404" alt="testing">
+<img srcset="404 0.5x" alt="testing">
+<img srcset="404 2x" alt="testing">
+<img srcset="404 100w" alt="testing">
+<img srcset="404 100w" sizes="500px" alt="testing">
+<picture><img src="404 100w" sizes="500px" alt="testing"></picture>
+<script>
+setup({explicit_done:true});
+onload = function() {
+ var expected_width = ref.width;
+ var expected_height = ref.height;
+ [].forEach.call(document.images, function(img) {
+ test(function() {
+ assert_not_equals(expected_width, 0, 'expected_width');
+ assert_not_equals(expected_height, 0, 'expected_height');
+ assert_equals(img.width, expected_width, 'width');
+ assert_equals(img.height, expected_height, 'height');
+ assert_equals(img.naturalWidth, 0, 'naturalWidth');
+ assert_equals(img.naturalHeight, 0, 'naturalHeight');
+ }, img.outerHTML);
+ });
+ done();
+};
+</script>

Powered by Google App Engine
This is Rietveld 408576698