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

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

Issue 10332238: net-internals: Fix cookies not being hidden, when saving after capturing is stopped (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Oops Created 8 years, 7 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') | no next file » | 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
===================================================================
--- chrome/test/data/webui/net_internals/log_util.js (revision 137673)
+++ chrome/test/data/webui/net_internals/log_util.js (working copy)
@@ -37,6 +37,8 @@
* ones, depending on whether or not we're currently viewing a log.
*/
start: function() {
+ this.initialSecurityStripping_ =
+ SourceTracker.getInstance().getSecurityStripping();
$(ExportView.USER_COMMENTS_TEXT_AREA_ID).value = this.userComments_;
ExportView.getInstance().createLogDump_(this.onLogDumpCreated.bind(this),
true);
@@ -48,7 +50,10 @@
* @param {string} logDumpText Log dump, as a string.
*/
onLogDumpCreated: function(logDumpText) {
+ expectEquals(this.initialSecurityStripping_,
+ SourceTracker.getInstance().getSecurityStripping());
expectEquals('Log loaded.', log_util.loadLogFile(logDumpText, 'log.txt'));
+ expectFalse(SourceTracker.getInstance().getSecurityStripping());
NetInternalsTest.expectStatusViewNodeVisible(LoadedStatusView.MAIN_BOX_ID);
@@ -120,6 +125,11 @@
NetInternalsTest.checkTabHandleVisibility(tabVisibilityState, false);
}
+function checkSecurityStripping(expectedValue) {
+ expectEquals(expectedValue,
+ SourceTracker.getInstance().getSecurityStripping());
+}
+
/**
* Exports a log dump to a string and loads it. Makes sure no errors occur,
* and checks visibility of tabs aftwards. Does not actually save the log to a
@@ -129,6 +139,7 @@
*/
TEST_F('NetInternalsTest', 'netInternalsExportImportDump', function() {
expectFalse(g_browser.isDisabled());
+ expectTrue(SourceTracker.getInstance().getSecurityStripping());
NetInternalsTest.expectStatusViewNodeVisible(CaptureStatusView.MAIN_BOX_ID);
var taskQueue = new NetInternalsTest.TaskQueue(true);
@@ -163,6 +174,7 @@
NetInternalsTest.expectStatusViewNodeVisible.bind(
null, HaltedStatusView.MAIN_BOX_ID));
taskQueue.addFunctionTask(checkViewsAfterLogLoaded);
+ taskQueue.addFunctionTask(checkSecurityStripping.bind(null, true));
taskQueue.run();
// Simulate a click on the stop capturing button.
@@ -182,6 +194,7 @@
NetInternalsTest.expectStatusViewNodeVisible.bind(
null, HaltedStatusView.MAIN_BOX_ID));
taskQueue.addFunctionTask(checkViewsAfterLogLoaded);
+ taskQueue.addFunctionTask(checkSecurityStripping.bind(null, true));
taskQueue.addTask(new CreateAndLoadLogTask('Detailed explanation.'));
taskQueue.addFunctionTask(checkViewsAfterLogLoaded);
taskQueue.run();
« no previous file with comments | « chrome/browser/resources/net_internals/main.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698