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

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

Issue 245443003: Update platform_app.js to work even if window.history is not replaceable (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Take arv's feedback into consideration Created 6 years, 8 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/renderer/resources/extensions/platform_app.js ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 var assertEq = chrome.test.assertEq; 5 var assertEq = chrome.test.assertEq;
6 var assertTrue = chrome.test.assertTrue; 6 var assertTrue = chrome.test.assertTrue;
7 var fail = chrome.test.fail; 7 var fail = chrome.test.fail;
8 var succeed = chrome.test.succeed; 8 var succeed = chrome.test.succeed;
9 9
10 function assertThrowsError(method, opt_expectedError) { 10 function assertThrowsError(method, opt_expectedError) {
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 assertEq('undefined', typeof(document.linkColor)); 58 assertEq('undefined', typeof(document.linkColor));
59 assertEq('undefined', typeof(document.vlinkColor)); 59 assertEq('undefined', typeof(document.vlinkColor));
60 60
61 succeed(); 61 succeed();
62 }, 62 },
63 63
64 function testHistory() { 64 function testHistory() {
65 // Accessing these logs warnings to the console. 65 // Accessing these logs warnings to the console.
66 assertEq('undefined', typeof(history.back)); 66 assertEq('undefined', typeof(history.back));
67 assertEq('undefined', typeof(history.forward)); 67 assertEq('undefined', typeof(history.forward));
68 assertEq('undefined', typeof(history.go));
68 assertEq('undefined', typeof(history.length)); 69 assertEq('undefined', typeof(history.length));
69 70
70 // These are part of the HTML5 History API that are feature detected, so we 71 // These are part of the HTML5 History API that are feature detected, so we
71 // remove them altogether, allowing apps to have fallback behavior. 72 // remove them altogether, allowing apps to have fallback behavior.
72 chrome.test.assertFalse('pushState' in history); 73 chrome.test.assertFalse('pushState' in history);
73 chrome.test.assertFalse('replaceState' in history); 74 chrome.test.assertFalse('replaceState' in history);
74 chrome.test.assertFalse('state' in history); 75 chrome.test.assertFalse('state' in history);
75 76
76 succeed(); 77 succeed();
77 }, 78 },
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
187 assertEq('undefined', typeof(chrome.extension)); 188 assertEq('undefined', typeof(chrome.extension));
188 succeed(); 189 succeed();
189 }, 190 },
190 191
191 function testExtensionApis() { 192 function testExtensionApis() {
192 assertEq('undefined', typeof(chrome.tabs)); 193 assertEq('undefined', typeof(chrome.tabs));
193 assertEq('undefined', typeof(chrome.windows)); 194 assertEq('undefined', typeof(chrome.windows));
194 succeed(); 195 succeed();
195 } 196 }
196 ]); 197 ]);
OLDNEW
« 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