summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--chrome/browser/resources/net_internals/capture_view.html14
-rw-r--r--chrome/browser/resources/net_internals/capture_view.js14
-rw-r--r--chrome/browser/resources/net_internals/export_view.html10
-rw-r--r--chrome/browser/resources/net_internals/export_view.js12
-rw-r--r--chrome/browser/resources/net_internals/import_view.html12
-rw-r--r--chrome/browser/resources/net_internals/import_view.js26
-rw-r--r--chrome/browser/resources/net_internals/index.html2
-rw-r--r--chrome/browser/resources/net_internals/index.js4
-rw-r--r--chrome/browser/resources/net_internals/main.css6
9 files changed, 53 insertions, 47 deletions
diff --git a/chrome/browser/resources/net_internals/capture_view.html b/chrome/browser/resources/net_internals/capture_view.html
index 18987e8..3aaee18 100644
--- a/chrome/browser/resources/net_internals/capture_view.html
+++ b/chrome/browser/resources/net_internals/capture_view.html
@@ -1,28 +1,28 @@
-<div id=captureTabContent>
+<div id=capture-view-tab-content>
<b>Network events generated by the browser are being captured to this window ...</b>
<table style="margin: 15px">
<tr>
<td>Passively captured events:</td>
- <td align=right id=passivelyCapturedCount></td>
+ <td align=right id=capture-view-passively-captured-count></td>
</tr>
<tr>
<td>Actively captured events:</td>
- <td align=right id=activelyCapturedCount></td>
+ <td align=right id=capture-view-actively-captured-count></td>
</tr>
</table>
<p>
- <input type=button value="Delete all captured data" id=dataViewDeleteAll />
+ <input type=button value="Delete all captured data" id=capture-view-delete-all />
</p>
- <p><input id=byteLoggingCheckbox type=checkbox />
+ <p><input id=capture-view-byte-logging-checkbox type=checkbox />
Include the actual bytes sent/received (may result in huge logs).
</p>
<ul>
<li>
- <b>TIP</b>: <a href="#" id=captureViewTipAnchor>logging from the command line</a>.
+ <b>TIP</b>: <a href="#" id=capture-view-tip-anchor>logging from the command line</a>.
- <div style="display:none; margin-top: 10px" id=captureViewTipDiv>
+ <div style="display:none; margin-top: 10px" id=capture-view-tip-div>
Another way to capture network events is by using the command line flag:
<blockquote>
--log-net-log=<i>FILENAME</i> [ --net-log-level=<i>NUMBER</i> ]
diff --git a/chrome/browser/resources/net_internals/capture_view.js b/chrome/browser/resources/net_internals/capture_view.js
index 1ea5e94..e28056f 100644
--- a/chrome/browser/resources/net_internals/capture_view.js
+++ b/chrome/browser/resources/net_internals/capture_view.js
@@ -7,13 +7,13 @@
* @constructor
*/
function CaptureView() {
- const mainBoxId = 'captureTabContent';
- const byteLoggingCheckboxId = 'byteLoggingCheckbox';
- const passivelyCapturedCountId = 'passivelyCapturedCount';
- const activelyCapturedCountId = 'activelyCapturedCount';
- const deleteAllId = 'dataViewDeleteAll';
- const tipAnchorId = 'captureViewTipAnchor';
- const tipDivId = 'captureViewTipDiv';
+ const mainBoxId = 'capture-view-tab-content';
+ const byteLoggingCheckboxId = 'capture-view-byte-logging-checkbox';
+ const passivelyCapturedCountId = 'capture-view-passively-captured-count';
+ const activelyCapturedCountId = 'capture-view-actively-captured-count';
+ const deleteAllId = 'capture-view-delete-all';
+ const tipAnchorId = 'capture-view-tip-anchor';
+ const tipDivId = 'capture-view-tip-div';
DivView.call(this, mainBoxId);
diff --git a/chrome/browser/resources/net_internals/export_view.html b/chrome/browser/resources/net_internals/export_view.html
index 677aa9c..31b231b 100644
--- a/chrome/browser/resources/net_internals/export_view.html
+++ b/chrome/browser/resources/net_internals/export_view.html
@@ -1,12 +1,12 @@
-<div id=exportTabContent>
+<div id=export-view-tab-content>
<h2>Dump data</h2>
<div style="margin: 8px">
- <p><input id=securityStrippingCheckbox type=checkbox checked=yes>
+ <p><input id=export-view-security-stripping-checkbox type=checkbox checked=yes>
Strip private information (cookies and credentials).
</p>
- <button id=dataViewSaveLogFile class=bigButton>Dump to file</button>
- <pre id=dataViewSaveStatusText></pre>
+ <button id=export-view-save-log-file class=bigButton>Dump to file</button>
+ <pre id=export-view-save-status-text></pre>
<ul>
<li><b>IMPORTANT</b>: First reproduce the problem while in recording mode.</li>
@@ -20,6 +20,6 @@
</p>
</div>
- <iframe style="display: none" id=dataViewDownloadIframe></iframe>
+ <iframe style="display: none" id=export-view-download-iframe></iframe>
</div>
diff --git a/chrome/browser/resources/net_internals/export_view.js b/chrome/browser/resources/net_internals/export_view.js
index 9887f79..c8eede2 100644
--- a/chrome/browser/resources/net_internals/export_view.js
+++ b/chrome/browser/resources/net_internals/export_view.js
@@ -7,11 +7,11 @@
* @constructor
*/
function ExportView() {
- const mainBoxId = 'exportTabContent';
- const downloadIframeId = 'dataViewDownloadIframe';
- const saveFileButtonId = 'dataViewSaveLogFile';
- const dataViewSaveStatusTextId = 'dataViewSaveStatusText';
- const securityStrippingCheckboxId = 'securityStrippingCheckbox';
+ const mainBoxId = 'export-view-tab-content';
+ const downloadIframeId = 'export-view-download-iframe';
+ const saveFileButtonId = 'export-view-save-log-file';
+ const saveStatusTextId = 'export-view-save-status-text';
+ const securityStrippingCheckboxId = 'export-view-security-stripping-checkbox';
DivView.call(this, mainBoxId);
@@ -23,7 +23,7 @@ function ExportView() {
this.saveFileButton_ = $(saveFileButtonId);
this.saveFileButton_.onclick = this.onSaveFile_.bind(this);
- this.saveStatusText_ = $(dataViewSaveStatusTextId);
+ this.saveStatusText_ = $(saveStatusTextId);
// Track blob for previous log dump so it can be revoked when a new dump is
diff --git a/chrome/browser/resources/net_internals/import_view.html b/chrome/browser/resources/net_internals/import_view.html
index 308e266..4a02dfa 100644
--- a/chrome/browser/resources/net_internals/import_view.html
+++ b/chrome/browser/resources/net_internals/import_view.html
@@ -1,17 +1,17 @@
-<div id=importTabContent>
+<div id=import-view-tab-content>
- <div id=dataViewLoadedDiv style="display: none">
+ <div id=import-view-loaded-div style="display: none">
<h2>Data Loaded</h2>
- <pre id=dataViewLoadedClientInfoText></pre>
+ <pre id=import-view-loaded-client-info-text></pre>
</div>
<div>
<h2>Load data</h2>
- <p><input type=file value="Load log from file" id=dataViewLoadLogFile /></p>
- <pre id=dataViewLoadStatusText></pre>
+ <p><input type=file value="Load log from file" id=import-view-load-log-file /></p>
+ <pre id=import-view-load-status-text></pre>
<p>Once a log is loaded, this page will stop collecting data, and will
only start gathering data again when
- <a id="reloaded-link" href="#">reloaded</a>.
+ <a id="import-view-reloaded-link" href="#">reloaded</a>.
</p>
<ul>
diff --git a/chrome/browser/resources/net_internals/import_view.js b/chrome/browser/resources/net_internals/import_view.js
index c0f5c91..4553f7f 100644
--- a/chrome/browser/resources/net_internals/import_view.js
+++ b/chrome/browser/resources/net_internals/import_view.js
@@ -7,27 +7,29 @@
* @constructor
*/
function ImportView() {
- const mainBoxId = 'importTabContent';
- const loadedDivId = 'dataViewLoadedDiv';
- const loadedClientInfoTextId = 'dataViewLoadedClientInfoText';
- const loadLogFileDropTargetId = 'dataViewDropTarget';
- const loadLogFileId = 'dataViewLoadLogFile';
- const dataViewLoadStatusTextId = 'dataViewLoadStatusText';
+ const mainBoxId = 'import-view-tab-content';
+ const loadedDivId = 'import-view-loaded-div';
+ const loadedClientInfoTextId = 'import-view-loaded-client-info-text';
+ const loadLogFileDropTargetId = 'import-view-drop-target';
+ const loadLogFileId = 'import-view-load-log-file';
+ const loadStatusTextId = 'import-view-load-status-text';
+ const reloadLinkId = 'import-view-reloaded-link';
DivView.call(this, mainBoxId);
-
this.loadedDiv_ = $(loadedDivId);
this.loadedClientInfoText_ = $(loadedClientInfoTextId);
this.loadFileElement_ = $(loadLogFileId);
this.loadFileElement_.onchange = this.logFileChanged.bind(this);
- this.loadStatusText_ = $(dataViewLoadStatusTextId);
+ this.loadStatusText_ = $(loadStatusTextId);
var dropTarget = $(loadLogFileDropTargetId);
dropTarget.ondragenter = this.onDrag.bind(this);
dropTarget.ondragover = this.onDrag.bind(this);
dropTarget.ondrop = this.onDrop.bind(this);
+
+ $(reloadLinkId).onclick = this.clickedReload_.bind(this);
}
inherits(ImportView, DivView);
@@ -44,6 +46,14 @@ ImportView.prototype.onLoadLogFinish = function(data) {
};
/**
+ * Called when the user clicks the "reloaded" link.
+ */
+ImportView.prototype.clickedReload_ = function() {
+ window.location.reload();
+ return false;
+};
+
+/**
* Called when something is dragged over the drop target.
*
* Returns false to cancel default browser behavior when a single file is being
diff --git a/chrome/browser/resources/net_internals/index.html b/chrome/browser/resources/net_internals/index.html
index edee392..25cb063 100644
--- a/chrome/browser/resources/net_internals/index.html
+++ b/chrome/browser/resources/net_internals/index.html
@@ -16,7 +16,7 @@ found in the LICENSE file.
<script src="chrome://net-internals/index.js"></script>
<script src="chrome://net-internals/strings.js"></script>
</head>
- <body id=dataViewDropTarget>
+ <body id=import-view-drop-target>
<div id=statusViewId>
<!-- We use a different status bar when in capture mode vs file mode -->
diff --git a/chrome/browser/resources/net_internals/index.js b/chrome/browser/resources/net_internals/index.js
index 17f10f1..2a5ef5c 100644
--- a/chrome/browser/resources/net_internals/index.js
+++ b/chrome/browser/resources/net_internals/index.js
@@ -34,9 +34,5 @@
<include src="prerender_view.js"/>
document.addEventListener('DOMContentLoaded', function () {
- $('reloaded-link').addEventListener('click', function (event) {
- history.go(0);
- event.preventDefault();
- });
onLoaded(); // from main.js
});
diff --git a/chrome/browser/resources/net_internals/main.css b/chrome/browser/resources/net_internals/main.css
index 2fb90db5..207bc8d 100644
--- a/chrome/browser/resources/net_internals/main.css
+++ b/chrome/browser/resources/net_internals/main.css
@@ -47,9 +47,9 @@ body {
#detailsTimelineBox,
#httpCacheTabContent,
#proxyTabContent,
-#captureTabContent,
-#importTabContent,
-#exportTabContent,
+#capture-view-tab-content,
+#import-view-tab-content,
+#export-view-tab-content,
#dnsTabContent,
#socketsTabContent,
#spdyTabContent,