| 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 30 matching lines...) Expand all Loading... |
| 41 #include "public/web/WebFrameClient.h" | 41 #include "public/web/WebFrameClient.h" |
| 42 #include "public/web/WebInputEvent.h" | 42 #include "public/web/WebInputEvent.h" |
| 43 #include "public/web/WebViewClient.h" | 43 #include "public/web/WebViewClient.h" |
| 44 #include "web/WebInputEventConversion.h" | 44 #include "web/WebInputEventConversion.h" |
| 45 #include "web/WebLocalFrameImpl.h" | 45 #include "web/WebLocalFrameImpl.h" |
| 46 #include "web/WebViewImpl.h" | 46 #include "web/WebViewImpl.h" |
| 47 #include "web/tests/FrameTestHelpers.h" | 47 #include "web/tests/FrameTestHelpers.h" |
| 48 #include "wtf/PassOwnPtr.h" | 48 #include "wtf/PassOwnPtr.h" |
| 49 #include <gtest/gtest.h> | 49 #include <gtest/gtest.h> |
| 50 | 50 |
| 51 | |
| 52 using namespace blink; | |
| 53 using namespace blink; | 51 using namespace blink; |
| 54 | 52 |
| 55 namespace { | 53 namespace { |
| 56 | 54 |
| 57 TEST(LinkHighlightTest, verifyWebViewImplIntegration) | 55 TEST(LinkHighlightTest, verifyWebViewImplIntegration) |
| 58 { | 56 { |
| 59 const std::string baseURL("http://www.test.com/"); | 57 const std::string baseURL("http://www.test.com/"); |
| 60 const std::string fileName("test_touch_link_highlight.html"); | 58 const std::string fileName("test_touch_link_highlight.html"); |
| 61 | 59 |
| 62 URLTestHelpers::registerMockedURLFromBaseURL(WebString::fromUTF8(baseURL.c_s
tr()), WebString::fromUTF8("test_touch_link_highlight.html")); | 60 URLTestHelpers::registerMockedURLFromBaseURL(WebString::fromUTF8(baseURL.c_s
tr()), WebString::fromUTF8("test_touch_link_highlight.html")); |
| (...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 203 IntRect boundingBox(touchEvent.x - touchEvent.data.tap.width / 2, touchEvent
.y - touchEvent.data.tap.height / 2, touchEvent.data.tap.width, touchEvent.data.
tap.height); | 201 IntRect boundingBox(touchEvent.x - touchEvent.data.tap.width / 2, touchEvent
.y - touchEvent.data.tap.height / 2, touchEvent.data.tap.width, touchEvent.data.
tap.height); |
| 204 findGoodTouchTargets(boundingBox, webViewImpl->mainFrameImpl()->frame(), goo
dTargets, highlightNodes); | 202 findGoodTouchTargets(boundingBox, webViewImpl->mainFrameImpl()->frame(), goo
dTargets, highlightNodes); |
| 205 | 203 |
| 206 webViewImpl->enableTapHighlights(highlightNodes); | 204 webViewImpl->enableTapHighlights(highlightNodes); |
| 207 EXPECT_EQ(2U, webViewImpl->numLinkHighlights()); | 205 EXPECT_EQ(2U, webViewImpl->numLinkHighlights()); |
| 208 | 206 |
| 209 Platform::current()->unitTestSupport()->unregisterAllMockedURLs(); | 207 Platform::current()->unitTestSupport()->unregisterAllMockedURLs(); |
| 210 } | 208 } |
| 211 | 209 |
| 212 } // namespace | 210 } // namespace |
| OLD | NEW |