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

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

Issue 634893002: Replace OVERRIDE and FINAL with override and final in WebKit/public (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 2 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 | « Source/web/WebMediaPlayerClientImpl.h ('k') | Source/web/WebPagePopupImpl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "config.h" 5 #include "config.h"
6 #include "public/web/WebNode.h" 6 #include "public/web/WebNode.h"
7 7
8 #include "core/dom/Document.h" 8 #include "core/dom/Document.h"
9 #include "core/dom/Element.h" 9 #include "core/dom/Element.h"
10 #include "core/testing/DummyPageHolder.h" 10 #include "core/testing/DummyPageHolder.h"
11 #include "public/web/WebElement.h" 11 #include "public/web/WebElement.h"
12 #include "public/web/WebElementCollection.h" 12 #include "public/web/WebElementCollection.h"
13 #include <gtest/gtest.h> 13 #include <gtest/gtest.h>
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 private: 21 private:
22 virtual void SetUp() OVERRIDE; 22 virtual void SetUp() override;
23 23
24 OwnPtr<DummyPageHolder> m_pageHolder; 24 OwnPtr<DummyPageHolder> m_pageHolder;
25 }; 25 };
26 26
27 void WebNodeTest::SetUp() 27 void WebNodeTest::SetUp()
28 { 28 {
29 m_pageHolder = DummyPageHolder::create(IntSize(800, 600)); 29 m_pageHolder = DummyPageHolder::create(IntSize(800, 600));
30 } 30 }
31 31
32 TEST_F(WebNodeTest, GetElementsByHTMLTagName) 32 TEST_F(WebNodeTest, GetElementsByHTMLTagName)
33 { 33 {
34 document().documentElement()->setInnerHTML("<body><LABEL></LABEL><svg xmlns= 'http://www.w3.org/2000/svg'><label></label></svg></body>", ASSERT_NO_EXCEPTION) ; 34 document().documentElement()->setInnerHTML("<body><LABEL></LABEL><svg xmlns= 'http://www.w3.org/2000/svg'><label></label></svg></body>", ASSERT_NO_EXCEPTION) ;
35 WebNode node(document().documentElement()); 35 WebNode node(document().documentElement());
36 // WebNode::getElementsByHTMLTagName returns only HTML elements. 36 // WebNode::getElementsByHTMLTagName returns only HTML elements.
37 WebElementCollection collection = node.getElementsByHTMLTagName("label"); 37 WebElementCollection collection = node.getElementsByHTMLTagName("label");
38 EXPECT_EQ(1u, collection.length()); 38 EXPECT_EQ(1u, collection.length());
39 EXPECT_TRUE(collection.firstItem().hasHTMLTagName("label")); 39 EXPECT_TRUE(collection.firstItem().hasHTMLTagName("label"));
40 // The argument should be lower-case. 40 // The argument should be lower-case.
41 collection = node.getElementsByHTMLTagName("LABEL"); 41 collection = node.getElementsByHTMLTagName("LABEL");
42 EXPECT_EQ(0u, collection.length()); 42 EXPECT_EQ(0u, collection.length());
43 } 43 }
44 44
45 } 45 }
OLDNEW
« no previous file with comments | « Source/web/WebMediaPlayerClientImpl.h ('k') | Source/web/WebPagePopupImpl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698