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

Side by Side Diff: LayoutTests/fast/dom/custom/document-register-svg-extends.html

Issue 117313008: Update Custom Elements API to new names. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Update for forgotten tests. Created 7 years 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
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <script src="../../../resources/testharness.js"></script> 2 <script src="../../../resources/testharness.js"></script>
3 <script src="../../../resources/testharnessreport.js"></script> 3 <script src="../../../resources/testharnessreport.js"></script>
4 <body> 4 <body>
5 <script> 5 <script>
6 test(function () { 6 test(function () {
7 var proto = Object.create(SVGGElement.prototype); 7 var proto = Object.create(SVGGElement.prototype);
8 8
9 assert_throws('INVALID_CHARACTER_ERR', function() { 9 assert_throws('INVALID_CHARACTER_ERR', function() {
10 document.register('x-foo', {prototype: proto}); 10 document.registerElement('x-foo', {prototype: proto});
11 }, 'register of an SVG element requires the extends parameter'); 11 }, 'register of an SVG element requires the extends parameter');
12 12
13 var XFoo = document.register('x-foo', {prototype: proto, extends: 'g'}); 13 var XFoo = document.registerElement('x-foo', {prototype: proto, extends: 'g' });
14 14
15 var created = new XFoo(); 15 var created = new XFoo();
16 assert_true(created instanceof SVGGElement, 'created element should be an SV G element'); 16 assert_true(created instanceof SVGGElement, 'created element should be an SV G element');
17 17
18 }, 'registration of SVG types'); 18 }, 'registration of SVG types');
19 </script> 19 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698