summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormbelshe@google.com <mbelshe@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-17 21:15:13 +0000
committermbelshe@google.com <mbelshe@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-17 21:15:13 +0000
commitbb626d9f75c7c33fbcb4ca3ff0d913937b42d45e (patch)
tree5a534f0c312a1ddb5e50474f50a85b1a09defe67
parentfa30cf0307ba48b538cd5e2561b7fd8419a54ff0 (diff)
downloadchromium_src-bb626d9f75c7c33fbcb4ca3ff0d913937b42d45e.zip
chromium_src-bb626d9f75c7c33fbcb4ca3ff0d913937b42d45e.tar.gz
chromium_src-bb626d9f75c7c33fbcb4ca3ff0d913937b42d45e.tar.bz2
UI Changes for benchmark:
a) Remove the "Config" button; instead, the configuration is always just applied to a run. b) Make the clear button work properly Put in UI when there are no results to display. BUG=none TEST=none Review URL: http://codereview.chromium.org/397025 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@32207 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/common/extensions/docs/examples/extensions/benchmark/options.html16
1 files changed, 11 insertions, 5 deletions
diff --git a/chrome/common/extensions/docs/examples/extensions/benchmark/options.html b/chrome/common/extensions/docs/examples/extensions/benchmark/options.html
index dcc1ff2..99a7dcd 100644
--- a/chrome/common/extensions/docs/examples/extensions/benchmark/options.html
+++ b/chrome/common/extensions/docs/examples/extensions/benchmark/options.html
@@ -215,6 +215,7 @@ function run() {
// Clear the results
function clearResults() {
var extension = chrome.extension.getBackgroundPage();
+ extension.results = {};
extension.results.data = new Array();
jsinit();
}
@@ -233,14 +234,15 @@ function clearResults() {
<input type="button" value="Clear Results" onclick="clearResults();">
Clear Connections?<input id="clearconns" type="checkbox">
Clear Cache?<input id="clearcache" type="checkbox">
-<input type="button" value="OK" onclick="config();"><P>
-URL to load <input type="text" id="testurl" size=100>
-<input type="button" value="Run" onclick="run();"><P>
+<form onsubmit="config(); run()">
+ URL to load <input type="text" id="testurl" size=100>
+ <input type="submit" value="Run"><P>
+</form>
<p>
<h1>Results</h1>
-<table class="list" width="100%">
+<table id="t" class="list" width="100%">
<tr>
<th width=30%>url</th>
<th width=50>doc load mean</th>
@@ -256,7 +258,7 @@ URL to load <input type="text" id="testurl" size=100>
<th samples</th>
</tr>
- <tr id="t" jsselect="data">
+ <tr jsselect="data">
<td class="url" jseval="$width = getWidth($this.mean, 600)"><div jsvalues=".style.width:$width" class="bggraph"><a jsvalues="href:$this.url" jscontent="url"></a></div></td>
<td class="avg" jscontent="docLoadMean"></td>
<td class="avg" jscontent="paintMean"></td>
@@ -270,6 +272,10 @@ URL to load <input type="text" id="testurl" size=100>
<td class="avg" jscontent="writebps"></td>
<td class="data"><span jsselect="totalResults"><span jscontent="$this"></span>,</span> </td>
</tr>
+ <tr jsdisplay="data.length == 0">
+ <td colspan=11>No tests have been run yet.</td>
+ </tr>
+ </div>
</table>
<script>