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

Side by Side Diff: third_party/WebKit/Source/web/WebNodeTest.cpp

Issue 2700123003: DO NOT COMMIT: Results of running old (current) 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "public/web/WebNode.h" 5 #include "public/web/WebNode.h"
6 6
7 #include <memory>
7 #include "core/dom/Document.h" 8 #include "core/dom/Document.h"
8 #include "core/dom/Element.h" 9 #include "core/dom/Element.h"
9 #include "core/testing/DummyPageHolder.h" 10 #include "core/testing/DummyPageHolder.h"
10 #include "public/web/WebElement.h" 11 #include "public/web/WebElement.h"
11 #include "public/web/WebElementCollection.h" 12 #include "public/web/WebElementCollection.h"
12 #include "testing/gtest/include/gtest/gtest.h" 13 #include "testing/gtest/include/gtest/gtest.h"
13 #include <memory>
14 14
15 namespace blink { 15 namespace blink {
16 16
17 class WebNodeTest : public testing::Test { 17 class WebNodeTest : public testing::Test {
18 protected: 18 protected:
19 Document& document() { return m_pageHolder->document(); } 19 Document& document() { return m_pageHolder->document(); }
20 20
21 void setInnerHTML(const String& html) { 21 void setInnerHTML(const String& html) {
22 document().documentElement()->setInnerHTML(html); 22 document().documentElement()->setInnerHTML(html);
23 } 23 }
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 // WebNode::getElementsByHTMLTagName returns only HTML elements. 60 // WebNode::getElementsByHTMLTagName returns only HTML elements.
61 WebElementCollection collection = root().getElementsByHTMLTagName("label"); 61 WebElementCollection collection = root().getElementsByHTMLTagName("label");
62 EXPECT_EQ(1u, collection.length()); 62 EXPECT_EQ(1u, collection.length());
63 EXPECT_TRUE(collection.firstItem().hasHTMLTagName("label")); 63 EXPECT_TRUE(collection.firstItem().hasHTMLTagName("label"));
64 // The argument should be lower-case. 64 // The argument should be lower-case.
65 collection = root().getElementsByHTMLTagName("LABEL"); 65 collection = root().getElementsByHTMLTagName("LABEL");
66 EXPECT_EQ(0u, collection.length()); 66 EXPECT_EQ(0u, collection.length());
67 } 67 }
68 68
69 } // namespace blink 69 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/WebLocalFrameImpl.h ('k') | third_party/WebKit/Source/web/WebPepperSocket.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698