OLD | NEW |
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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 #include "core/page/Page.h" | 44 #include "core/page/Page.h" |
45 #include "core/rendering/RenderView.h" | 45 #include "core/rendering/RenderView.h" |
46 #include "core/testing/URLTestHelpers.h" | 46 #include "core/testing/URLTestHelpers.h" |
47 #include "public/web/WebFrame.h" | 47 #include "public/web/WebFrame.h" |
48 #include "public/web/WebSettings.h" | 48 #include "public/web/WebSettings.h" |
49 #include "web/WebViewImpl.h" | 49 #include "web/WebViewImpl.h" |
50 #include "web/tests/FrameTestHelpers.h" | 50 #include "web/tests/FrameTestHelpers.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; | |
55 | 54 |
56 namespace { | 55 namespace { |
57 | 56 |
58 PassRefPtrWillBeRawPtr<blink::KeyboardEvent> createKeyboardEventWithLocation(bli
nk::KeyboardEvent::KeyLocationCode location) | 57 PassRefPtrWillBeRawPtr<blink::KeyboardEvent> createKeyboardEventWithLocation(bli
nk::KeyboardEvent::KeyLocationCode location) |
59 { | 58 { |
60 return blink::KeyboardEvent::create("keydown", true, true, 0, "", location,
false, false, false, false); | 59 return blink::KeyboardEvent::create("keydown", true, true, 0, "", location,
false, false, false, false); |
61 } | 60 } |
62 | 61 |
63 int getModifiersForKeyLocationCode(blink::KeyboardEvent::KeyLocationCode locatio
n) | 62 int getModifiersForKeyLocationCode(blink::KeyboardEvent::KeyLocationCode locatio
n) |
64 { | 63 { |
(...skipping 522 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
587 | 586 |
588 PlatformTouchEventBuilder platformTouchBuilder(view, webTouchEvent); | 587 PlatformTouchEventBuilder platformTouchBuilder(view, webTouchEvent); |
589 EXPECT_FLOAT_EQ(10.6f, platformTouchBuilder.touchPoints()[0].screenPos()
.x()); | 588 EXPECT_FLOAT_EQ(10.6f, platformTouchBuilder.touchPoints()[0].screenPos()
.x()); |
590 EXPECT_FLOAT_EQ(10.4f, platformTouchBuilder.touchPoints()[0].screenPos()
.y()); | 589 EXPECT_FLOAT_EQ(10.4f, platformTouchBuilder.touchPoints()[0].screenPos()
.y()); |
591 EXPECT_FLOAT_EQ(5.3f + pinchOffset.x(), platformTouchBuilder.touchPoints
()[0].pos().x()); | 590 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()); | 591 EXPECT_FLOAT_EQ(5.2f + pinchOffset.y(), platformTouchBuilder.touchPoints
()[0].pos().y()); |
593 } | 592 } |
594 } | 593 } |
595 | 594 |
596 } // anonymous namespace | 595 } // anonymous namespace |
OLD | NEW |