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

Side by Side Diff: chrome/renderer/extensions/extension_api_client_unittest.cc

Issue 207029: ExtensionAPIClientTest.GetLastFocusedWindow is flaky... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 11 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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 #include "base/file_util.h" 5 #include "base/file_util.h"
6 #include "base/path_service.h" 6 #include "base/path_service.h"
7 #include "base/string_util.h" 7 #include "base/string_util.h"
8 #include "chrome/common/chrome_paths.h" 8 #include "chrome/common/chrome_paths.h"
9 #include "chrome/common/render_messages.h" 9 #include "chrome/common/render_messages.h"
10 #include "chrome/renderer/extensions/extension_process_bindings.h" 10 #include "chrome/renderer/extensions/extension_process_bindings.h"
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 "Uncaught Error: Parameter 0 is required."); 134 "Uncaught Error: Parameter 0 is required.");
135 135
136 ExpectJsFail("chrome.windows.getCurrent('abc');", 136 ExpectJsFail("chrome.windows.getCurrent('abc');",
137 "Uncaught Error: Invalid value for argument 0. " 137 "Uncaught Error: Invalid value for argument 0. "
138 "Expected 'function' but got 'string'."); 138 "Expected 'function' but got 'string'.");
139 139
140 ExpectJsPass("chrome.windows.getCurrent(function(){})", 140 ExpectJsPass("chrome.windows.getCurrent(function(){})",
141 "windows.getCurrent", "null"); 141 "windows.getCurrent", "null");
142 } 142 }
143 143
144 TEST_F(ExtensionAPIClientTest, GetLastFocusedWindow) { 144 // http://crbug.com/22248
145 TEST_F(ExtensionAPIClientTest, DISABLED_GetLastFocusedWindow) {
145 ExpectJsFail("chrome.windows.getLastFocused(function(){}, 20);", 146 ExpectJsFail("chrome.windows.getLastFocused(function(){}, 20);",
146 "Uncaught Error: Too many arguments."); 147 "Uncaught Error: Too many arguments.");
147 148
148 ExpectJsFail("chrome.windows.getLastFocused();", 149 ExpectJsFail("chrome.windows.getLastFocused();",
149 "Uncaught Error: Parameter 0 is required."); 150 "Uncaught Error: Parameter 0 is required.");
150 151
151 ExpectJsFail("chrome.windows.getLastFocused('abc');", 152 ExpectJsFail("chrome.windows.getLastFocused('abc');",
152 "Uncaught Error: Invalid value for argument 0. " 153 "Uncaught Error: Invalid value for argument 0. "
153 "Expected 'function' but got 'string'."); 154 "Expected 'function' but got 'string'.");
154 155
(...skipping 442 matching lines...) Expand 10 before | Expand all | Expand 10 after
597 ExpectJsFail("chrome.i18n.getAcceptLanguages()", 598 ExpectJsFail("chrome.i18n.getAcceptLanguages()",
598 "Uncaught Error: Parameter 0 is required."); 599 "Uncaught Error: Parameter 0 is required.");
599 600
600 ExpectJsFail("chrome.i18n.getAcceptLanguages('abc')", 601 ExpectJsFail("chrome.i18n.getAcceptLanguages('abc')",
601 "Uncaught Error: Invalid value for argument 0. " 602 "Uncaught Error: Invalid value for argument 0. "
602 "Expected 'function' but got 'string'."); 603 "Expected 'function' but got 'string'.");
603 604
604 ExpectJsPass("chrome.i18n.getAcceptLanguages(function(){})", 605 ExpectJsPass("chrome.i18n.getAcceptLanguages(function(){})",
605 "i18n.getAcceptLanguages", "null"); 606 "i18n.getAcceptLanguages", "null");
606 } 607 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698