| OLD | NEW | 
|---|
| 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" | 
|  | 9 #include "core/dom/Element.h" | 
| 8 #include "core/testing/DummyPageHolder.h" | 10 #include "core/testing/DummyPageHolder.h" | 
| 9 #include "public/web/WebElement.h" | 11 #include "public/web/WebElement.h" | 
| 10 #include "public/web/WebElementCollection.h" | 12 #include "public/web/WebElementCollection.h" | 
|  | 13 #include "public/web/WebNode.h" | 
| 11 #include <gtest/gtest.h> | 14 #include <gtest/gtest.h> | 
| 12 | 15 | 
| 13 namespace blink { | 16 namespace blink { | 
| 14 | 17 | 
| 15 class WebNodeTest : public testing::Test { | 18 class WebNodeTest : public testing::Test { | 
| 16 protected: | 19 protected: | 
| 17     Document& document() { return m_pageHolder->document(); } | 20     Document& document() { return m_pageHolder->document(); } | 
| 18 | 21 | 
| 19 private: | 22 private: | 
| 20     virtual void SetUp() OVERRIDE; | 23     virtual void SetUp() OVERRIDE; | 
| (...skipping 13 matching lines...) Expand all  Loading... | 
| 34     // WebNode::getElementsByHTMLTagName returns only HTML elements. | 37     // WebNode::getElementsByHTMLTagName returns only HTML elements. | 
| 35     WebElementCollection collection = node.getElementsByHTMLTagName("label"); | 38     WebElementCollection collection = node.getElementsByHTMLTagName("label"); | 
| 36     EXPECT_EQ(1u, collection.length()); | 39     EXPECT_EQ(1u, collection.length()); | 
| 37     EXPECT_TRUE(collection.firstItem().hasHTMLTagName("label")); | 40     EXPECT_TRUE(collection.firstItem().hasHTMLTagName("label")); | 
| 38     // The argument should be lower-case. | 41     // The argument should be lower-case. | 
| 39     collection = node.getElementsByHTMLTagName("LABEL"); | 42     collection = node.getElementsByHTMLTagName("LABEL"); | 
| 40     EXPECT_EQ(0u, collection.length()); | 43     EXPECT_EQ(0u, collection.length()); | 
| 41 } | 44 } | 
| 42 | 45 | 
| 43 } | 46 } | 
| OLD | NEW | 
|---|