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

Unified Diff: webkit/glue/devtools/js/tests.js

Issue 437089: Remove Content-Type workaround for cached resources (Closed)
Patch Set: Test Created 11 years, 1 month 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 | « webkit/glue/devtools/js/devtools.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/glue/devtools/js/tests.js
diff --git a/webkit/glue/devtools/js/tests.js b/webkit/glue/devtools/js/tests.js
index db3c8b2bdd6248c2b302a1b81e5af18b63e65264..55a46e16931e105e466176fc903ca540dd27fa1c 100644
--- a/webkit/glue/devtools/js/tests.js
+++ b/webkit/glue/devtools/js/tests.js
@@ -363,6 +363,44 @@ TestSuite.prototype.testResourceHeaders = function() {
/**
+ * Tests the mime type of a cached (HTTP 304) resource.
+ */
+TestSuite.prototype.testCachedResourceMimeType = function() {
+ this.showPanel('resources');
+
+ var test = this;
+ var hasReloaded = false;
+
+ this.addSniffer(WebInspector, 'updateResource',
yurys 2009/11/26 12:56:22 are you sure WebInspector.updateResponse cannot ha
apavlov 2009/11/26 13:01:45 The test logic is a replica of the TestSuite.proto
+ function(identifier, payload) {
+ var resource = this.resources[identifier];
+ if (resource.mainResource) {
+ // We are only interested in secondary resources in this test.
+ return;
+ }
+
+ if (payload.didResponseChange) {
+ // Test server uses a default mime type for JavaScript files.
+ test.assertEquals('text/html', payload.mimeType);
yurys 2009/11/26 12:56:22 is it possible to fix mime type for .js files? if
apavlov 2009/11/26 13:01:45 I'm somewhat reluctant to fix the server in the sa
+ if (!hasReloaded) {
+ hasReloaded = true;
+ // Reload inspected page to update all resources.
+ test.evaluateInConsole_(
+ 'window.location.reload(true);',
+ function() {});
+ } else {
+ test.releaseControl();
+ }
+ }
+
+ }, true);
+
+ WebInspector.panels.resources._enableResourceTracking();
+ this.takeControl();
+};
+
+
+/**
* Tests that profiler works.
*/
TestSuite.prototype.testProfilerTab = function() {
« no previous file with comments | « webkit/glue/devtools/js/devtools.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698