Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(319)

Unified Diff: chrome/test/data/extensions/platform_apps/restrictions/main.js

Issue 11196055: Disable pushState and the rest of the history API in packaged apps via runtime-enabled features (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/renderer/resources/extensions/platform_app.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/data/extensions/platform_apps/restrictions/main.js
diff --git a/chrome/test/data/extensions/platform_apps/restrictions/main.js b/chrome/test/data/extensions/platform_apps/restrictions/main.js
index 566e90fbc45aa4d41cc4508801f58d687c7b6521..17af4b780776173782e78276b07b0262b0c53008 100644
--- a/chrome/test/data/extensions/platform_apps/restrictions/main.js
+++ b/chrome/test/data/extensions/platform_apps/restrictions/main.js
@@ -44,12 +44,17 @@ chrome.test.runTests([
},
function testHistory() {
+ // These are replaced by wrappers that throws exceptions.
assertThrowsError(history.back);
assertThrowsError(history.forward);
- assertThrowsError(history.pushState);
- assertThrowsError(history.replaceState);
assertThrowsError(function() {history.length;});
- assertThrowsError(function() {history.state;});
+
+ // These are part of the HTML5 History API that is feature detected, so we
+ // remove them altogether, allowing apps to have fallback behavior.
+ chrome.test.assertFalse('pushState' in history);
+ chrome.test.assertFalse('replaceState' in history);
+ chrome.test.assertFalse('state' in history);
+
succeed();
},
« no previous file with comments | « chrome/renderer/resources/extensions/platform_app.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698