Merge change 6665 into donut

* changes:
  Fix resources not being set correctly.
diff --git a/core/jni/android_backup_BackupDataOutput.cpp b/core/jni/android_backup_BackupDataOutput.cpp
index d02590e..ce30aaa8 100644
--- a/core/jni/android_backup_BackupDataOutput.cpp
+++ b/core/jni/android_backup_BackupDataOutput.cpp
@@ -70,7 +70,7 @@
     int err;
     BackupDataWriter* writer = (BackupDataWriter*)w;
 
-    if (env->GetArrayLength(data) > size) {
+    if (env->GetArrayLength(data) < size) {
         // size mismatch
         return -1;
     }
diff --git a/tests/DumpRenderTree/src/com/android/dumprendertree/LoadTestsAutoTest.java b/tests/DumpRenderTree/src/com/android/dumprendertree/LoadTestsAutoTest.java
index cbcac6c..39bbf16 100644
--- a/tests/DumpRenderTree/src/com/android/dumprendertree/LoadTestsAutoTest.java
+++ b/tests/DumpRenderTree/src/com/android/dumprendertree/LoadTestsAutoTest.java
@@ -72,6 +72,7 @@
         // Run tests
         runTestAndWaitUntilDone(activity, runner.mTestPath, runner.mTimeoutInMillis);
 
+        activity.clearCache();
         dumpMemoryInfo();
 
         // Kill activity
diff --git a/tests/DumpRenderTree/src/com/android/dumprendertree/TestShellActivity.java b/tests/DumpRenderTree/src/com/android/dumprendertree/TestShellActivity.java
index 0d22eca..09f7cbc 100644
--- a/tests/DumpRenderTree/src/com/android/dumprendertree/TestShellActivity.java
+++ b/tests/DumpRenderTree/src/com/android/dumprendertree/TestShellActivity.java
@@ -87,6 +87,10 @@
         }
     }
 
+    public void clearCache() {
+      mWebView.clearCache(true);
+    }
+
     @Override
     protected void onCreate(Bundle icicle) {
         super.onCreate(icicle);