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

Unified Diff: third_party/WebKit/LayoutTests/fast/dom/custom/crash-in-getTypeExtension.html

Issue 2530243002: Crash in blink::getTypeExtension (Closed)
Patch Set: Updated test and removed extra use count after review. Created 3 years, 11 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/dom/Document.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/fast/dom/custom/crash-in-getTypeExtension.html
diff --git a/third_party/WebKit/LayoutTests/fast/dom/custom/crash-in-getTypeExtension.html b/third_party/WebKit/LayoutTests/fast/dom/custom/crash-in-getTypeExtension.html
new file mode 100644
index 0000000000000000000000000000000000000000..5eb4b3483f48f7555477a6cc999743351bae23ff
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/fast/dom/custom/crash-in-getTypeExtension.html
@@ -0,0 +1,14 @@
+<!DOCTYPE html>
+<script src="../../../resources/testharness.js"></script>
+<script src="../../../resources/testharnessreport.js"></script>
+<script>
+test(() => {
+ // TODO(a.obzhirov): Use customElements.define when customized built-in elements are supported.
+ document.registerElement("x-foo", { prototype: Object.create(HTMLDivElement.prototype) });
+ var toStringCalled = false;
+ assert_throws('NotFoundError', () => {
+ document.createElement('div', { toString: () => { toStringCalled = true; return 'x-foo'; } })
+ });
+ assert_false(toStringCalled, "toString should not have been called.");
dominicc (has gone to gerrit) 2017/01/31 22:41:38 Use single quotes for consistency here and on line
+}, "Test for crbug/666610: Crash in blink::getTypeExtension");
+</script>
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/dom/Document.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698