summaryrefslogtreecommitdiffstats
path: root/dom/tests/mochitest/ajax/offline/test_bypass.html
diff options
context:
space:
mode:
Diffstat (limited to 'dom/tests/mochitest/ajax/offline/test_bypass.html')
-rw-r--r--dom/tests/mochitest/ajax/offline/test_bypass.html37
1 files changed, 37 insertions, 0 deletions
diff --git a/dom/tests/mochitest/ajax/offline/test_bypass.html b/dom/tests/mochitest/ajax/offline/test_bypass.html
new file mode 100644
index 000000000..6ed6e2562
--- /dev/null
+++ b/dom/tests/mochitest/ajax/offline/test_bypass.html
@@ -0,0 +1,37 @@
+<html xmlns="http://www.w3.org/1999/xhtml" manifest="bypass.cacheManifest">
+<head>
+<title>Bypass test</title>
+
+<script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
+<script type="text/javascript" src="/tests/dom/tests/mochitest/ajax/offline/offlineTests.js"></script>
+<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
+
+<script class="testbody" type="text/javascript">
+
+/**
+ * This test defines manifest with namespace1/sub2 and namespace2 as bypass
+ * namespaces.
+ * When cache update finishes it loads a test body in an iframe. This iframe
+ * refers four js scripts, some matching the namespace to bypass and some not.
+ * Then checks that just expected scripts loads by calling a method of each
+ * of the script.
+ */
+
+SimpleTest.waitForExplicitFinish();
+
+if (OfflineTest.setup()) {
+ // Load test body when cache update process finished. The test itself
+ // continues at that file.
+ applicationCache.oncached = function()
+ {
+ window.open("bypass.html");
+ }
+}
+
+</script>
+
+</head>
+
+<body>
+</body>
+</html>