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 // out/Debug/browser_tests --gtest_filter=ExtensionWebUITest.SendMessage | 5 // out/Debug/browser_tests |
6 | 6 // --gtest_filter=ExtensionWebUITest.CanEmbedExtensionOptions |
7 if (!chrome || !chrome.test || !chrome.test.sendMessage) { | 7 if (!chrome || !chrome.test || !chrome.test.sendMessage) { |
8 console.error('chrome.test.sendMessage is unavailable on ' + | 8 console.error('chrome.test.sendMessage is unavailable on ' + |
9 document.location.href); | 9 document.location.href); |
10 domAutomationController.send(false); | 10 domAutomationController.send(false); |
11 return; | 11 return; |
12 } | 12 } |
13 | 13 |
14 chrome.test.sendMessage('ping', function(reply) { | 14 var extensionoptions = document.createElement('extensionoptions'); |
not at google - send to devlin
2014/08/07 23:06:03
I remember we moved this out of here as a speculat
ericzeng
2014/08/08 00:23:47
Done.
| |
15 if (reply != 'pong') { | 15 chrome.test.sendMessage('ready', function(reply) { |
16 console.error('Expected "pong", Actual ' + JSON.stringify(reply)); | 16 |
17 chrome.test.sendMessage('false'); | 17 extensionoptions.addEventListener('load', function() { |
18 } else { | 18 chrome.test.sendMessage('guest loaded'); |
19 chrome.test.sendMessage('true'); | 19 }); |
20 } | 20 extensionoptions.setAttribute('extension', reply); |
21 document.body.appendChild(extensionoptions); | |
22 | |
21 }); | 23 }); |
22 | 24 |
23 domAutomationController.send(true); | 25 domAutomationController.send(true); |
OLD | NEW |