This repository contains the code necessary to reproduce and quantify the "Chrome stores memory that never will be released when taking a picture" issue, and is composed of 2 modules. The first is a simple webpage with a input html-field of type 'file', the second is a Java/Appium project to automatically interact with the webpage and reproduce the mentioned issue.
You need the following things properly installed on your machine:
git clone https://github.com/wdlb/chrome-pictures-storage-issue
- change into the new directory
- change into the 'memory-issue-page' directory
npm install
- import the 'memory-issue-reproduction'-module as a maven project into your preferred IDE
- change into the 'memory-issue-page' directory
node server.js
- connect your mobile device to your machine
- allow usb debugging
adb devices
to see if the device is connected and recognisedadb reverse tcp:8085 tcp:8085
- start the appium server
- run one of the test methods
- as long as the bug in Chromium/Chrome is not solved, the storage used by Chrome will go up with each picture, eventually causing the application to crash. This application allows you to automatically reproduce this behaviour.
Some devices have different UI layout and structure. To be able to run these tests with other devices, you can always extend the AbstractAndroidDevice class. Inspection of the UI and identification of the elements can be done using the 'uiautomatorviewer', contained in the Android SDK tools.