Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | |
|
tkent
2016/03/14 00:06:33
2014 -> 2016
| |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #include "core/html/HTMLAnchorElement.h" | |
| 6 | |
| 7 #include "core/dom/Document.h" | |
| 8 #include "core/events/Event.h" | |
| 9 #include "core/events/MouseEvent.h" | |
| 10 #include "core/testing/DummyPageHolder.h" | |
| 11 #include "testing/gtest/include/gtest/gtest.h" | |
| 12 | |
| 13 namespace blink { | |
| 14 | |
| 15 TEST(HTMLAnchorElementTest, getClampedPointFromEventWithNull) | |
| 16 { | |
| 17 IntPoint clampedPoint; | |
| 18 bool success = HTMLAnchorElement::getClampedPointFromEvent(clampedPoint, nul lptr); | |
| 19 EXPECT_EQ(success, false); | |
| 20 } | |
| 21 | |
| 22 TEST(HTMLAnchorElementTest, getClampedPointFromEventWithEmptyMouseEvent) | |
| 23 { | |
| 24 IntPoint clampedPoint; | |
| 25 RefPtrWillBeRawPtr<MouseEvent> event = MouseEvent::create(); | |
| 26 bool success = HTMLAnchorElement::getClampedPointFromEvent(clampedPoint, eve nt); | |
| 27 EXPECT_EQ(success, false); | |
| 28 } | |
| 29 | |
| 30 TEST(HTMLAnchorElementTest, appendServerMapMousePosition) | |
| 31 { | |
| 32 StringBuilder url; | |
| 33 IntPoint clampedPoint(20, 20); | |
| 34 HTMLAnchorElement::appendServerMapMousePosition(url, clampedPoint); | |
| 35 EXPECT_EQ(url.toString(), "?20,20"); | |
| 36 } | |
| 37 | |
| 38 } // namespace blink | |
| OLD | NEW |