Upstream version 7.36.149.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / LayoutTests / fast / forms / input-width-height-attributes.html
index 11bcd86..ea3e76a 100644 (file)
-<!DOCTYPE HTML>\r
-<html>\r
-<head>\r
-<script src="../../resources/js-test.js"></script>\r
-</head>\r
-<body>\r
-<script>\r
-description('width and height attributes of HTMLInputElement.');\r
-</script>\r
-\r
-<p id="description"></p>\r
-\r
-<div id="div1">\r
-    <input type="image" id="image1" src="resources/green.jpg" width="160" height="80px">\r
-</div>\r
-<br>\r
-\r
-<div id="div2">\r
-    <input type="image" id="image2" src="resources/green.jpg">\r
-</div>\r
-<br>\r
-\r
-<div id="div3">\r
-    <input type="image" id="image3" src="resources/green.jpg">\r
-</div>\r
-<br>\r
-\r
-<div id="div4">\r
-    <input type="image" id="image4" src="resources/green.jpg">\r
-</div>\r
-<br>\r
-\r
-<div id="div5">\r
-    <input type="text" id="text1">\r
-</div>\r
-<br>\r
-\r
-<div id="div6">\r
-    <input type="file" id="file1">\r
-</div>\r
-<br>\r
-\r
-<div id="div7">\r
-    <input type="date" id="date1">\r
-</div>\r
-<br>\r
-\r
-<div id="div8">\r
-    <input type="button" id="button1">\r
-</div>\r
-<br>\r
-\r
-<script>\r
-var div = document.getElementById("div1");\r
-var image1 = document.getElementById("image1");\r
-debug('Test case #1 : Image, HTML inline setting as \"160\", \"80\"');\r
-shouldBeTrue("('width' in image1)");\r
-shouldBeTrue("('height' in image1)");\r
-shouldBe('image1.width,image1.height', '160,80');\r
-\r
-div = document.getElementById("div2");\r
-var image2 = document.getElementById("image2");\r
-debug('Test case #2 : Image, Setting by JavaScript API as \"260\", \"130\"');\r
-shouldBeTrue("('width' in image1)");\r
-shouldBeTrue("('height' in image1)");\r
-image2.width = 260;\r
-image2.height = 130;\r
-shouldBe('image2.width,image2.height', '260,130');\r
-\r
-div = document.getElementById("div3");\r
-var image3 = document.getElementById("image3");\r
-debug('Test case #3 : Image, Setting by JavaScript API as \"120px\", \"60px\"');\r
-shouldBeTrue("('width' in image1)");\r
-shouldBeTrue("('height' in image1)");\r
-image3.width = "120px";\r
-image3.height = "60px";\r
-shouldBe('image3.width,image3.height', '0,0');\r
-\r
-div = document.getElementById("div4");\r
-var image4 = document.getElementById("image4");\r
-debug('Test case #4 : Image, Setting by JavaScript API as \"120.99\", \"60.55\"');\r
-shouldBeTrue("('width' in image1)");\r
-shouldBeTrue("('height' in image1)");\r
-image4.width = 120.99;\r
-image4.height = 60.99;\r
-shouldBe('image4.width,image4.height', '120,60');\r
-\r
-div = document.getElementById("div5");\r
-var text1 = document.getElementById("text1");\r
-debug('Test case #5 : Text, Setting by JavaScript API as \"100\", \"50\"');\r
-shouldBeTrue("('width' in text1)");\r
-shouldBeTrue("('height' in text1)");\r
-text1.width = 100;\r
-text1.height = 50;\r
-shouldBe('text1.width,text1.height', '0,0');\r
-\r
-text1.type = 'image';\r
-text1.src = "resources/green.jpg";\r
-shouldBe('text1.width,text1.height', '100,50');\r
-text1.width = 60;\r
-text1.height = 40;\r
-shouldBe('text1.width,text1.height', '60,40');\r
-\r
-div = document.getElementById("div6");\r
-var file1 = document.getElementById("file1");\r
-debug('Test case #6 : File, Setting by JavaScript API as \"100\", \"50\"');\r
-shouldBeTrue("('width' in file1)");\r
-shouldBeTrue("('height' in file1)");\r
-file1.width = 100;\r
-file1.height = 50;\r
-shouldBe('file1.width,file1.height', '0,0');\r
-\r
-file1.type = 'image';\r
-file1.src = "resources/green.jpg";\r
-shouldBe('file1.width,file1.height', '100,50');\r
-file1.width = 60;\r
-file1.height = 40;\r
-shouldBe('file1.width,file1.height', '60,40');\r
-\r
-div = document.getElementById("div7");\r
-var date1 = document.getElementById("date1");\r
-debug('Test case #7 : Date, Setting by JavaScript API as \"100\", \"50\"');\r
-shouldBeTrue("('width' in date1)");\r
-shouldBeTrue("('height' in date1)");\r
-date1.width = 100;\r
-date1.height = 50;\r
-shouldBe('date1.width,date1.height', '0,0');\r
-\r
-date1.type = 'image';\r
-date1.src = "resources/green.jpg";\r
-shouldBe('date1.width,date1.height', '100,50');\r
-date1.width = 60;\r
-date1.height = 40;\r
-shouldBe('date1.width,date1.height', '60,40');\r
-\r
-div = document.getElementById("div8");\r
-var button1 = document.getElementById("button1");\r
-debug('Test case #8 : Button, Setting by JavaScript API as \"100\", \"50\"');\r
-shouldBeTrue("('width' in button1)");\r
-shouldBeTrue("('height' in button1)");\r
-button1.width = 100;\r
-button1.height = 50;\r
-shouldBe('button1.width,button1.height', '0,0');\r
-\r
-button1.type = 'image';\r
-button1.src = "resources/green.jpg";\r
-shouldBe('button1.width,button1.height', '100,50');\r
-button1.width = 60;\r
-button1.height = 40;\r
-shouldBe('button1.width,button1.height', '60,40');\r
-\r
-var successfullyParsed = true;\r
-</script>\r
-</body>\r
-</html>\r
+<!DOCTYPE HTML>
+<html>
+<head>
+<script src="../../resources/js-test.js"></script>
+</head>
+<body>
+<script>
+description('width and height attributes of HTMLInputElement.');
+</script>
+
+<p id="description"></p>
+
+<div id="div1">
+    <input type="image" id="image1" src="resources/green.jpg" width="160" height="80px">
+</div>
+<br>
+
+<div id="div2">
+    <input type="image" id="image2" src="resources/green.jpg">
+</div>
+<br>
+
+<div id="div3">
+    <input type="image" id="image3" src="resources/green.jpg">
+</div>
+<br>
+
+<div id="div4">
+    <input type="image" id="image4" src="resources/green.jpg">
+</div>
+<br>
+
+<div id="div5">
+    <input type="text" id="text1">
+</div>
+<br>
+
+<div id="div6">
+    <input type="file" id="file1">
+</div>
+<br>
+
+<div id="div7">
+    <input type="date" id="date1">
+</div>
+<br>
+
+<div id="div8">
+    <input type="button" id="button1">
+</div>
+<br>
+
+<script>
+var div = document.getElementById("div1");
+var image1 = document.getElementById("image1");
+debug('Test case #1 : Image, HTML inline setting as \"160\", \"80\"');
+shouldBeTrue("('width' in image1)");
+shouldBeTrue("('height' in image1)");
+shouldBe('image1.width,image1.height', '160,80');
+
+div = document.getElementById("div2");
+var image2 = document.getElementById("image2");
+debug('Test case #2 : Image, Setting by JavaScript API as \"260\", \"130\"');
+shouldBeTrue("('width' in image1)");
+shouldBeTrue("('height' in image1)");
+image2.width = 260;
+image2.height = 130;
+shouldBe('image2.width,image2.height', '260,130');
+
+div = document.getElementById("div3");
+var image3 = document.getElementById("image3");
+debug('Test case #3 : Image, Setting by JavaScript API as \"120px\", \"60px\"');
+shouldBeTrue("('width' in image1)");
+shouldBeTrue("('height' in image1)");
+image3.width = "120px";
+image3.height = "60px";
+shouldBe('image3.width,image3.height', '0,0');
+
+div = document.getElementById("div4");
+var image4 = document.getElementById("image4");
+debug('Test case #4 : Image, Setting by JavaScript API as \"120.99\", \"60.55\"');
+shouldBeTrue("('width' in image1)");
+shouldBeTrue("('height' in image1)");
+image4.width = 120.99;
+image4.height = 60.99;
+shouldBe('image4.width,image4.height', '120,60');
+
+div = document.getElementById("div5");
+var text1 = document.getElementById("text1");
+debug('Test case #5 : Text, Setting by JavaScript API as \"100\", \"50\"');
+shouldBeTrue("('width' in text1)");
+shouldBeTrue("('height' in text1)");
+text1.width = 100;
+text1.height = 50;
+shouldBe('text1.width,text1.height', '0,0');
+
+text1.type = 'image';
+text1.src = "resources/green.jpg";
+shouldBe('text1.width,text1.height', '100,50');
+text1.width = 60;
+text1.height = 40;
+shouldBe('text1.width,text1.height', '60,40');
+
+div = document.getElementById("div6");
+var file1 = document.getElementById("file1");
+debug('Test case #6 : File, Setting by JavaScript API as \"100\", \"50\"');
+shouldBeTrue("('width' in file1)");
+shouldBeTrue("('height' in file1)");
+file1.width = 100;
+file1.height = 50;
+shouldBe('file1.width,file1.height', '0,0');
+
+file1.type = 'image';
+file1.src = "resources/green.jpg";
+shouldBe('file1.width,file1.height', '100,50');
+file1.width = 60;
+file1.height = 40;
+shouldBe('file1.width,file1.height', '60,40');
+
+div = document.getElementById("div7");
+var date1 = document.getElementById("date1");
+debug('Test case #7 : Date, Setting by JavaScript API as \"100\", \"50\"');
+shouldBeTrue("('width' in date1)");
+shouldBeTrue("('height' in date1)");
+date1.width = 100;
+date1.height = 50;
+shouldBe('date1.width,date1.height', '0,0');
+
+date1.type = 'image';
+date1.src = "resources/green.jpg";
+shouldBe('date1.width,date1.height', '100,50');
+date1.width = 60;
+date1.height = 40;
+shouldBe('date1.width,date1.height', '60,40');
+
+div = document.getElementById("div8");
+var button1 = document.getElementById("button1");
+debug('Test case #8 : Button, Setting by JavaScript API as \"100\", \"50\"');
+shouldBeTrue("('width' in button1)");
+shouldBeTrue("('height' in button1)");
+button1.width = 100;
+button1.height = 50;
+shouldBe('button1.width,button1.height', '0,0');
+
+button1.type = 'image';
+button1.src = "resources/green.jpg";
+shouldBe('button1.width,button1.height', '100,50');
+button1.width = 60;
+button1.height = 40;
+shouldBe('button1.width,button1.height', '60,40');
+
+var successfullyParsed = true;
+</script>
+</body>
+</html>