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

Side by Side Diff: content/public/android/javatests/src/org/chromium/content/browser/ContentViewReadbackTest.java

Issue 1021863005: Pass format as argument to getContentBitmapAsync. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add config parameter tp function header. Created 5 years, 8 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 unified diff | Download patch
« no previous file with comments | « content/public/android/java/src/org/chromium/content/browser/ContentReadbackHandler.java ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 package org.chromium.content.browser; 5 package org.chromium.content.browser;
6 6
7 import static org.chromium.base.test.util.ScalableTimeout.scaleTimeout; 7 import static org.chromium.base.test.util.ScalableTimeout.scaleTimeout;
8 8
9 import android.graphics.Bitmap; 9 import android.graphics.Bitmap;
10 import android.graphics.Color; 10 import android.graphics.Color;
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 public void onFinishGetBitmap(Bitmap bitmap) { 108 public void onFinishGetBitmap(Bitmap bitmap) {
109 assertNotNull("Readback did not return valid bitmap", bi tmap); 109 assertNotNull("Readback did not return valid bitmap", bi tmap);
110 // Verify a pixel in the center of the screenshot. 110 // Verify a pixel in the center of the screenshot.
111 color.set(bitmap.getPixel(bitmap.getWidth() / 2, bitmap. getHeight() / 2)); 111 color.set(bitmap.getPixel(bitmap.getWidth() / 2, bitmap. getHeight() / 2));
112 readbackDone.set(true); 112 readbackDone.set(true);
113 } 113 }
114 }; 114 };
115 115
116 contentReadbackHandler.initNativeContentReadbackHandler(); 116 contentReadbackHandler.initNativeContentReadbackHandler();
117 contentReadbackHandler.getContentBitmapAsync(1.0f, new Rect(), g etContentViewCore(), 117 contentReadbackHandler.getContentBitmapAsync(1.0f, new Rect(), g etContentViewCore(),
118 callback); 118 Bitmap.Config.ARGB_8888, callback);
119 } 119 }
120 }); 120 });
121 assertWaitForReadback(readbackDone); 121 assertWaitForReadback(readbackDone);
122 122
123 assertEqualColor(color.get(), Color.BLUE, COLOR_THRESHOLD); 123 assertEqualColor(color.get(), Color.BLUE, COLOR_THRESHOLD);
124 } 124 }
125 } 125 }
OLDNEW
« no previous file with comments | « content/public/android/java/src/org/chromium/content/browser/ContentReadbackHandler.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698