The Government of India Act of 1935 promised some form of representative government, and the Congress won the provincial elections of 1937 and formed ministries in most provinces. Two years later, in September 1939, the Second World War broke out.
Gandhi and Nehru had been strongly critical of Hitler and the Nazis. They offered Congress support for the war effort if Britain promised to grant India independence once the war ended. The offer was refused, and the Congress ministries resigned in October 1939. Through 1940 and 1941 the Congress ran a series of individual satyagrahas to press the British to promise freedom after the war.
Meanwhile, in March 1940, the Muslim League passed a resolution demanding a measure of autonomy for the Muslim-majority areas of the subcontinent. NCERT's Class XII book says politics had become a three-way struggle between the Congress, the League and the British.