diff options
author | pfeldman@chromium.org <pfeldman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-12-22 16:15:15 +0000 |
---|---|---|
committer | pfeldman@chromium.org <pfeldman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-12-22 16:15:15 +0000 |
commit | 1c5491c13d721e264432fe75e4030017b1ee10e8 (patch) | |
tree | 82c7c879d1daafac0165f73c02f442625cafe338 | |
parent | aa7794a2adca5e466a837479d8e1f10b4a9ab89d (diff) | |
download | chromium_src-1c5491c13d721e264432fe75e4030017b1ee10e8.zip chromium_src-1c5491c13d721e264432fe75e4030017b1ee10e8.tar.gz chromium_src-1c5491c13d721e264432fe75e4030017b1ee10e8.tar.bz2 |
DevTools: simplify resources tests + provisional fix for the deps roll.
Review URL: http://codereview.chromium.org/501172
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@35152 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | webkit/glue/devtools/js/tests.js | 18 |
1 files changed, 3 insertions, 15 deletions
diff --git a/webkit/glue/devtools/js/tests.js b/webkit/glue/devtools/js/tests.js index 4e7d87f..6d6b890 100644 --- a/webkit/glue/devtools/js/tests.js +++ b/webkit/glue/devtools/js/tests.js @@ -227,7 +227,7 @@ TestSuite.prototype.testEnableResourcesTab = function() { this.showPanel('resources'); var test = this; - this.addSniffer(WebInspector, '_addResource', + this.addSniffer(WebInspector, 'updateResource', function(identifier, payload) { test.assertEquals('simple_page.html', payload.lastPathComponent); WebInspector.panels.resources.refresh(); @@ -311,30 +311,19 @@ TestSuite.prototype.testResourceHeaders = function() { var test = this; - var requestOk = false; var responseOk = false; var timingOk = false; - this.addSniffer(WebInspector, '_addResource', + this.addSniffer(WebInspector, 'updateResource', function(identifier, payload) { var resource = this.resources[identifier]; - if (resource.mainResource) { + if (!resource || resource.mainResource) { // We are only interested in secondary resources in this test. return; } var requestHeaders = JSON.stringify(resource.requestHeaders); test.assertContains(requestHeaders, 'Accept'); - requestOk = true; - }, true); - - this.addSniffer(WebInspector, 'updateResource', - function(identifier, payload) { - var resource = this.resources[identifier]; - if (!resource || resource.mainResource) { - // We are only interested in secondary resources in this test. - return; - } if (payload.didResponseChange) { var responseHeaders = JSON.stringify(resource.responseHeaders); @@ -350,7 +339,6 @@ TestSuite.prototype.testResourceHeaders = function() { } if (payload.didCompletionChange) { - test.assertTrue(requestOk); test.assertTrue(responseOk); test.assertTrue(timingOk); test.assertTrue(typeof resource.endTime != 'undefined'); |