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

Unified Diff: Source/core/html/canvas/CanvasRenderingContext2DAPITest.cpp

Issue 1224443003: Copy line dashes when copying/assigning CanvasRenderingContext2DState (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 6 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 | « no previous file | Source/core/html/canvas/CanvasRenderingContext2DState.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/canvas/CanvasRenderingContext2DAPITest.cpp
diff --git a/Source/core/html/canvas/CanvasRenderingContext2DAPITest.cpp b/Source/core/html/canvas/CanvasRenderingContext2DAPITest.cpp
index d30048f9ac5af6d980780451860a769c43e6e91f..b37bfa6fed29783b169395b505d5bb0359eb37da 100644
--- a/Source/core/html/canvas/CanvasRenderingContext2DAPITest.cpp
+++ b/Source/core/html/canvas/CanvasRenderingContext2DAPITest.cpp
@@ -174,6 +174,24 @@ TEST_F(CanvasRenderingContext2DAPITest, DefaultAttributeValues)
EXPECT_EQ(String("rgba(0, 0, 0, 0)"), context2d()->shadowColor());
}
+TEST_F(CanvasRenderingContext2DAPITest, LineDashStateSave)
+{
+ createContext(NonOpaque);
+
+ Vector<float> simpleDash;
+ simpleDash.append(4);
+ simpleDash.append(2);
+
+ context2d()->setLineDash(simpleDash);
+ EXPECT_EQ(simpleDash, context2d()->getLineDash());
+ context2d()->save();
+ // Realize the save.
+ context2d()->scale(2, 2);
+ EXPECT_EQ(simpleDash, context2d()->getLineDash());
+ context2d()->restore();
+ EXPECT_EQ(simpleDash, context2d()->getLineDash());
+}
+
TEST_F(CanvasRenderingContext2DAPITest, CreateImageData)
{
createContext(NonOpaque);
« no previous file with comments | « no previous file | Source/core/html/canvas/CanvasRenderingContext2DState.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698