summaryrefslogtreecommitdiffstats
path: root/ppapi/tests/test_scrollbar.cc
diff options
context:
space:
mode:
authordmichael@chromium.org <dmichael@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-07-08 23:30:11 +0000
committerdmichael@chromium.org <dmichael@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-07-08 23:30:11 +0000
commit7f801d827de060e0bb88e266e6aa889ba3e14289 (patch)
treece099bd5fe4f4453264737e75aac0e47507bef1a /ppapi/tests/test_scrollbar.cc
parentc3cda1877dbcd1b56410bd4f1c2c862bbfc40b9d (diff)
downloadchromium_src-7f801d827de060e0bb88e266e6aa889ba3e14289.zip
chromium_src-7f801d827de060e0bb88e266e6aa889ba3e14289.tar.gz
chromium_src-7f801d827de060e0bb88e266e6aa889ba3e14289.tar.bz2
Reland http://codereview.chromium.org/7312008/
The only difference is I clear modifiers in Scrollbar test, and leave it enabled. Unrevert ppapi_tests change: Porting ppapi_tests framework to postMessage. Some tests still rely on scripting, so we changed to using InstancePrivate (since scripting will disappear from Instance soon). Also use conditional compilation so that if compiled as untrusted with NaCl, the tests use Instance instead of InstancePrivate. This means that tests which rely on scripting aren't runnable in NaCl. BUG=82606 TEST=these tests. Review URL: http://codereview.chromium.org/7237056 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@91912 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi/tests/test_scrollbar.cc')
-rw-r--r--ppapi/tests/test_scrollbar.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/ppapi/tests/test_scrollbar.cc b/ppapi/tests/test_scrollbar.cc
index fc5bd9d..973c51b 100644
--- a/ppapi/tests/test_scrollbar.cc
+++ b/ppapi/tests/test_scrollbar.cc
@@ -1,9 +1,11 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "ppapi/tests/test_scrollbar.h"
+#include <cstring>
+
#include "ppapi/c/pp_input_event.h"
#include "ppapi/cpp/instance.h"
#include "ppapi/cpp/rect.h"
@@ -31,7 +33,9 @@ std::string TestScrollbar::TestHandleEvent() {
scrollbar_.SetDocumentSize(10000);
PP_InputEvent event;
+ std::memset(&event, 0, sizeof(event));
event.type = PP_INPUTEVENT_TYPE_KEYDOWN;
+ event.u.key.modifier = 0;
event.u.key.key_code = 0x28; // VKEY_DOWN
scrollbar_.HandleEvent(event);