@Test public void testDownloadContent() { ResolveInfo resolverInfo = new ResolveInfo(); resolverInfo.activityInfo = new ActivityInfo(); resolverInfo.activityInfo.applicationInfo = new ApplicationInfo(); resolverInfo.activityInfo.applicationInfo.packageName = ListActivity.class.getPackage().getName(); resolverInfo.activityInfo.name = ListActivity.class.getName(); ShadowPackageManager rpm = shadowOf(RuntimeEnvironment.application.getPackageManager()); final String url = "http: rpm.addResolveInfoForIntent(new Intent(Intent.ACTION_VIEW, Uri.parse(url)), resolverInfo); WebView webView = activity.findViewById(R.id.web_view); ShadowWebView shadowWebView = Shadow.extract(webView); when(item.getUrl()).thenReturn(url); shadowWebView.getDownloadListener().onDownloadStart(url, "", "", "", 0L); assertThat((View) activity.findViewById(R.id.empty)).isVisible(); activity.findViewById(R.id.download_button).performClick(); assertNotNull(shadowOf(activity).getNextStartedActivity()); }
private void parse() { mProgressBar.setProgress(DEFAULT_PROGRESS); mReadabilityClient.parse(mItem.getId(), mItem.getUrl(), new ReadabilityCallback(this)); }
WebFragment extends LazyLoadFragment implements Scrollable, KeyDelegate.BackInterceptor { private void parse() { mProgressBar.setProgress(DEFAULT_PROGRESS); mReadabilityClient.parse(mItem.getId(), mItem.getUrl(), new ReadabilityCallback(this)); } }
WebFragment extends LazyLoadFragment implements Scrollable, KeyDelegate.BackInterceptor { private void parse() { mProgressBar.setProgress(DEFAULT_PROGRESS); mReadabilityClient.parse(mItem.getId(), mItem.getUrl(), new ReadabilityCallback(this)); }  }
WebFragment extends LazyLoadFragment implements Scrollable, KeyDelegate.BackInterceptor { private void parse() { mProgressBar.setProgress(DEFAULT_PROGRESS); mReadabilityClient.parse(mItem.getId(), mItem.getUrl(), new ReadabilityCallback(this)); }  @Override void onAttach(Context context); @Override void onCreate(@Nullable Bundle savedInstanceState); @Override View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState); @Override void onViewCreated(View view, @Nullable Bundle savedInstanceState); @Override boolean onOptionsItemSelected(MenuItem item); @Override void onResume(); @Override void onStop(); @Override void onSaveInstanceState(Bundle outState); @Override void onDestroy(); @Override void onDetach(); @Override void scrollToTop(); @Override boolean scrollToNext(); @Override boolean scrollToPrevious(); @Override boolean onBackPressed(); }
WebFragment extends LazyLoadFragment implements Scrollable, KeyDelegate.BackInterceptor { private void parse() { mProgressBar.setProgress(DEFAULT_PROGRESS); mReadabilityClient.parse(mItem.getId(), mItem.getUrl(), new ReadabilityCallback(this)); }  @Override void onAttach(Context context); @Override void onCreate(@Nullable Bundle savedInstanceState); @Override View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState); @Override void onViewCreated(View view, @Nullable Bundle savedInstanceState); @Override boolean onOptionsItemSelected(MenuItem item); @Override void onResume(); @Override void onStop(); @Override void onSaveInstanceState(Bundle outState); @Override void onDestroy(); @Override void onDetach(); @Override void scrollToTop(); @Override boolean scrollToNext(); @Override boolean scrollToPrevious(); @Override boolean onBackPressed(); static final String EXTRA_ITEM; static final String PDF_LOADER_URL; }