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

Side by Side Diff: chrome/test/data/extensions/webui/runtime_last_error.js

Issue 1055673002: [Extensions API] Remove inline enums (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 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
OLDNEW
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.RuntimeLastError 5 // out/Debug/browser_tests --gtest_filter=ExtensionWebUITest.RuntimeLastError
6 6
7 var success = true; 7 var success = true;
8 8
9 if (!chrome.test.checkDeepEq({}, chrome.runtime)) { 9 if (!chrome.test.checkDeepEq(undefined, chrome.runtime.lastError)) {
10 console.error('Expected {}, Actual ' + JSON.stringify(chrome.runtime)); 10 console.error('Expected undefined, Actual ' +
11 JSON.stringify(chrome.runtime.lastError));
11 success = false; 12 success = false;
12 } 13 }
13 14
14 chrome.test.sendMessage('ping', function(reply) { 15 chrome.test.sendMessage('ping', function(reply) {
15 var expected = { 16 var expected = {
16 'lastError': { 17 'message': 'unknown host'
17 'message': 'unknown host'
18 }
19 }; 18 };
20 if (!chrome.test.checkDeepEq(expected, chrome.runtime)) { 19 if (!chrome.test.checkDeepEq(expected, chrome.runtime.lastError)) {
21 console.error('Expected ' + JSON.stringify(expected) + ', ' + 20 console.error('Expected ' + JSON.stringify(expected) + ', ' +
22 'Actual ' + JSON.stringify(chrome.runtime)); 21 'Actual ' + JSON.stringify(chrome.runtime.lastError));
23 success = false; 22 success = false;
24 } 23 }
25 chrome.test.sendMessage(success ? 'true' : 'false'); 24 chrome.test.sendMessage(success ? 'true' : 'false');
26 }); 25 });
27 26
28 domAutomationController.send(true); 27 domAutomationController.send(true);
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698