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

Unified Diff: LayoutTests/fast/dom/custom/resources/document-register-fuzz.js

Issue 23717043: Implement Custom Elements 'extends' option. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 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 side-by-side diff with in-line comments
Download patch
Index: LayoutTests/fast/dom/custom/resources/document-register-fuzz.js
diff --git a/LayoutTests/fast/dom/custom/resources/document-register-fuzz.js b/LayoutTests/fast/dom/custom/resources/document-register-fuzz.js
index 924c7793050a0ae0ac497464a150d24ba48b35d4..49cf446d932c328830be27458de86007c5bcce66 100644
--- a/LayoutTests/fast/dom/custom/resources/document-register-fuzz.js
+++ b/LayoutTests/fast/dom/custom/resources/document-register-fuzz.js
@@ -3,7 +3,7 @@ function setupObjectHooks(hooks)
{
// Wrapper for these object should be materialized before setting hooks.
console.log;
- document.register
+ document.register;
HTMLSpanElement.prototype;
Object.defineProperty(Object.prototype, "prototype", {
@@ -21,10 +21,15 @@ function setupObjectHooks(hooks)
function exerciseDocumentRegister()
{
+ register('x-a', {});
+ register('x-b', {prototype: Object.create(HTMLElement.prototype)});
+}
+
+function register(name, options)
+{
var myConstructor = null;
- var myPrototype = Object.create(HTMLElement.prototype);
try {
- myConstructor = document.register("x-do-nothing", { prototype: myPrototype });
+ myConstructor = document.register(name, options);
} catch (e) { }
try {
@@ -33,7 +38,7 @@ function exerciseDocumentRegister()
return;
}
- if (myConstructor.prototype != myPrototype) {
+ if (myConstructor.prototype != options.prototype) {
console.log("FAIL: bad prototype");
return;
}
« no previous file with comments | « LayoutTests/fast/dom/custom/lifecycle-created-paste.html ('k') | LayoutTests/fast/dom/custom/type-extensions.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698