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

Side by Side Diff: LayoutTests/imported/web-platform-tests/custom-elements/registering-custom-elements/unresolved-elements-interface-svg-element.html

Issue 560893005: First checked-in import of the W3C's test suites. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: add new expectations for newly failing w3c tests Created 6 years, 3 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 <html>
3 <head>
4 <title>Unresolved element interface must be SVGElement, if the namespace is SVG Namespace</title>
5 <meta name="author" title="Sergey G. Grekhov" href="mailto:sgrekhov@unipro.ru">
6 <meta name="author" title="Vasiliy Degtyarev" href="mailto:vasya@unipro.ru">
7 <meta name="author" title="Aleksei Yu. Semenov" href="mailto:a.semenov@unipro.ru ">
8 <meta name="assert" content="When an unresolved element is created, it's element interface must be SVGElement if the namespace is SVG Namespace">
9 <link rel="help" href="http://www.w3.org/TR/custom-elements/#registering-custom- elements">
10 <script src="../../../../resources/testharness.js"></script>
11 <script src="../../../../resources/testharnessreport.js"></script>
12 <script src="../testcommon.js"></script>
13 <link rel="stylesheet" href="../../../../resources/testharness.css">
14 </head>
15 <body>
16 <div id="log"></div>
17 <script>
18 test(function() {
19 var doc = newHTMLDocument();
20 var xsvg = doc.createElementNS(SVG_NAMESPACE, 'x-svg');
21
22 assert_class_string(xsvg, 'SVGElement', 'Unresolved custom element must be a SVG element');
23 }, 'Test interface of unresolved element with valid name, created by Document.cr eateElementNS()');
24
25
26 test(function() {
27 var doc = newHTMLDocument();
28 doc.body.innerHTML =
29 '<svg xmlns=' + SVG_NAMESPACE + ' version="1.1">' +
30 '<x-svg-a id="x-svg"></x-svg-a>' +
31 '</svg>';
32 var xsvg = doc.querySelector('#x-svg');
33
34 assert_class_string(xsvg, 'SVGElement', 'Unresolved custom element must be a SVG element');
35 }, 'Test interface of unresolved element with valid name, created via innerHTML property');
36
37
38 testInIFrame('../resources/x-svg-element.html', function(doc) {
39 var xsvg = doc.getElementById('x-svg-element');
40
41 assert_not_equals(xsvg, null, 'Unresolved custom element should not be null' );
42
43 assert_class_string(xsvg, 'SVGElement',
44 'Unresolved custom element must be a SVG element');
45 }, 'Test interface of unresolved element in loaded HTML document with embedded S VG elements');
46 </script>
47 </body>
48 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698