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

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

Issue 2701993002: DO NOT COMMIT: Results of running new (proposed) clang-format on Blink (Closed)
Patch Set: Created 3 years, 10 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
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/CustomElement.h" 5 #include "core/dom/custom/CustomElement.h"
6 6
7 #include <ios> 7 #include <ios>
8 #include <memory> 8 #include <memory>
9 #include "core/HTMLNames.h" 9 #include "core/HTMLNames.h"
10 #include "core/SVGNames.h" 10 #include "core/SVGNames.h"
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 {false, "a"}, 54 {false, "a"},
55 {false, "A"}, 55 {false, "A"},
56 56
57 {false, "A-"}, 57 {false, "A-"},
58 {false, "0-"}, 58 {false, "0-"},
59 59
60 {true, "a-"}, 60 {true, "a-"},
61 {true, "a-a"}, 61 {true, "a-a"},
62 {true, "aa-"}, 62 {true, "aa-"},
63 {true, "aa-a"}, 63 {true, "aa-a"},
64 {true, reinterpret_cast<const UChar*>( 64 {true,
65 u"aa-\x6F22\x5B57")}, // Two CJK Unified Ideographs 65 reinterpret_cast<const UChar*>(
66 {true, reinterpret_cast<const UChar*>( 66 u"aa-\x6F22\x5B57")}, // Two CJK Unified Ideographs
67 u"aa-\xD840\xDC0B")}, // Surrogate pair U+2000B 67 {true,
68 reinterpret_cast<const UChar*>(
69 u"aa-\xD840\xDC0B")}, // Surrogate pair U+2000B
68 70
69 {false, "a-A"}, 71 {false, "a-A"},
70 {false, "a-Z"}, 72 {false, "a-Z"},
71 }; 73 };
72 for (auto test : tests) 74 for (auto test : tests)
73 testIsPotentialCustomElementName(test.str, test.expected); 75 testIsPotentialCustomElementName(test.str, test.expected);
74 } 76 }
75 77
76 TEST(CustomElementTest, TestIsValidNamePotentialCustomElementNameChar) { 78 TEST(CustomElementTest, TestIsValidNamePotentialCustomElementNameChar) {
77 struct { 79 struct {
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
222 224
223 // create an element with an uppercase tag name 225 // create an element with an uppercase tag name
224 Document& document = holder->document(); 226 Document& document = holder->document();
225 EXPECT_TRUE(document.isHTMLDocument()) 227 EXPECT_TRUE(document.isHTMLDocument())
226 << "this test requires a HTML document"; 228 << "this test requires a HTML document";
227 Element* element = document.createElement("A-A", shouldNotThrow); 229 Element* element = document.createElement("A-A", shouldNotThrow);
228 EXPECT_EQ(definition, element->customElementDefinition()); 230 EXPECT_EQ(definition, element->customElementDefinition());
229 } 231 }
230 232
231 } // namespace blink 233 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698