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

Side by Side Diff: chrome/browser/extensions/extension_bindings_apitest.cc

Issue 1433343003: [Extensions] Wait until the Window object is cleared before classifying contexts Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Latest master Created 5 years, 1 month 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
« no previous file with comments | « no previous file | chrome/test/data/extensions/api_test/bindings/chromei18nrepro/background.js » ('j') | 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 // Contains holistic tests of the bindings infrastructure 5 // Contains holistic tests of the bindings infrastructure
6 6
7 #include "chrome/browser/extensions/api/permissions/permissions_api.h" 7 #include "chrome/browser/extensions/api/permissions/permissions_api.h"
8 #include "chrome/browser/extensions/extension_apitest.h" 8 #include "chrome/browser/extensions/extension_apitest.h"
9 #include "chrome/browser/net/url_request_mock_util.h" 9 #include "chrome/browser/net/url_request_mock_util.h"
10 #include "chrome/browser/ui/browser.h" 10 #include "chrome/browser/ui/browser.h"
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 // See handler_function_type_checking.html. 176 // See handler_function_type_checking.html.
177 std::string result; 177 std::string result;
178 EXPECT_TRUE(content::ExecuteScriptAndExtractString( 178 EXPECT_TRUE(content::ExecuteScriptAndExtractString(
179 web_contents, 179 web_contents,
180 "window.domAutomationController.send(" 180 "window.domAutomationController.send("
181 "document.getElementById('status').textContent.trim());", 181 "document.getElementById('status').textContent.trim());",
182 &result)); 182 &result));
183 EXPECT_EQ("success", result); 183 EXPECT_EQ("success", result);
184 } 184 }
185 185
186 // Regression test for crbug.com/340382, which was having extension bindings
187 // flakily undefined because the script context was improperly classified.
188 // Thanks to jhawkins@ for the only known reliable repro.
189 IN_PROC_BROWSER_TEST_F(ExtensionBindingsApiTest,
190 RegressionTestForUndefinedBindings) {
191 // This is important - likely because the signin page does crazy stuff. This
192 // doesn't repro if we don't navigate to the signin page.
193 ui_test_utils::NavigateToURL(browser(), GURL("chrome://chrome-signin"));
194
195 ASSERT_TRUE(RunPlatformAppTest("bindings/chromei18nrepro")) << message_;
196 }
197
186 } // namespace 198 } // namespace
187 } // namespace extensions 199 } // namespace extensions
OLDNEW
« no previous file with comments | « no previous file | chrome/test/data/extensions/api_test/bindings/chromei18nrepro/background.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698