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

Side by Side Diff: chrome/browser/extensions/api/tabs/tabs_test.cc

Issue 2850793005: Remove command line/field trial support and configs for Isolate Extensions. (Closed)
Patch Set: Rebase. Created 3 years, 7 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 (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 #include <limits.h> 5 #include <limits.h>
6 #include <stddef.h> 6 #include <stddef.h>
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include <memory> 9 #include <memory>
10 #include <string> 10 #include <string>
(...skipping 2129 matching lines...) Expand 10 before | Expand all | Expand 10 after
2140 browser()->tab_strip_model()->GetActiveWebContents()); 2140 browser()->tab_strip_model()->GetActiveWebContents());
2141 browser()->tab_strip_model()->ActivateTabAt(1, true); 2141 browser()->tab_strip_model()->ActivateTabAt(1, true);
2142 EXPECT_EQ(second_web_contents, 2142 EXPECT_EQ(second_web_contents,
2143 browser()->tab_strip_model()->GetActiveWebContents()); 2143 browser()->tab_strip_model()->GetActiveWebContents());
2144 2144
2145 EXPECT_EQ(url, second_web_contents->GetVisibleURL()); 2145 EXPECT_EQ(url, second_web_contents->GetVisibleURL());
2146 } 2146 }
2147 2147
2148 // Window created by chrome.windows.create should be in the same SiteInstance 2148 // Window created by chrome.windows.create should be in the same SiteInstance
2149 // and BrowsingInstance as the opener - this is a regression test for 2149 // and BrowsingInstance as the opener - this is a regression test for
2150 // hangouts-vs-isolate-extensions-trouble (see also https://crbug.com/597750). 2150 // https://crbug.com/597750.
2151 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, WindowsCreateVsSiteInstance) { 2151 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, WindowsCreateVsSiteInstance) {
2152 const extensions::Extension* extension = 2152 const extensions::Extension* extension =
2153 LoadExtension(test_data_dir_.AppendASCII("../simple_with_file")); 2153 LoadExtension(test_data_dir_.AppendASCII("../simple_with_file"));
2154 ASSERT_TRUE(extension); 2154 ASSERT_TRUE(extension);
2155 2155
2156 // Navigate a tab to an extension page. 2156 // Navigate a tab to an extension page.
2157 GURL extension_url = extension->GetResourceURL("file.html"); 2157 GURL extension_url = extension->GetResourceURL("file.html");
2158 ui_test_utils::NavigateToURL(browser(), extension_url); 2158 ui_test_utils::NavigateToURL(browser(), extension_url);
2159 content::WebContents* old_contents = 2159 content::WebContents* old_contents =
2160 browser()->tab_strip_model()->GetActiveWebContents(); 2160 browser()->tab_strip_model()->GetActiveWebContents();
(...skipping 19 matching lines...) Expand all
2180 2180
2181 // Verify that the |new_contents| doesn't have a |window.opener| set. 2181 // Verify that the |new_contents| doesn't have a |window.opener| set.
2182 bool window_opener_cast_to_bool = true; 2182 bool window_opener_cast_to_bool = true;
2183 EXPECT_TRUE(ExecuteScriptAndExtractBool( 2183 EXPECT_TRUE(ExecuteScriptAndExtractBool(
2184 new_contents, "window.domAutomationController.send(!!window.opener)", 2184 new_contents, "window.domAutomationController.send(!!window.opener)",
2185 &window_opener_cast_to_bool)); 2185 &window_opener_cast_to_bool));
2186 EXPECT_FALSE(window_opener_cast_to_bool); 2186 EXPECT_FALSE(window_opener_cast_to_bool);
2187 } 2187 }
2188 2188
2189 } // namespace extensions 2189 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698