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

Side by Side Diff: LayoutTests/imported/web-platform-tests/html/semantics/embedded-content/the-object-element/object-attributes.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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <meta charset="utf-8">
3 <title>HTML Test: object - attributes</title>
4 <link rel="author" title="Intel" href="http://www.intel.com">
5 <script src="../../../../../../resources/testharness.js"></script>
6 <script src="../../../../../../resources/testharnessreport.js"></script>
7 <body onload="on_load()">
8 <div id="log"></div>
9 <form>
10 <object id="obj1" data="blue.html" name="o" height="50" width="100"></object>
11 <object id="obj2" name="p" type="image/png"></object>
12 </form>
13 <script>
14 var obj1;
15 var obj2;
16 var t1 = async_test("object.contentWindow");
17 var t3 = async_test("object.width");
18 var t4 = async_test("object.height");
19
20 setup(function() {
21 obj1 = document.getElementById("obj1");
22 obj2 = document.getElementById("obj2");
23 });
24
25 function on_load () {
26 t1.step(function() {
27 assert_equals(obj1.contentWindow.name, "o", "The contentWindow's name of t he object element should be 'o'.");
28 assert_equals(obj2.contentWindow, null, "The contentWindow of the object e lement should be null when it type attribute starts with 'image/'.");
29 obj1.setAttribute("name", "o1");
30 assert_equals(obj1.name, "o1", "The name of the object element should be ' o1'.");
31 assert_equals(obj1.contentWindow.name, "o1", "The contentWindow's name of the object element should be 'o1'.");
32 obj1.removeAttribute("name");
33 assert_equals(obj1.name, "", "The name of the object element should be emp ty string.");
34 assert_equals(obj1.contentWindow.name, "", "The contentWindow's name of th e object element should be empty string.");
35 });
36 t1.done()
37
38 t3.step(function() {
39 assert_equals(getComputedStyle(obj1, null)["width"], "100px", "The width s hould be 100px.");
40 });
41 t3.done();
42
43 t4.step(function() {
44 assert_equals(getComputedStyle(obj1, null)["height"], "50px", "The height should be 50px.");
45 });
46 t4.done();
47 }
48 </script>
49
50 </body>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698