| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 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 | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 194 | 194 |
| 195 webViewImpl->enableTapHighlightAtPoint(targetedEvent); | 195 webViewImpl->enableTapHighlightAtPoint(targetedEvent); |
| 196 ASSERT_TRUE(webViewImpl->linkHighlight(0)); | 196 ASSERT_TRUE(webViewImpl->linkHighlight(0)); |
| 197 | 197 |
| 198 GraphicsLayer* highlightLayer = webViewImpl->linkHighlight(0)->currentGraphi
csLayerForTesting(); | 198 GraphicsLayer* highlightLayer = webViewImpl->linkHighlight(0)->currentGraphi
csLayerForTesting(); |
| 199 ASSERT_TRUE(highlightLayer); | 199 ASSERT_TRUE(highlightLayer); |
| 200 EXPECT_TRUE(highlightLayer->linkHighlight(0)); | 200 EXPECT_TRUE(highlightLayer->linkHighlight(0)); |
| 201 | 201 |
| 202 // Mimic the logic from RenderWidget::Close: | 202 // Mimic the logic from RenderWidget::Close: |
| 203 webViewImpl->willCloseLayerTreeView(); | 203 webViewImpl->willCloseLayerTreeView(); |
| 204 webViewClient.clear(); | |
| 205 webViewHelper.reset(); | 204 webViewHelper.reset(); |
| 206 | 205 |
| 207 Platform::current()->unitTestSupport()->unregisterAllMockedURLs(); | 206 Platform::current()->unitTestSupport()->unregisterAllMockedURLs(); |
| 208 } | 207 } |
| 209 | 208 |
| 210 TEST(LinkHighlightImplTest, multipleHighlights) | 209 TEST(LinkHighlightImplTest, multipleHighlights) |
| 211 { | 210 { |
| 212 const std::string baseURL("http://www.test.com/"); | 211 const std::string baseURL("http://www.test.com/"); |
| 213 const std::string fileName("test_touch_link_highlight.html"); | 212 const std::string fileName("test_touch_link_highlight.html"); |
| 214 | 213 |
| (...skipping 17 matching lines...) Expand all Loading... |
| 232 IntRect boundingBox(touchEvent.x - touchEvent.data.tap.width / 2, touchEvent
.y - touchEvent.data.tap.height / 2, touchEvent.data.tap.width, touchEvent.data.
tap.height); | 231 IntRect boundingBox(touchEvent.x - touchEvent.data.tap.width / 2, touchEvent
.y - touchEvent.data.tap.height / 2, touchEvent.data.tap.width, touchEvent.data.
tap.height); |
| 233 findGoodTouchTargets(boundingBox, webViewImpl->mainFrameImpl()->frame(), goo
dTargets, highlightNodes); | 232 findGoodTouchTargets(boundingBox, webViewImpl->mainFrameImpl()->frame(), goo
dTargets, highlightNodes); |
| 234 | 233 |
| 235 webViewImpl->enableTapHighlights(highlightNodes); | 234 webViewImpl->enableTapHighlights(highlightNodes); |
| 236 EXPECT_EQ(2U, webViewImpl->numLinkHighlights()); | 235 EXPECT_EQ(2U, webViewImpl->numLinkHighlights()); |
| 237 | 236 |
| 238 Platform::current()->unitTestSupport()->unregisterAllMockedURLs(); | 237 Platform::current()->unitTestSupport()->unregisterAllMockedURLs(); |
| 239 } | 238 } |
| 240 | 239 |
| 241 } // namespace blink | 240 } // namespace blink |
| OLD | NEW |