diff options
author | jochen@chromium.org <jochen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-01-17 13:56:10 +0000 |
---|---|---|
committer | jochen@chromium.org <jochen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-01-17 13:56:10 +0000 |
commit | 024b2f209c4fe8d7352b311605d076f74f9f6bb5 (patch) | |
tree | 23cdb3812ca109475a2345f27af43feed7f4cdcc /content/shell/resources/shell_devtools_discovery_page.html | |
parent | 237b4a5506a94a6c8981c26cb5fb91ecf01d5576 (diff) | |
download | chromium_src-024b2f209c4fe8d7352b311605d076f74f9f6bb5.zip chromium_src-024b2f209c4fe8d7352b311605d076f74f9f6bb5.tar.gz chromium_src-024b2f209c4fe8d7352b311605d076f74f9f6bb5.tar.bz2 |
[content shell] use test shell's broken image resources for layout tests
BUG=111316
TEST=e.g. compositing/color-matching/pdf-image-match.html passes
R=marja@chromium.org
Review URL: https://codereview.chromium.org/11946045
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@177403 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/shell/resources/shell_devtools_discovery_page.html')
-rw-r--r-- | content/shell/resources/shell_devtools_discovery_page.html | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/content/shell/resources/shell_devtools_discovery_page.html b/content/shell/resources/shell_devtools_discovery_page.html new file mode 100644 index 0000000..9aa4c30 --- /dev/null +++ b/content/shell/resources/shell_devtools_discovery_page.html @@ -0,0 +1,54 @@ +<html> +<head> +<title>Content shell remote debugging</title> +<style> +</style> + +<script> +function onLoad() { + var tabs_list_request = new XMLHttpRequest(); + tabs_list_request.open("GET", "/json/list?t=" + new Date().getTime(), true); + tabs_list_request.onreadystatechange = onReady; + tabs_list_request.send(); +} + +function onReady() { + if(this.readyState == 4 && this.status == 200) { + if(this.response != null) + var responseJSON = JSON.parse(this.response); + for (var i = 0; i < responseJSON.length; ++i) + appendItem(responseJSON[i]); + } +} + +function appendItem(item_object) { + var frontend_ref; + if (item_object.devtoolsFrontendUrl) { + frontend_ref = document.createElement("a"); + frontend_ref.href = item_object.devtoolsFrontendUrl; + frontend_ref.title = item_object.title; + } else { + frontend_ref = document.createElement("div"); + frontend_ref.title = "The tab already has active debugging session"; + } + + var text = document.createElement("div"); + if (item_object.title) + text.innerText = item_object.title; + else + text.innerText = "(untitled tab)"; + text.style.cssText = "background-image:url(" + item_object.faviconUrl + ")"; + frontend_ref.appendChild(text); + + var item = document.createElement("p"); + item.appendChild(frontend_ref); + + document.getElementById("items").appendChild(item); +} +</script> +</head> +<body onload='onLoad()'> + <div id='caption'>Inspectable WebContents</div> + <div id='items'></div> +</body> +</html> |