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

Unified Diff: chrome/android/javatests/src/org/chromium/chrome/browser/ContentViewTest.java

Issue 473253002: Merge 283159 "[Android] Extend smart clip to return html along w..." (Closed) Base URL: svn://svn.chromium.org/chrome/branches/2062/src/
Patch Set: Created 6 years, 4 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 | content/browser/android/content_view_core_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/android/javatests/src/org/chromium/chrome/browser/ContentViewTest.java
===================================================================
--- chrome/android/javatests/src/org/chromium/chrome/browser/ContentViewTest.java (revision 289886)
+++ chrome/android/javatests/src/org/chromium/chrome/browser/ContentViewTest.java (working copy)
@@ -4,6 +4,7 @@
package org.chromium.chrome.browser;
+import android.graphics.Rect;
import android.os.Bundle;
import android.os.Handler;
import android.os.HandlerThread;
@@ -33,14 +34,32 @@
return mUrl;
}
- public void notifyCalled(String title, String url) {
+ public String getText() {
+ return mText;
+ }
+
+ public String getHtml() {
+ return mHtml;
+ }
+
+ public Rect getRect() {
+ return mRect;
+ }
+
+ public void notifyCalled(String title, String url, String text, String html, Rect rect) {
mTitle = title;
mUrl = url;
+ mText = text;
+ mHtml = html;
+ mRect = rect;
super.notifyCalled();
}
private String mTitle;
private String mUrl;
+ private String mText;
+ private String mHtml;
+ private Rect mRect;
}
private ChromeShellActivity mActivity;
@@ -74,8 +93,11 @@
assertNotNull(bundle);
String url = bundle.getString("url");
String title = bundle.getString("title");
+ String text = bundle.getString("text");
+ String html = bundle.getString("html");
+ Rect rect = bundle.getParcelable("rect");
// We don't care about other values for now.
- mCallbackHelper.notifyCalled(title, url);
+ mCallbackHelper.notifyCalled(title, url, text, html, rect);
return true;
}
@@ -92,7 +114,10 @@
}
});
mCallbackHelper.waitForCallback(0, 1); // call count: 0 --> 1
- assertNotNull("about:blank", mCallbackHelper.getTitle());
- assertNotNull("about:blank", mCallbackHelper.getUrl());
+ assertEquals("about:blank", mCallbackHelper.getTitle());
+ assertEquals("about:blank", mCallbackHelper.getUrl());
+ assertNotNull(mCallbackHelper.getText());
+ assertNotNull(mCallbackHelper.getHtml());
+ assertNotNull(mCallbackHelper.getRect());
}
}
« no previous file with comments | « no previous file | content/browser/android/content_view_core_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698