OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 // This script is opened inside a <extensionoptions> guest view. | 5 // This script is opened inside a <extensionoptions> guest view. |
6 | 6 |
7 // This adds a 'loaded' property to the window for the createGuestViewDOM and | 7 // This adds a 'loaded' property to the window for the createGuestViewDOM and |
8 // createGuestViewProgrammatic tests. | 8 // createGuestViewProgrammatic tests. |
9 window.loaded = true; | 9 window.loaded = true; |
10 | 10 |
(...skipping 26 matching lines...) Expand all Loading... |
37 | 37 |
38 chrome.storage.local.set({'test': 42}, function() { | 38 chrome.storage.local.set({'test': 42}, function() { |
39 chrome.storage.local.get('test', function(storage) { | 39 chrome.storage.local.get('test', function(storage) { |
40 chrome.runtime.sendMessage({ | 40 chrome.runtime.sendMessage({ |
41 expected: 42, | 41 expected: 42, |
42 actual: storage.test, | 42 actual: storage.test, |
43 description: 'onSetAndGet' | 43 description: 'onSetAndGet' |
44 }); | 44 }); |
45 }); | 45 }); |
46 }); | 46 }); |
| 47 |
| 48 break; |
| 49 |
| 50 case 'externalLinksOpenInNewTab': |
| 51 var link = document.getElementById('link'); |
| 52 chrome.test.runWithUserGesture(function() { |
| 53 link.click(); |
| 54 chrome.runtime.sendMessage('done'); |
| 55 }.bind(link)); |
47 } | 56 } |
48 }); | 57 }); |
OLD | NEW |