Skip to content

Commit

Permalink
Merge pull request google#11 from hjkeller16:master
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 456751472
Change-Id: I944b060e60068dbb3eaa7536ae7120102159067d
  • Loading branch information
copybara-github committed Jun 23, 2022
2 parents 10bedea + f84402d commit 610ae6c
Show file tree
Hide file tree
Showing 5 changed files with 63 additions and 0 deletions.
4 changes: 4 additions & 0 deletions blueprints/utils/resources/expected-results.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@
"/html/misc/string/dot-slash-prefix.found",
"/html/misc/string/url-string.found",
"/html/misc/string/string-known-extension.pdf",
"/javascript/misc/automatic-post.found",
"/javascript/misc/comment.found",
"/javascript/misc/string-variable.found",
"/javascript/misc/string-concat-variable.found",
Expand All @@ -71,6 +72,9 @@
"/javascript/frameworks/polymer/polymer-router.found",
"/javascript/frameworks/react/route-path.found",
"/javascript/frameworks/react/index.html/search.found",
"/javascript/interactive/js-delete.found",
"/javascript/interactive/js-post.found",
"/javascript/interactive/js-put.found",
"/misc/known-files/robots.txt.found",
"/misc/known-files/sitemap.xml.found"
]
15 changes: 15 additions & 0 deletions test-cases/javascript/interactive/js-delete.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CrawlMaze - Testbed for Web Crawlers - form tag</title>
<h1> DELETE method from JavaScript </h1>
<input type="button" onClick="myFunction()" id = 'btn' value="Submit">
<p>
The DELETE request is sent via JavaScript fetch when the button is clicked.
</p>

<script>
function myFunction(){
var data = new FormData(document.getElementById("form"));
fetch("/test/javascript/interactive/js-delete.found", {method: "DELETE",body:data});
}
</script>
14 changes: 14 additions & 0 deletions test-cases/javascript/interactive/js-post.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CrawlMaze - Testbed for Web Crawlers - form tag</title>
<h1> POST method from JavaScript </h1>
<input type="button" onClick="myFunction()" id = 'btn' value="Submit">
<p>
The POST request is sent via JavaScript fetch when the button is clicked.
</p>

<script>
function myFunction(){
fetch("/test/javascript/interactive/js-post.found", {method: "POST"});
}
</script>
14 changes: 14 additions & 0 deletions test-cases/javascript/interactive/js-put.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CrawlMaze - Testbed for Web Crawlers - form tag</title>
<h1> PUT method from JavaScript </h1>
<input type="button" onClick="myFunction()" id = 'btn' value="Submit">
<p>
The PUT request is sent via JavaScript fetch when the button is clicked.
</p>

<script>
function myFunction(){
fetch("/test/javascript/interactive/js-put.found", {method: "PUT"});
}
</script>
16 changes: 16 additions & 0 deletions test-cases/javascript/misc/automatic-post.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<!DOCTYPE html>
<meta charset="utf-8">
<body >
<title>CrawlMaze - Testbed for Web Crawlers - form tag</title>
<h1> Automatic POST </h1>
<p>
A POST request is automatically sent five seconds after opening the page.
</p>
</body>

<script>
setTimeout(function() {
fetch("/test/javascript/misc/automatic-post.found", {method: "POST"});
}, 5000)
</script>

0 comments on commit 610ae6c

Please sign in to comment.