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 233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
244 document().updateStyleAndLayout(); | 244 document().updateStyleAndLayout(); |
245 Element* bElement = toElement(document().body()->firstChild()); | 245 Element* bElement = toElement(document().body()->firstChild()); |
246 EphemeralRange ephemeralRange = EphemeralRange::rangeOfContents(*bElement); | 246 EphemeralRange ephemeralRange = EphemeralRange::rangeOfContents(*bElement); |
247 Position startBElement = toPositionInDOMTree(ephemeralRange.startPosition()); | 247 Position startBElement = toPositionInDOMTree(ephemeralRange.startPosition()); |
248 Position endBElement = toPositionInDOMTree(ephemeralRange.endPosition()); | 248 Position endBElement = toPositionInDOMTree(ephemeralRange.endPosition()); |
249 const EphemeralRange range(startBElement, endBElement); | 249 const EphemeralRange range(startBElement, endBElement); |
250 // Try to make active a marker that doesn't exist. | 250 // Try to make active a marker that doesn't exist. |
251 EXPECT_FALSE(markerController().setMarkersActive(range, true)); | 251 EXPECT_FALSE(markerController().setMarkersActive(range, true)); |
252 | 252 |
253 // Add a marker and try it once more. | 253 // Add a marker and try it once more. |
254 markerController().addTextMatchMarker(range, false); | 254 markerController().addTextMatchMarker(range, |
| 255 DocumentMarker::MatchStatus::kInactive); |
255 EXPECT_EQ(1u, markerController().markers().size()); | 256 EXPECT_EQ(1u, markerController().markers().size()); |
256 EXPECT_TRUE(markerController().setMarkersActive(range, true)); | 257 EXPECT_TRUE(markerController().setMarkersActive(range, true)); |
257 } | 258 } |
258 | 259 |
259 } // namespace blink | 260 } // namespace blink |
OLD | NEW |