Thu, 15 Jan 2015 15:55:04 +0100
Back out 97036ab72558 which inappropriately compared turds to third parties.
michael@0 | 1 | <html xmlns="http://www.w3.org/1999/xhtml"> |
michael@0 | 2 | <head> |
michael@0 | 3 | <title>bad manifest content type</title> |
michael@0 | 4 | |
michael@0 | 5 | <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script> |
michael@0 | 6 | <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" /> |
michael@0 | 7 | |
michael@0 | 8 | <script type="text/javascript"> |
michael@0 | 9 | |
michael@0 | 10 | function expectInvalidState(fn, desc) { |
michael@0 | 11 | var gotInvalidState = false; |
michael@0 | 12 | try { |
michael@0 | 13 | fn(); |
michael@0 | 14 | } catch(e) { |
michael@0 | 15 | if (e.name == "InvalidStateError" && |
michael@0 | 16 | e.code == DOMException.INVALID_STATE_ERR) { |
michael@0 | 17 | gotInvalidState = true; |
michael@0 | 18 | } |
michael@0 | 19 | } |
michael@0 | 20 | |
michael@0 | 21 | ok(gotInvalidState, desc); |
michael@0 | 22 | } |
michael@0 | 23 | |
michael@0 | 24 | is(typeof(applicationCache), "object"); |
michael@0 | 25 | if (SpecialPowers.isMainProcess()) { |
michael@0 | 26 | is(applicationCache.mozLength, 0, "applicationCache.mozLength should be 0"); |
michael@0 | 27 | } |
michael@0 | 28 | is(applicationCache.status, 0, "applicationCache.status should be 0 (UNCACHED)"); |
michael@0 | 29 | |
michael@0 | 30 | expectInvalidState(function() { applicationCache.update(); }, |
michael@0 | 31 | "applicationCache.update should throw InvalidStateError"); |
michael@0 | 32 | expectInvalidState(function() { applicationCache.swapCache(); }, |
michael@0 | 33 | "applicationCache.update should throw InvalidStateError"); |
michael@0 | 34 | |
michael@0 | 35 | |
michael@0 | 36 | </script> |
michael@0 | 37 | |
michael@0 | 38 | </head> |
michael@0 | 39 | |
michael@0 | 40 | <body> |
michael@0 | 41 | |
michael@0 | 42 | </body> |
michael@0 | 43 | </html> |