Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4078)

Unified Diff: chrome/test/data/webui/net_internals/log_util.js

Issue 2856223006: Delete chrome://net-internals/#export (Closed)
Patch Set: Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/resources/net_internals/main.js ('k') | chrome/test/data/webui/net_internals/main.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/data/webui/net_internals/log_util.js
diff --git a/chrome/test/data/webui/net_internals/log_util.js b/chrome/test/data/webui/net_internals/log_util.js
index 8a6e0a8eab3e11addb54f5b6506de2dcfe5f1bef..3d69ffb87e498b31ab329ec75f9bad079d96ac73 100644
--- a/chrome/test/data/webui/net_internals/log_util.js
+++ b/chrome/test/data/webui/net_internals/log_util.js
@@ -16,8 +16,7 @@ GEN_INCLUDE(['net_internals_test.js']);
/**
* A Task that creates a log dump and then loads it.
- * @param {string} userComments User comments to copy to the ExportsView before
- * creating the log dump.
+ * @param {string} userComments User comments to use for the generated log.
* @extends {NetInternalsTest.Task}
*/
function CreateAndLoadLogTask(userComments) {
@@ -32,16 +31,13 @@ CreateAndLoadLogTask.prototype = {
__proto__: NetInternalsTest.Task.prototype,
/**
- * Start creating the log dump. Use ExportView's function as it supports
- * both creating completely new logs and using existing logs to create new
- * ones, depending on whether or not we're currently viewing a log.
+ * Starts creating the log dump.
*/
start: function() {
this.initialPrivacyStripping_ =
SourceTracker.getInstance().getPrivacyStripping();
- $(ExportView.USER_COMMENTS_TEXT_AREA_ID).value = this.userComments_;
- ExportView.getInstance().createLogDump_(this.onLogDumpCreated.bind(this),
- true);
+ log_util.createLogDumpAsync(this.userComments_,
+ this.onLogDumpCreated.bind(this), true);
},
/**
@@ -57,8 +53,6 @@ CreateAndLoadLogTask.prototype = {
NetInternalsTest.expectStatusViewNodeVisible(LoadedStatusView.MAIN_BOX_ID);
- expectEquals(this.userComments_,
- $(ExportView.USER_COMMENTS_TEXT_AREA_ID).value);
// Make sure the DIV on the import tab containing the comments is visible
// before checking the displayed text.
expectTrue(NetInternalsTest.nodeIsVisible($(ImportView.LOADED_DIV_ID)));
@@ -164,7 +158,6 @@ function checkViewsAfterLogLoaded() {
expectTrue(g_browser.isDisabled());
var tabVisibilityState = {
capture: false,
- export: true,
import: true,
proxy: true,
events: true,
@@ -193,7 +186,6 @@ function checkViewsAfterNetLogFileLoaded() {
expectTrue(g_browser.isDisabled());
var tabVisibilityState = {
capture: false,
- export: true,
import: true,
proxy: false,
events: true,
@@ -271,21 +263,6 @@ TEST_F('NetInternalsTest', 'netInternalsLogUtilImportNetLogFileTruncated',
});
/**
- * Exports a log dump to a string and loads it, and then repeats, making sure
- * we can export loaded logs.
- */
-TEST_F('NetInternalsTest',
- 'netInternalsLogUtilExportImportExportImport',
- function() {
- var taskQueue = new NetInternalsTest.TaskQueue(true);
- taskQueue.addTask(new CreateAndLoadLogTask('Random comment on the weather.'));
- taskQueue.addFunctionTask(checkViewsAfterLogLoaded);
- taskQueue.addTask(new CreateAndLoadLogTask('Detailed explanation.'));
- taskQueue.addFunctionTask(checkViewsAfterLogLoaded);
- taskQueue.run(true);
-});
-
-/**
* Checks pressing the stop capturing button.
*/
TEST_F('NetInternalsTest', 'netInternalsLogUtilStopCapturing', function() {
@@ -299,35 +276,11 @@ TEST_F('NetInternalsTest', 'netInternalsLogUtilStopCapturing', function() {
null, HaltedStatusView.MAIN_BOX_ID));
taskQueue.addFunctionTask(checkViewsAfterLogLoaded);
taskQueue.addFunctionTask(checkPrivacyStripping.bind(null, true));
- taskQueue.addFunctionTask(checkActiveView.bind(null, ExportView.TAB_ID));
+ taskQueue.addFunctionTask(checkActiveView.bind(null, EventsView.TAB_ID));
taskQueue.run();
// Simulate a click on the stop capturing button
$(CaptureView.STOP_BUTTON_ID).click();
});
-/**
- * Switches to stop capturing mode, then exports and imports a log dump.
- */
-TEST_F('NetInternalsTest',
- 'netInternalsLogUtilStopCapturingExportImport',
- function() {
- var taskQueue = new NetInternalsTest.TaskQueue(true);
- // Switching to stop capturing mode will load a log dump, which will update
- // the constants.
- taskQueue.addTask(new WaitForConstantsTask());
-
- taskQueue.addFunctionTask(
- NetInternalsTest.expectStatusViewNodeVisible.bind(
- null, HaltedStatusView.MAIN_BOX_ID));
- taskQueue.addFunctionTask(checkViewsAfterLogLoaded);
- taskQueue.addFunctionTask(checkPrivacyStripping.bind(null, true));
- taskQueue.addTask(new CreateAndLoadLogTask('Detailed explanation.'));
- taskQueue.addFunctionTask(checkViewsAfterLogLoaded);
- taskQueue.run();
-
- // Simulate clicking the stop button.
- $(CaptureView.STOP_BUTTON_ID).click();
-});
-
})(); // Anonymous namespace
« no previous file with comments | « chrome/browser/resources/net_internals/main.js ('k') | chrome/test/data/webui/net_internals/main.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698