| 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 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 199 failureContext.append(element->firstChild()->textContent(false).stri
pWhiteSpace().ascii().data()); | 199 failureContext.append(element->firstChild()->textContent(false).stri
pWhiteSpace().ascii().data()); |
| 200 failureContext.append("\""); | 200 failureContext.append("\""); |
| 201 } else { | 201 } else { |
| 202 failureContext += "<missing ID>"; | 202 failureContext += "<missing ID>"; |
| 203 } | 203 } |
| 204 | 204 |
| 205 // Run each test three times at different positions in the element. | 205 // Run each test three times at different positions in the element. |
| 206 // Note that we don't want the bounding box because our tests sometimes
have elements with | 206 // Note that we don't want the bounding box because our tests sometimes
have elements with |
| 207 // multiple border boxes with other elements in between. Use the first b
order box (which | 207 // multiple border boxes with other elements in between. Use the first b
order box (which |
| 208 // we can easily visualize in a browser for debugging). | 208 // we can easily visualize in a browser for debugging). |
| 209 RefPtr<WebCore::ClientRectList> rects = element->getClientRects(); | 209 RefPtrWillBeRawPtr<WebCore::ClientRectList> rects = element->getClientRe
cts(); |
| 210 ASSERT_GE(rects->length(), 0u) << failureContext; | 210 ASSERT_GE(rects->length(), 0u) << failureContext; |
| 211 RefPtr<WebCore::ClientRect> r = rects->item(0); | 211 RefPtrWillBeRawPtr<WebCore::ClientRect> r = rects->item(0); |
| 212 WebCore::FloatRect clientFloatRect = WebCore::FloatRect(r->left(), r->to
p(), r->width(), r->height()); | 212 WebCore::FloatRect clientFloatRect = WebCore::FloatRect(r->left(), r->to
p(), r->width(), r->height()); |
| 213 WebCore::IntRect clientRect = enclosedIntRect(clientFloatRect); | 213 WebCore::IntRect clientRect = enclosedIntRect(clientFloatRect); |
| 214 for (int locIdx = 0; locIdx < 3; locIdx++) { | 214 for (int locIdx = 0; locIdx < 3; locIdx++) { |
| 215 WebCore::IntPoint clientPoint; | 215 WebCore::IntPoint clientPoint; |
| 216 std::stringstream contextStream; | 216 std::stringstream contextStream; |
| 217 contextStream << failureContext << " ("; | 217 contextStream << failureContext << " ("; |
| 218 switch (locIdx) { | 218 switch (locIdx) { |
| 219 case 0: | 219 case 0: |
| 220 clientPoint = clientRect.center(); | 220 clientPoint = clientRect.center(); |
| 221 contextStream << "center"; | 221 contextStream << "center"; |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 324 { | 324 { |
| 325 runShadowDOMTest("touch-action-shadow-dom.html"); | 325 runShadowDOMTest("touch-action-shadow-dom.html"); |
| 326 } | 326 } |
| 327 | 327 |
| 328 TEST_F(TouchActionTest, Pan) | 328 TEST_F(TouchActionTest, Pan) |
| 329 { | 329 { |
| 330 runTouchActionTest("touch-action-pan.html"); | 330 runTouchActionTest("touch-action-pan.html"); |
| 331 } | 331 } |
| 332 | 332 |
| 333 } | 333 } |
| OLD | NEW |