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

Unified Diff: third_party/WebKit/Source/web/tests/WebRangeTest.cpp

Issue 2385643002: Add WebRange test for explicit empty ranges creation. (Closed)
Patch Set: Rebase and cl format. Created 4 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/Source/web/BUILD.gn ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/web/tests/WebRangeTest.cpp
diff --git a/third_party/WebKit/Source/core/animation/animatable/AnimatableNeutralTest.cpp b/third_party/WebKit/Source/web/tests/WebRangeTest.cpp
similarity index 84%
copy from third_party/WebKit/Source/core/animation/animatable/AnimatableNeutralTest.cpp
copy to third_party/WebKit/Source/web/tests/WebRangeTest.cpp
index b9f85c3d0d0c01da09afe26409230fdd8ee15d26..9bffda58fe598631eece27e850a74d9c15a6b0cd 100644
--- a/third_party/WebKit/Source/core/animation/animatable/AnimatableNeutralTest.cpp
+++ b/third_party/WebKit/Source/web/tests/WebRangeTest.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, Google Inc. All rights reserved.
+ * Copyright (C) 2017 Google Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
@@ -28,14 +28,20 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include "core/animation/animatable/AnimatableNeutral.h"
+#include "public/web/WebRange.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace blink {
-TEST(AnimationAnimatableNeutralTest, Create) {
- EXPECT_TRUE(AnimatableValue::neutralValue());
+TEST(WebRangeTest, Empty) {
+ WebRange empty1(0, 0);
+ EXPECT_FALSE(empty1.isNull());
+ EXPECT_TRUE(empty1.isEmpty());
+
+ WebRange empty2(57, 0);
+ EXPECT_FALSE(empty2.isNull());
+ EXPECT_TRUE(empty2.isEmpty());
}
} // namespace blink
« no previous file with comments | « third_party/WebKit/Source/web/BUILD.gn ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698