Browse files

The browser cache needs to be activated for this test

  • Loading branch information...
1 parent 6a9ed89 commit b2fb8dcd4d52f0d8249cf8338a431a3ae2534a24 @SebastianZ SebastianZ committed Sep 19, 2012
Showing with 14 additions and 2 deletions.
  1. +14 −2 tests/content/net/4905/issue4905.js
View
16 tests/content/net/4905/issue4905.js
@@ -5,6 +5,12 @@ function runTest()
FBTest.openNewTab(basePath + "net/4905/issue4905.html", function(win)
{
FBTest.openFirebug();
+
+ // Enable browser cache
+ var browserCache = FW.Firebug.NetMonitor.BrowserCache;
+ var browserCacheEnabled = browserCache.isEnabled();
+ browserCache.toggle(true);
+
FBTest.selectPanel("net");
FBTest.enableNetPanel();
@@ -15,7 +21,7 @@ function runTest()
counter: 2
};
- FBTest.waitForDisplayedElement("net", options, function(row)
+ var callbackFunction = function(row)
{
var panelNode = FBTest.selectPanel("net").panelNode;
@@ -36,8 +42,14 @@ function runTest()
"Cached response headers must include 'Cache-Control' header");
}
+ // Disable browser cache again if it was disabled before
+ if (!browserCacheEnabled)
+ browserCache.toggle(false);
+
FBTest.testDone("issue4905.DONE");
- });
+ };
+
+ FBTest.waitForDisplayedElement("net", options, callbackFunction);
FBTest.reload();
});

0 comments on commit b2fb8dc

Please sign in to comment.