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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/images/img-dimensions-styled.html

Issue 2255433002: Use testharness.js instead of js-test.js in fast/images. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Changed test as per the comments. Created 4 years, 4 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 unified diff | Download patch
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 2 <title>HTMLImageElement.width/height returns styled dimensions.</title>
3 <script src="../../resources/js-test.js"></script> 3 <script src="../../resources/testharness.js"></script>
4 4 <script src="../../resources/testharnessreport.js"></script>
5 <style> 5 <style>
6 img { 6 img {
7 width: 200px; 7 width: 200px;
8 height: 200px; 8 height: 200px;
9 } 9 }
10 </style> 10 </style>
11 11 <img src="resources/test-load.jpg" width="100" height="100">
12 <img id="image" src="resources/test-load.jpg" width="100" height="100">
13
14 <script> 12 <script>
15 description("Should used styled image dimensions if available."); 13 test(function() {
16 var image = document.getElementById("image"); 14 var image = document.querySelector("img");
17 shouldBe("image.width", "200"); 15 assert_equals(image.width, 200);
18 shouldBe("image.height", "200"); 16 assert_equals(image.height, 200);
19 var rect = image.getBoundingClientRect(); 17 var rect = image.getBoundingClientRect();
20 shouldBe("rect.width", "200"); 18 assert_equals(rect.width, 200);
21 shouldBe("rect.height", "200"); 19 assert_equals(rect.height, 200);
20 });
22 </script> 21 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698