OLD | NEW |
---|---|
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "content/shell/renderer/test_runner/TestPlugin.h" | 5 #include "content/shell/renderer/test_runner/TestPlugin.h" |
6 | 6 |
7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
8 #include "content/shell/renderer/test_runner/TestCommon.h" | 8 #include "content/shell/renderer/test_runner/TestCommon.h" |
9 #include "content/shell/renderer/test_runner/WebTestDelegate.h" | 9 #include "content/shell/renderer/test_runner/WebTestDelegate.h" |
10 #include "third_party/WebKit/public/platform/Platform.h" | 10 #include "third_party/WebKit/public/platform/Platform.h" |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
78 } | 78 } |
79 | 79 |
80 BLINK_ASSERT_NOT_REACHED(); | 80 BLINK_ASSERT_NOT_REACHED(); |
81 return 0; | 81 return 0; |
82 } | 82 } |
83 | 83 |
84 void printTouchList(WebTestDelegate* delegate, const WebTouchPoint* points, int length) | 84 void printTouchList(WebTestDelegate* delegate, const WebTouchPoint* points, int length) |
85 { | 85 { |
86 for (int i = 0; i < length; ++i) { | 86 for (int i = 0; i < length; ++i) { |
87 char buffer[100]; | 87 char buffer[100]; |
88 snprintf(buffer, sizeof(buffer), "* %d, %d: %s\n", points[i].position.x, points[i].position.y, pointState(points[i].state)); | 88 snprintf(buffer, sizeof(buffer), "* %d, %d: %s\n", (int)points[i].positi on.x, (int)points[i].position.y, pointState(points[i].state)); |
jam
2014/01/29 00:54:22
nit: use static_cast instead of c cast per style g
tdresser
2014/01/29 15:02:43
Done.
| |
89 delegate->printMessage(buffer); | 89 delegate->printMessage(buffer); |
90 } | 90 } |
91 } | 91 } |
92 | 92 |
93 void printEventDetails(WebTestDelegate* delegate, const WebInputEvent& event) | 93 void printEventDetails(WebTestDelegate* delegate, const WebInputEvent& event) |
94 { | 94 { |
95 if (WebInputEvent::isTouchEventType(event.type)) { | 95 if (WebInputEvent::isTouchEventType(event.type)) { |
96 const WebTouchEvent& touch = static_cast<const WebTouchEvent&>(event); | 96 const WebTouchEvent& touch = static_cast<const WebTouchEvent&>(event); |
97 printTouchList(delegate, touch.touches, touch.touchesLength); | 97 printTouchList(delegate, touch.touches, touch.touchesLength); |
98 printTouchList(delegate, touch.changedTouches, touch.changedTouchesLengt h); | 98 printTouchList(delegate, touch.changedTouches, touch.changedTouchesLengt h); |
(...skipping 477 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
576 return new TestPlugin(frame, params, delegate); | 576 return new TestPlugin(frame, params, delegate); |
577 } | 577 } |
578 | 578 |
579 const WebString& TestPlugin::mimeType() | 579 const WebString& TestPlugin::mimeType() |
580 { | 580 { |
581 const CR_DEFINE_STATIC_LOCAL(WebString, kMimeType, ("application/x-webkit-te st-webplugin")); | 581 const CR_DEFINE_STATIC_LOCAL(WebString, kMimeType, ("application/x-webkit-te st-webplugin")); |
582 return kMimeType; | 582 return kMimeType; |
583 } | 583 } |
584 | 584 |
585 } | 585 } |
OLD | NEW |