Liver cancer is usually diagnosed by tests (such as a biopsy) to determine if there are any abnormal cells in the liver. The doctor will ask about your medical history, including risk factors such as previous lung or other cancers.