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
3 // found in the LICENSE file.
5 // out/Debug/browser_tests --gtest_filter=ExtensionWebUITest.OnMessage
7 if (!chrome || !chrome.test || !chrome.test.onMessage) {
8 console.error('chrome.test.onMessage is unavailable on ' +
9 document.location.href);
10 domAutomationController.send(false);
14 chrome.test.listenOnce(chrome.test.onMessage, function(args) {
15 if (args.data != 'hi') {
16 console.error('Expected "hi", Actual ' + JSON.stringify(args.data));
17 chrome.test.sendMessage('false');
19 chrome.test.sendMessage('true');
23 domAutomationController.send(true);