| 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 "public/web/WebElement.h" | 5 #include "public/web/WebElement.h" |
| 6 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 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/dom/ShadowRoot.h" | 10 #include "core/dom/ShadowRoot.h" |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 53 static const char kBlockWithInlines[] = | 53 static const char kBlockWithInlines[] = |
| 54 "<div id='testElement'>" | 54 "<div id='testElement'>" |
| 55 " <span>Hello</span> " | 55 " <span>Hello</span> " |
| 56 "</div>"; | 56 "</div>"; |
| 57 | 57 |
| 58 static const char kBlockWithEmptyInlines[] = | 58 static const char kBlockWithEmptyInlines[] = |
| 59 "<div id='testElement'>" | 59 "<div id='testElement'>" |
| 60 " <span></span> " | 60 " <span></span> " |
| 61 "</div>"; | 61 "</div>"; |
| 62 | 62 |
| 63 class WebElementTest : public testing::Test { | 63 class WebElementTest : public ::testing::Test { |
| 64 protected: | 64 protected: |
| 65 Document& GetDocument() { return page_holder_->GetDocument(); } | 65 Document& GetDocument() { return page_holder_->GetDocument(); } |
| 66 void InsertHTML(String html); | 66 void InsertHTML(String html); |
| 67 WebElement TestElement(); | 67 WebElement TestElement(); |
| 68 | 68 |
| 69 private: | 69 private: |
| 70 void SetUp() override; | 70 void SetUp() override; |
| 71 | 71 |
| 72 std::unique_ptr<DummyPageHolder> page_holder_; | 72 std::unique_ptr<DummyPageHolder> page_holder_; |
| 73 }; | 73 }; |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 146 EXPECT_FALSE(TestElement().IsEditable()); | 146 EXPECT_FALSE(TestElement().IsEditable()); |
| 147 | 147 |
| 148 InsertHTML("<input id=testElement disabled>"); | 148 InsertHTML("<input id=testElement disabled>"); |
| 149 EXPECT_FALSE(TestElement().IsEditable()); | 149 EXPECT_FALSE(TestElement().IsEditable()); |
| 150 | 150 |
| 151 InsertHTML("<fieldset disabled><div><input id=testElement></div></fieldset>"); | 151 InsertHTML("<fieldset disabled><div><input id=testElement></div></fieldset>"); |
| 152 EXPECT_FALSE(TestElement().IsEditable()); | 152 EXPECT_FALSE(TestElement().IsEditable()); |
| 153 } | 153 } |
| 154 | 154 |
| 155 } // namespace blink | 155 } // namespace blink |
| OLD | NEW |