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 "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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 return "Released"; | 76 return "Released"; |
77 case WebTouchPoint::StatePressed: | 77 case WebTouchPoint::StatePressed: |
78 return "Pressed"; | 78 return "Pressed"; |
79 case WebTouchPoint::StateMoved: | 79 case WebTouchPoint::StateMoved: |
80 return "Moved"; | 80 return "Moved"; |
81 case WebTouchPoint::StateCancelled: | 81 case WebTouchPoint::StateCancelled: |
82 return "Cancelled"; | 82 return "Cancelled"; |
83 default: | 83 default: |
84 return "Unknown"; | 84 return "Unknown"; |
85 } | 85 } |
86 | |
87 BLINK_ASSERT_NOT_REACHED(); | |
88 return 0; | |
89 } | 86 } |
90 | 87 |
91 void printTouchList(WebTestDelegate* delegate, const WebTouchPoint* points, int
length) | 88 void printTouchList(WebTestDelegate* delegate, const WebTouchPoint* points, int
length) |
92 { | 89 { |
93 for (int i = 0; i < length; ++i) { | 90 for (int i = 0; i < length; ++i) { |
94 char buffer[100]; | 91 char buffer[100]; |
95 snprintf(buffer, sizeof(buffer), "* %d, %d: %s\n", static_cast<int>(poin
ts[i].position.x), static_cast<int>(points[i].position.y), pointState(points[i].
state)); | 92 snprintf(buffer, sizeof(buffer), "* %d, %d: %s\n", static_cast<int>(poin
ts[i].position.x), static_cast<int>(points[i].position.y), pointState(points[i].
state)); |
96 delegate->printMessage(buffer); | 93 delegate->printMessage(buffer); |
97 } | 94 } |
98 } | 95 } |
(...skipping 591 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
690 } | 687 } |
691 | 688 |
692 bool TestPlugin::isSupportedMimeType(const WebString& mimeType) | 689 bool TestPlugin::isSupportedMimeType(const WebString& mimeType) |
693 { | 690 { |
694 return mimeType == TestPlugin::mimeType() | 691 return mimeType == TestPlugin::mimeType() |
695 || mimeType == pluginPersistsMimeType() | 692 || mimeType == pluginPersistsMimeType() |
696 || mimeType == canCreateWithoutRendererMimeType(); | 693 || mimeType == canCreateWithoutRendererMimeType(); |
697 } | 694 } |
698 | 695 |
699 } | 696 } |
OLD | NEW |