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

Side by Side Diff: LayoutTests/cssom/cssom-view-img-attributes-001.html

Issue 372233002: Style and layout should be done before getting value for x() and y() (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 5 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
« no previous file with comments | « no previous file | LayoutTests/cssom/cssom-view-img-attributes-001-expected.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <html>
3 <head>
esprehn 2014/07/11 03:45:57 We usually leave off the html and head. In general
je_julie(Not used) 2014/07/11 04:04:55 If possible, I'd like to keep author signature bec
4 <title>CSSOM-View: HTMLImageElement x and y attributes</title>
5 <link rel="author" title="Adobe" href="http://html.adobe.com/">
6 <link rel="author" title="Alan Stearns" href="mailto:stearns@adobe.com">
7 <link rel="reviewer" title="" href="">
8 <link rel="help" href="http://dev.w3.org/csswg/cssom-view/#excensions-to -the-htmlimageelement-interface">
9 <meta name="assert" content="HTMLImageElement attributes give x and y po sition of CSS layout box">
10 <meta name="flags" content="dom">
11 <script src="../resources/testharness.js"></script>
12 <script src="../resources/testharnessreport.js"></script>
13 </head>
14 <body>
15 <div id="log"></div>
16 <script type="text/javascript">
17
18 function testIMGAttributes(attribute_name, display_none) {
19 var element = document.createElement("img");
20 document.body.appendChild(element);
21 element.style.setProperty("position", "absolute");
22 element.style.setProperty("left", "10px");
23 element.style.setProperty("top", "10px");
24 element.style.setProperty("width", "10px");
25 element.style.setProperty("height", "10px");
26 if (display_none) {
27 element.style.setProperty("display", "none");
28 }
29 var attributeValue = element[attribute_name];
30 document.body.removeChild(element);
31 return attributeValue;
32 }
33
34 var imgAttributes = [
35 ["x", false, 10],
36 ["y", false, 10],
37 ["x", true, 0],
38 ["y", true, 0],
39 ];
40
41 imgAttributes.forEach(function(test_data) {
42 test (function() { assert_equals(testIMGAttributes(test_data[0], tes t_data[1]), test_data[2])},
43 "test " + test_data[0] + " with display " + test_data[1])
44 }
45 );
46 </script>
47 </body>
48 </html>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/cssom/cssom-view-img-attributes-001-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698