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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/network/RequestPreviewView.js

Issue 1913993004: [Devtools] Fix to XMLView in Network Preview panel broken (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 unified diff | Download patch
« no previous file with comments | « third_party/WebKit/LayoutTests/http/tests/inspector/network/network-choose-preview-view-expected.txt ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 * @param {function(!WebInspector.Widget)} callback 141 * @param {function(!WebInspector.Widget)} callback
142 */ 142 */
143 _createPreviewView: function(callback) 143 _createPreviewView: function(callback)
144 { 144 {
145 if (this.request.contentError()) { 145 if (this.request.contentError()) {
146 callback(this._createMessageView(WebInspector.UIString("Failed to lo ad response data"))); 146 callback(this._createMessageView(WebInspector.UIString("Failed to lo ad response data")));
147 return; 147 return;
148 } 148 }
149 149
150 var xmlView = this._xmlView(); 150 var xmlView = this._xmlView();
151 if (xmlView) 151 if (xmlView) {
152 return xmlView; 152 callback(xmlView);
153 return;
154 }
153 155
154 WebInspector.JSONView.parseJSON(this._requestContent()).then(chooseView. bind(this)).then(callback); 156 WebInspector.JSONView.parseJSON(this._requestContent()).then(chooseView. bind(this)).then(callback);
155 157
156 /** 158 /**
157 * @this {WebInspector.RequestPreviewView} 159 * @this {WebInspector.RequestPreviewView}
158 * @param {?WebInspector.ParsedJSON} jsonData 160 * @param {?WebInspector.ParsedJSON} jsonData
159 * @return {!WebInspector.Widget} 161 * @return {!WebInspector.Widget}
160 */ 162 */
161 function chooseView(jsonData) 163 function chooseView(jsonData)
162 { 164 {
(...skipping 14 matching lines...) Expand all
177 179
178 if (this.request.resourceType() === WebInspector.resourceTypes.Other ) 180 if (this.request.resourceType() === WebInspector.resourceTypes.Other )
179 return this._createEmptyWidget(); 181 return this._createEmptyWidget();
180 182
181 return WebInspector.RequestView.nonSourceViewForRequest(this.request ); 183 return WebInspector.RequestView.nonSourceViewForRequest(this.request );
182 } 184 }
183 }, 185 },
184 186
185 __proto__: WebInspector.RequestContentView.prototype 187 __proto__: WebInspector.RequestContentView.prototype
186 } 188 }
OLDNEW
« no previous file with comments | « third_party/WebKit/LayoutTests/http/tests/inspector/network/network-choose-preview-view-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698