Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / chrome / test / data / extensions / webui / runtime_last_error.js
blobc2c0edb134be37594936413bac7c6a8651934ea4
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.RuntimeLastError
7 var success = true;
9 if (!chrome.test.checkDeepEq(undefined, chrome.runtime.lastError)) {
10 console.error('Expected undefined, Actual ' +
11 JSON.stringify(chrome.runtime.lastError));
12 success = false;
15 chrome.test.sendMessage('ping', function(reply) {
16 var expected = {
17 'message': 'unknown host'
19 if (!chrome.test.checkDeepEq(expected, chrome.runtime.lastError)) {
20 console.error('Expected ' + JSON.stringify(expected) + ', ' +
21 'Actual ' + JSON.stringify(chrome.runtime.lastError));
22 success = false;
24 chrome.test.sendMessage(success ? 'true' : 'false');
25 });
27 domAutomationController.send(true);