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 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
212 failureContext.append(element->firstChild()->textContent(false).stri pWhiteSpace().ascii().data()); | 212 failureContext.append(element->firstChild()->textContent(false).stri pWhiteSpace().ascii().data()); |
213 failureContext.append("\""); | 213 failureContext.append("\""); |
214 } else { | 214 } else { |
215 failureContext += "<missing ID>"; | 215 failureContext += "<missing ID>"; |
216 } | 216 } |
217 | 217 |
218 // Run each test three times at different positions in the element. | 218 // Run each test three times at different positions in the element. |
219 // Note that we don't want the bounding box because our tests sometimes have elements with | 219 // Note that we don't want the bounding box because our tests sometimes have elements with |
220 // multiple border boxes with other elements in between. Use the first b order box (which | 220 // multiple border boxes with other elements in between. Use the first b order box (which |
221 // we can easily visualize in a browser for debugging). | 221 // we can easily visualize in a browser for debugging). |
222 RefPtrWillBePersistent<ClientRectList> rects = element->getClientRects() ; | 222 Persistent<ClientRectList> rects = element->getClientRects(); |
haraken
2015/04/28 00:51:45
As dcheng pointed out somewhere, if this really ne
| |
223 ASSERT_GE(rects->length(), 0u) << failureContext; | 223 ASSERT_GE(rects->length(), 0u) << failureContext; |
224 RefPtrWillBePersistent<ClientRect> r = rects->item(0); | 224 Persistent<ClientRect> r = rects->item(0); |
225 FloatRect clientFloatRect = FloatRect(r->left(), r->top(), r->width(), r ->height()); | 225 FloatRect clientFloatRect = FloatRect(r->left(), r->top(), r->width(), r ->height()); |
226 IntRect clientRect = enclosedIntRect(clientFloatRect); | 226 IntRect clientRect = enclosedIntRect(clientFloatRect); |
227 for (int locIdx = 0; locIdx < 3; locIdx++) { | 227 for (int locIdx = 0; locIdx < 3; locIdx++) { |
228 IntPoint clientPoint; | 228 IntPoint clientPoint; |
229 std::stringstream contextStream; | 229 std::stringstream contextStream; |
230 contextStream << failureContext << " ("; | 230 contextStream << failureContext << " ("; |
231 switch (locIdx) { | 231 switch (locIdx) { |
232 case 0: | 232 case 0: |
233 clientPoint = clientRect.center(); | 233 clientPoint = clientRect.center(); |
234 contextStream << "center"; | 234 contextStream << "center"; |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
340 { | 340 { |
341 runShadowDOMTest("touch-action-shadow-dom.html"); | 341 runShadowDOMTest("touch-action-shadow-dom.html"); |
342 } | 342 } |
343 | 343 |
344 TEST_F(TouchActionTest, Pan) | 344 TEST_F(TouchActionTest, Pan) |
345 { | 345 { |
346 runTouchActionTest("touch-action-pan.html"); | 346 runTouchActionTest("touch-action-pan.html"); |
347 } | 347 } |
348 | 348 |
349 } | 349 } |
OLD | NEW |