| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2013, Google Inc. All rights reserved. | 2 * Copyright (c) 2013, Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 238 EXPECT_EQ(1u, renderedRects.size()); | 238 EXPECT_EQ(1u, renderedRects.size()); |
| 239 EXPECT_NE(invalidRect, renderedRects[0]); | 239 EXPECT_NE(invalidRect, renderedRects[0]); |
| 240 | 240 |
| 241 div->setAttribute(HTMLNames::styleAttr, "margin: 200px"); | 241 div->setAttribute(HTMLNames::styleAttr, "margin: 200px"); |
| 242 document().updateLayout(); | 242 document().updateLayout(); |
| 243 Vector<IntRect> newRenderedRects = markerController().renderedRectsForMarker
s(DocumentMarker::Composition); | 243 Vector<IntRect> newRenderedRects = markerController().renderedRectsForMarker
s(DocumentMarker::Composition); |
| 244 EXPECT_EQ(1u, newRenderedRects.size()); | 244 EXPECT_EQ(1u, newRenderedRects.size()); |
| 245 EXPECT_NE(renderedRects[0], newRenderedRects[0]); | 245 EXPECT_NE(renderedRects[0], newRenderedRects[0]); |
| 246 } | 246 } |
| 247 | 247 |
| 248 TEST_F(DocumentMarkerControllerTest, CompositionMarkersNotMerged) |
| 249 { |
| 250 IntRect invalidRect(RenderedDocumentMarker::create(DocumentMarker(0, 0, fals
e))->renderedRect()); |
| 251 |
| 252 setBodyInnerHTML("<div style='margin: 100px'>foo</div>"); |
| 253 RefPtrWillBeRawPtr<Node> text = document().body()->firstChild()->firstChild(
); |
| 254 document().updateLayout(); |
| 255 markerController().addCompositionMarker(Position(text, 0), Position(text, 1)
, Color::black, false, Color::black); |
| 256 markerController().addCompositionMarker(Position(text, 1), Position(text, 3)
, Color::black, true, Color::black); |
| 257 |
| 258 EXPECT_EQ(2u, markerController().markers().size()); |
| 259 } |
| 260 |
| 248 } // namespace blink | 261 } // namespace blink |
| OLD | NEW |