| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "core/editing/StyledMarkupSerializer.h" | 6 #include "core/editing/StyledMarkupSerializer.h" |
| 7 | 7 |
| 8 #include "bindings/core/v8/ExceptionStatePlaceholder.h" | 8 #include "bindings/core/v8/ExceptionStatePlaceholder.h" |
| 9 #include "core/dom/Document.h" | 9 #include "core/dom/Document.h" |
| 10 #include "core/dom/Element.h" | 10 #include "core/dom/Element.h" |
| (...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 198 | 198 |
| 199 TEST_F(StyledMarkupSerializerTest, StyleDisplayNone) | 199 TEST_F(StyledMarkupSerializerTest, StyleDisplayNone) |
| 200 { | 200 { |
| 201 const char* bodyContent = "<b>00<i style='display:none'>11</i>22</b>"; | 201 const char* bodyContent = "<b>00<i style='display:none'>11</i>22</b>"; |
| 202 setBodyContent(bodyContent); | 202 setBodyContent(bodyContent); |
| 203 const char* expectedResult = "<b>0022</b>"; | 203 const char* expectedResult = "<b>0022</b>"; |
| 204 EXPECT_EQ(expectedResult, serialize<EditingStrategy>()); | 204 EXPECT_EQ(expectedResult, serialize<EditingStrategy>()); |
| 205 EXPECT_EQ(expectedResult, serialize<EditingInComposedTreeStrategy>()); | 205 EXPECT_EQ(expectedResult, serialize<EditingInComposedTreeStrategy>()); |
| 206 } | 206 } |
| 207 | 207 |
| 208 TEST_F(StyledMarkupSerializerTest, StyleDisplayNoneAndNewLines) |
| 209 { |
| 210 const char* bodyContent = "<div style='display:none'>11</div>\n\n"; |
| 211 setBodyContent(bodyContent); |
| 212 EXPECT_EQ("", serialize<EditingStrategy>()); |
| 213 EXPECT_EQ("", serialize<EditingInComposedTreeStrategy>()); |
| 214 } |
| 215 |
| 208 } // namespace blink | 216 } // namespace blink |
| OLD | NEW |