cef/tests/cefclient/resources/urlrequest.html
Marshall Greenblatt 7a2ce64096 Fix issues related to request and context object lifespan (issue #1037, issue #1044).
- Simplify and document the relationship between the various context object types. See browser_context.h for a description of the new relationships.
- cefclient: Add `request-context-per-browser` command-line flag for testing multiple CefRequestContext instances.
- cefclient: Add a CefURLRequest example.

git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@2032 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
2015-02-13 23:17:08 +00:00

28 lines
869 B
HTML

<html>
<body bgcolor="white">
<script language="JavaScript">
// Send a query to the browser process.
function execURLRequest() {
document.getElementById('ta').value = 'Request pending...';
// Results in a call to the OnQuery method in urlrequest_test.cpp
window.cefQuery({
request: 'URLRequestTest:' + document.getElementById("url").value,
onSuccess: function(response) {
document.getElementById('ta').value = response;
},
onFailure: function(error_code, error_message) {
document.getElementById('ta').value = 'Failed with error ' + error_message + ' (' + error_code + ')';
}
});
}
</script>
<form>
URL: <input type="text" id="url" value="http://www.google.com">
<br/><input type="button" onclick="execURLRequest();" value="Execute CefURLRequest">
<br/><textarea rows="10" cols="40" id="ta"></textarea>
</form>
</body>
</html>