Tests we properly emit Page.downloadWillBegin. Downloading via a navigation: downloadWillBegin from top frame: { method : Page.downloadWillBegin params : { frameId : guid : suggestedFilename : hello.txt url : http://127.0.0.1:8000/devtools/network/resources/resource.php?download=1 } sessionId : } { method : Page.downloadProgress params : { guid : receivedBytes : state : inProgress totalBytes : 11 } sessionId : } { method : Page.downloadProgress params : { guid : receivedBytes : state : completed totalBytes : 11 } sessionId : } Downloading via a navigation of subframe: downloadWillBegin from child frame: { method : Page.downloadWillBegin params : { frameId : guid : suggestedFilename : hello.txt url : http://127.0.0.1:8000/devtools/network/resources/resource.php?download=1 } sessionId : } { method : Page.downloadProgress params : { guid : receivedBytes : state : inProgress totalBytes : 11 } sessionId : } { method : Page.downloadProgress params : { guid : receivedBytes : state : completed totalBytes : 11 } sessionId : } Downloading by clicking a link: downloadWillBegin from top frame: { method : Page.downloadWillBegin params : { frameId : guid : suggestedFilename : hello.text url : http://127.0.0.1:8000/devtools/network/resources/resource.php } sessionId : } { method : Page.downloadProgress params : { guid : receivedBytes : state : inProgress totalBytes : 11 } sessionId : } { method : Page.downloadProgress params : { guid : receivedBytes : state : completed totalBytes : 11 } sessionId : } Downloading by clicking a link in subframe: downloadWillBegin from child frame: { method : Page.downloadWillBegin params : { frameId : guid : suggestedFilename : hello.text url : http://127.0.0.1:8000/devtools/network/resources/resource.php } sessionId : } { method : Page.downloadProgress params : { guid : receivedBytes : state : inProgress totalBytes : 11 } sessionId : } { method : Page.downloadProgress params : { guid : receivedBytes : state : completed totalBytes : 11 } sessionId : } Downloading by clicking a link (no HTTP Content-Disposition header, a[download=""]): downloadWillBegin from top frame: { method : Page.downloadWillBegin params : { frameId : guid : suggestedFilename : download.zzz url : http://127.0.0.1:8000/devtools/network/resources/download.zzz } sessionId : } Downloading by clicking a link (HTTP Content-Disposition header with filename=foo.txt, no a[download]): downloadWillBegin from top frame: { method : Page.downloadWillBegin params : { frameId : guid : suggestedFilename : foo.txt url : http://127.0.0.1:8000/devtools/network/resources/resource.php?named_download=foo.txt } sessionId : } Downloading by clicking a link (HTTP Content-Disposition header with filename=override.txt, a[download="foo.txt"]): downloadWillBegin from top frame: { method : Page.downloadWillBegin params : { frameId : guid : suggestedFilename : override.txt url : http://127.0.0.1:8000/devtools/network/resources/resource.php?named_download=override.txt } sessionId : } Downloading by clicking a link (HTTP Content-Disposition header without filename, no a[download]): downloadWillBegin from top frame: { method : Page.downloadWillBegin params : { frameId : guid : suggestedFilename : resource.txt url : http://127.0.0.1:8000/devtools/network/resources/resource.php?named_download } sessionId : } Downloading by clicking a link (HTTP Content-Disposition header without filename, no a[download], js): downloadWillBegin from top frame: { method : Page.downloadWillBegin params : { frameId : guid : suggestedFilename : resource.js url : http://127.0.0.1:8000/devtools/network/resources/resource.php?named_download&type=js } sessionId : } Downloading by clicking a link (HTTP Content-Disposition header without filename, no a[download], image): downloadWillBegin from top frame: { method : Page.downloadWillBegin params : { frameId : guid : suggestedFilename : resource.png url : http://127.0.0.1:8000/devtools/network/resources/resource.php?named_download&type=image } sessionId : }