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

Side by Side Diff: LayoutTests/imported/web-platform-tests/html/semantics/embedded-content/the-object-element/object-fallback.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: display fallback content</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 <script>
8
9 var t1 = async_test("the typemustmatch attribute is specified");
10 var t2 = async_test("the typemustmatch attribute is not specified");
11
12 </script>
13 <body onload="t1.done(); t2.done()">
14 <object id="obj"></object>
15 <div id="log"></div>
16 <script>
17
18 t1.step(function() {
19 var obj1 = document.createElement("object");
20 obj1.setAttribute("data", "/images/blue.png");
21 obj1.setAttribute("type", "text/plain");
22 obj1.setAttribute("typemustmatch", "");
23 obj1.onload = t1.step_func(function () {
24 assert_true("typeMustMatch" in obj1, "typeMustMatch is not supported.");
25 assert_unreached("The image of the first object should not be loaded.");
26 });
27 document.getElementById("obj").appendChild(obj1);
28 });
29
30 t2.step(function () {
31 var obj2 = document.createElement("object");
32 obj2.setAttribute("data", "test2.html");
33 obj2.setAttribute("type", "text/plain");
34 obj2.onload = t2.step_func( function () {
35 assert_not_equals(obj2.contentDocument, null, "The test2.html should be load ed.");
36 });
37 document.getElementById("obj").appendChild(obj2);
38 });
39
40 </script>
41 </body>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698