diff --git a/libs/gui/tests/SurfaceTextureClient_test.cpp b/libs/gui/tests/SurfaceTextureClient_test.cpp
index b576ca5..8546fb9 100644
--- a/libs/gui/tests/SurfaceTextureClient_test.cpp
+++ b/libs/gui/tests/SurfaceTextureClient_test.cpp
@@ -20,6 +20,7 @@
 #include <EGL/egl.h>
 #include <gtest/gtest.h>
 #include <gui/SurfaceTextureClient.h>
+#include <system/graphics.h>
 #include <utils/Log.h>
 #include <utils/Thread.h>
 
@@ -441,6 +442,68 @@
     ASSERT_EQ(OK, mANW->cancelBuffer(mANW.get(), buf[2]));
 }
 
+TEST_F(SurfaceTextureClientTest, SetPostTransformCropUntransforms) {
+    android_native_rect_t rect = {1, 5, 4, 14};
+    native_window_set_post_transform_crop(mANW.get(), &rect);
+
+    uint32_t xforms[] = {
+        HAL_TRANSFORM_FLIP_H,
+        HAL_TRANSFORM_FLIP_V,
+        HAL_TRANSFORM_ROT_90,
+        HAL_TRANSFORM_ROT_180,
+        HAL_TRANSFORM_ROT_270,
+    };
+
+    Rect expectedRects[] = {
+        Rect(4, 5, 7, 14), // HAL_TRANSFORM_FLIP_H
+        Rect(1, 2, 4, 11), // HAL_TRANSFORM_FLIP_V
+        Rect(5, 4, 14, 7), // HAL_TRANSFORM_ROT_90
+        Rect(4, 2, 7, 11), // HAL_TRANSFORM_ROT_180
+        Rect(2, 1, 11, 4), // HAL_TRANSFORM_ROT_270
+    };
+
+    for (size_t i = 0; i < sizeof(xforms)/sizeof(xforms[0]); i++) {
+        SCOPED_TRACE(String8::format("xform=%#x", xforms[i]).string());
+
+        int w = 8, h = 16;
+        if (xforms[i] & HAL_TRANSFORM_ROT_90) {
+            w = 16;
+            h = 8;
+        }
+        ASSERT_EQ(OK, native_window_set_buffers_transform(mANW.get(), xforms[i]));
+        ASSERT_EQ(OK, native_window_set_buffers_dimensions(mANW.get(), w, h));
+
+        android_native_buffer_t* buf;
+        ASSERT_EQ(OK, mANW->dequeueBuffer(mANW.get(), &buf));
+        ASSERT_EQ(OK, mANW->queueBuffer(mANW.get(), buf));
+        ASSERT_EQ(OK, mST->updateTexImage());
+
+        Rect crop = mST->getCurrentCrop();
+        EXPECT_EQ(expectedRects[i].left, crop.left);
+        EXPECT_EQ(expectedRects[i].top, crop.top);
+        EXPECT_EQ(expectedRects[i].right, crop.right);
+        EXPECT_EQ(expectedRects[i].bottom, crop.bottom);
+    }
+}
+
+TEST_F(SurfaceTextureClientTest, SetCropCropsCrop) {
+    android_native_rect_t rect = {-2, -13, 40, 18};
+    native_window_set_crop(mANW.get(), &rect);
+
+    ASSERT_EQ(OK, native_window_set_buffers_dimensions(mANW.get(), 4, 4));
+
+    android_native_buffer_t* buf;
+    ASSERT_EQ(OK, mANW->dequeueBuffer(mANW.get(), &buf));
+    ASSERT_EQ(OK, mANW->queueBuffer(mANW.get(), buf));
+    ASSERT_EQ(OK, mST->updateTexImage());
+
+    Rect crop = mST->getCurrentCrop();
+    EXPECT_EQ(0, crop.left);
+    EXPECT_EQ(0, crop.top);
+    EXPECT_EQ(4, crop.right);
+    EXPECT_EQ(4, crop.bottom);
+}
+
 // XXX: This is not expected to pass until the synchronization hacks are removed
 // from the SurfaceTexture class.
 TEST_F(SurfaceTextureClientTest, DISABLED_SurfaceTextureSyncModeWaitRetire) {
diff --git a/libs/gui/tests/SurfaceTexture_test.cpp b/libs/gui/tests/SurfaceTexture_test.cpp
index cff4476..d708f6d 100644
--- a/libs/gui/tests/SurfaceTexture_test.cpp
+++ b/libs/gui/tests/SurfaceTexture_test.cpp
@@ -1262,28 +1262,6 @@
     native_window_api_disconnect(mANW.get(), NATIVE_WINDOW_API_CPU);
 }
 
-TEST_F(SurfaceTextureGLTest, GetCurrentActiveRectWorks) {
-    ASSERT_EQ(OK, mST->setSynchronousMode(true));
-
-    ASSERT_EQ(OK, native_window_api_connect(mANW.get(),
-            NATIVE_WINDOW_API_CPU));
-
-    ANativeWindowBuffer *anb;
-
-    android_native_rect_t odd = {23, 78, 123, 477};
-    ASSERT_EQ(OK, native_window_set_active_rect(mANW.get(), &odd));
-    EXPECT_EQ (OK, mANW->dequeueBuffer(mANW.get(), &anb));
-    EXPECT_EQ(OK, mANW->queueBuffer(mANW.get(), anb));
-    mFW->waitForFrame();
-    EXPECT_EQ(OK,mST->updateTexImage());
-    Rect r = mST->getCurrentCrop();
-    assertRectEq(Rect(23, 78, 123, 477), r);
-
-    ASSERT_EQ(OK, native_window_api_disconnect(mANW.get(),
-            NATIVE_WINDOW_API_CPU));
-}
-
-
 TEST_F(SurfaceTextureGLTest, AbandonUnblocksDequeueBuffer) {
     class ProducerThread : public Thread {
     public:
