| <!DOCTYPE html> |
| <html> |
| <head> |
| <!-- |
| Generate this token with the command: |
| tools/origin_trials/generate_token.py http://127.0.0.1:8000 AppCache --expire-days=2000 |
| --> |
| <meta http-equiv="origin-trial" content="AnwB3aSh6U8pmYtO/AzzxELSwk8BRJoj77nUnCq6u3N8LMJKlX/ImydQmXn3SgE0a+8RyowLbV835tXQHJMHuAEAAABQeyJvcmlnaW4iOiAiaHR0cDovLzEyNy4wLjAuMTo4MDAwIiwgImZlYXR1cmUiOiAiQXBwQ2FjaGUiLCAiZXhwaXJ5IjogMTc2MTE3NjE5OH0="> |
| </head> |
| <body> |
| <script src="/js-test-resources/js-test.js"></script> |
| <script> |
| description("This tests that 'ApplicationCache' methods throw exceptions with reasonable messages."); |
| |
| var cache = window.applicationCache; |
| shouldThrow('cache.update()', '"InvalidStateError: Failed to execute \'update\' on \'ApplicationCache\': there is no application cache to update."'); |
| shouldThrow('cache.swapCache()', '"InvalidStateError: Failed to execute \'swapCache\' on \'ApplicationCache\': there is no newer application cache to swap to."'); |
| </script> |
| </body> |
| </html> |