Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(194)

Side by Side Diff: content/shell/renderer/test_runner/TestPlugin.cpp

Issue 210083002: Specify printing format of touch point co-ordinates. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "base/bind.h" 8 #include "base/bind.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/memory/shared_memory.h" 10 #include "base/memory/shared_memory.h"
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 return "Unknown"; 84 return "Unknown";
85 } 85 }
86 } 86 }
87 87
88 void printTouchList(WebTestDelegate* delegate, const WebTouchPoint* points, int length) 88 void printTouchList(WebTestDelegate* delegate, const WebTouchPoint* points, int length)
89 { 89 {
90 for (int i = 0; i < length; ++i) { 90 for (int i = 0; i < length; ++i) {
91 char buffer[100]; 91 char buffer[100];
92 snprintf(buffer, 92 snprintf(buffer,
93 sizeof(buffer), 93 sizeof(buffer),
94 "* %f, %f: %s\n", 94 "* %.2f, %.2f: %s\n",
95 points[i].position.x, 95 points[i].position.x,
96 points[i].position.y, 96 points[i].position.y,
97 pointState(points[i].state)); 97 pointState(points[i].state));
98 delegate->printMessage(buffer); 98 delegate->printMessage(buffer);
99 } 99 }
100 } 100 }
101 101
102 void printEventDetails(WebTestDelegate* delegate, const WebInputEvent& event) 102 void printEventDetails(WebTestDelegate* delegate, const WebInputEvent& event)
103 { 103 {
104 if (WebInputEvent::isTouchEventType(event.type)) { 104 if (WebInputEvent::isTouchEventType(event.type)) {
(...skipping 587 matching lines...) Expand 10 before | Expand all | Expand 10 after
692 } 692 }
693 693
694 bool TestPlugin::isSupportedMimeType(const WebString& mimeType) 694 bool TestPlugin::isSupportedMimeType(const WebString& mimeType)
695 { 695 {
696 return mimeType == TestPlugin::mimeType() 696 return mimeType == TestPlugin::mimeType()
697 || mimeType == pluginPersistsMimeType() 697 || mimeType == pluginPersistsMimeType()
698 || mimeType == canCreateWithoutRendererMimeType(); 698 || mimeType == canCreateWithoutRendererMimeType();
699 } 699 }
700 700
701 } 701 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698