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

Side by Side Diff: Source/core/editing/StyledMarkupSerializerTest.cpp

Issue 1196173003: Bug fix: StyledMarkupSerializer's m_lastClosed can be null (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/editing/StyledMarkupSerializer.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
OLDNEW
« no previous file with comments | « Source/core/editing/StyledMarkupSerializer.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698