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

Side by Side Diff: Source/web/tests/WebInputEventConversionTest.cpp

Issue 434683002: Remove KeyboardEvent.altGraphKey (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 4 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 | « Source/core/page/EventHandler.cpp ('k') | 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 /* 1 /*
2 * Copyright (C) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 #include "web/tests/URLTestHelpers.h" 50 #include "web/tests/URLTestHelpers.h"
51 #include <gtest/gtest.h> 51 #include <gtest/gtest.h>
52 52
53 using namespace blink; 53 using namespace blink;
54 using namespace blink; 54 using namespace blink;
55 55
56 namespace { 56 namespace {
57 57
58 PassRefPtrWillBeRawPtr<blink::KeyboardEvent> createKeyboardEventWithLocation(bli nk::KeyboardEvent::KeyLocationCode location) 58 PassRefPtrWillBeRawPtr<blink::KeyboardEvent> createKeyboardEventWithLocation(bli nk::KeyboardEvent::KeyLocationCode location)
59 { 59 {
60 return blink::KeyboardEvent::create("keydown", true, true, 0, "", location, false, false, false, false, false); 60 return blink::KeyboardEvent::create("keydown", true, true, 0, "", location, false, false, false, false);
61 } 61 }
62 62
63 int getModifiersForKeyLocationCode(blink::KeyboardEvent::KeyLocationCode locatio n) 63 int getModifiersForKeyLocationCode(blink::KeyboardEvent::KeyLocationCode locatio n)
64 { 64 {
65 RefPtrWillBeRawPtr<blink::KeyboardEvent> event = createKeyboardEventWithLoca tion(location); 65 RefPtrWillBeRawPtr<blink::KeyboardEvent> event = createKeyboardEventWithLoca tion(location);
66 blink::WebKeyboardEventBuilder convertedEvent(*event); 66 blink::WebKeyboardEventBuilder convertedEvent(*event);
67 return convertedEvent.modifiers; 67 return convertedEvent.modifiers;
68 } 68 }
69 69
70 TEST(WebInputEventConversionTest, WebKeyboardEventBuilder) 70 TEST(WebInputEventConversionTest, WebKeyboardEventBuilder)
(...skipping 516 matching lines...) Expand 10 before | Expand all | Expand 10 after
587 587
588 PlatformTouchEventBuilder platformTouchBuilder(view, webTouchEvent); 588 PlatformTouchEventBuilder platformTouchBuilder(view, webTouchEvent);
589 EXPECT_FLOAT_EQ(10.6f, platformTouchBuilder.touchPoints()[0].screenPos() .x()); 589 EXPECT_FLOAT_EQ(10.6f, platformTouchBuilder.touchPoints()[0].screenPos() .x());
590 EXPECT_FLOAT_EQ(10.4f, platformTouchBuilder.touchPoints()[0].screenPos() .y()); 590 EXPECT_FLOAT_EQ(10.4f, platformTouchBuilder.touchPoints()[0].screenPos() .y());
591 EXPECT_FLOAT_EQ(5.3f + pinchOffset.x(), platformTouchBuilder.touchPoints ()[0].pos().x()); 591 EXPECT_FLOAT_EQ(5.3f + pinchOffset.x(), platformTouchBuilder.touchPoints ()[0].pos().x());
592 EXPECT_FLOAT_EQ(5.2f + pinchOffset.y(), platformTouchBuilder.touchPoints ()[0].pos().y()); 592 EXPECT_FLOAT_EQ(5.2f + pinchOffset.y(), platformTouchBuilder.touchPoints ()[0].pos().y());
593 } 593 }
594 } 594 }
595 595
596 } // anonymous namespace 596 } // anonymous namespace
OLDNEW
« no previous file with comments | « Source/core/page/EventHandler.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698