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

Side by Side Diff: chrome/test/data/extensions/api_test/runtime/uninstall_url/test.js

Issue 1282263002: Restrict chrome.runtime.setUninstallURL to http(s) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Small cleanup Created 5 years, 4 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
« no previous file with comments | « no previous file | extensions/browser/api/runtime/runtime_api.cc » ('j') | 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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 // extension api test 5 // extension api test
6 // browser_tests.exe --gtest_filter=ExtensionApiTest.ChromeRuntimeUninstallURL 6 // browser_tests.exe --gtest_filter=ExtensionApiTest.ChromeRuntimeUninstallURL
7 7
8 var pass = chrome.test.callbackPass; 8 var pass = chrome.test.callbackPass;
9 var uninstall_url = 'http://www.google.com/'; 9 var uninstall_url = 'http://www.google.com/';
10 var sets_uninstall_url = 'Sets Uninstall Url'; 10 var sets_uninstall_url = 'Sets Uninstall Url';
(...skipping 10 matching lines...) Expand all
21 chrome.test.assertEq(tabs[0].url, uninstall_url); 21 chrome.test.assertEq(tabs[0].url, uninstall_url);
22 })); 22 }));
23 })); 23 }));
24 })); 24 }));
25 uninstalled = true; 25 uninstalled = true;
26 break; 26 break;
27 } 27 }
28 } 28 }
29 chrome.test.assertTrue(uninstalled); 29 chrome.test.assertTrue(uninstalled);
30 }); 30 });
31 },
32 function setEmptyUrl() {
33 chrome.runtime.setUninstallURL('', function() {
34 chrome.test.assertNoLastError();
35 chrome.test.succeed();
36 });
37 },
38 function uninstallInvalidURLNonHttpOrHttps() {
39 chrome.runtime.setUninstallURL('chrome://newtab', function() {
40 chrome.test.assertLastError('Invalid URL: "chrome://newtab".');
41 chrome.test.succeed();
42 });
31 } 43 }
32 ]); 44 ]);
OLDNEW
« no previous file with comments | « no previous file | extensions/browser/api/runtime/runtime_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698