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

Side by Side Diff: third_party/WebKit/Source/core/dom/custom/CustomElementsRegistryTest.cpp

Issue 2161003002: CustomElements: upgrade element patch (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@upgrade-element
Patch Set: RegistryTest update, removed setting element`s state to custom in the test Created 4 years, 4 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
« no previous file with comments | « third_party/WebKit/Source/core/dom/custom/CustomElementDefinition.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "core/dom/custom/CustomElementsRegistry.h" 5 #include "core/dom/custom/CustomElementsRegistry.h"
6 6
7 #include "bindings/core/v8/ExceptionState.h" 7 #include "bindings/core/v8/ExceptionState.h"
8 #include "bindings/core/v8/ScriptValue.h" 8 #include "bindings/core/v8/ScriptValue.h"
9 #include "core/dom/Document.h" 9 #include "core/dom/Document.h"
10 #include "core/dom/Element.h" 10 #include "core/dom/Element.h"
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after
243 { 243 {
244 return ScriptValue(); 244 return ScriptValue();
245 } 245 }
246 246
247 bool runConstructor(Element* element) override 247 bool runConstructor(Element* element) override
248 { 248 {
249 if (constructionStack().isEmpty() 249 if (constructionStack().isEmpty()
250 || constructionStack().last() != element) 250 || constructionStack().last() != element)
251 return false; 251 return false;
252 constructionStack().last().clear(); 252 constructionStack().last().clear();
253 element->setCustomElementState(CustomElementState::Custom);
254 return true; 253 return true;
255 } 254 }
256 255
257 HTMLElement* createElementSync(Document&, const QualifiedName&) override 256 HTMLElement* createElementSync(Document&, const QualifiedName&) override
258 { 257 {
259 return nullptr; 258 return nullptr;
260 } 259 }
261 260
262 HTMLElement* createElementSync(Document&, const QualifiedName&, ExceptionSta te&) override 261 HTMLElement* createElementSync(Document&, const QualifiedName&, ExceptionSta te&) override
263 { 262 {
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after
468 << "remove() should invoke disconnectedCallback"; 467 << "remove() should invoke disconnectedCallback";
469 468
470 EXPECT_EQ(1u, definition->m_logs.size()) 469 EXPECT_EQ(1u, definition->m_logs.size())
471 << "remove() should not invoke other callbacks"; 470 << "remove() should not invoke other callbacks";
472 } 471 }
473 472
474 // TODO(dominicc): Add tests which adjust the "is" attribute when type 473 // TODO(dominicc): Add tests which adjust the "is" attribute when type
475 // extensions are implemented. 474 // extensions are implemented.
476 475
477 } // namespace blink 476 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/dom/custom/CustomElementDefinition.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698