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

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

Issue 8892011: Clean up TCW, make it solely a hub for 1:1 observer/helper objects. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years 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
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/utf_string_conversions.h" 5 #include "base/utf_string_conversions.h"
6 #include "chrome/browser/automation/automation_util.h" 6 #include "chrome/browser/automation/automation_util.h"
7 #include "chrome/browser/extensions/extension_apitest.h" 7 #include "chrome/browser/extensions/extension_apitest.h"
8 #include "chrome/browser/extensions/extension_host.h" 8 #include "chrome/browser/extensions/extension_host.h"
9 #include "chrome/browser/extensions/extension_service.h" 9 #include "chrome/browser/extensions/extension_service.h"
10 #include "chrome/browser/profiles/profile.h" 10 #include "chrome/browser/profiles/profile.h"
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 // process, even if they aren't in the app manifest.) 111 // process, even if they aren't in the app manifest.)
112 EXPECT_TRUE(HasCookie(tab1, "nonAppFrame=6")); 112 EXPECT_TRUE(HasCookie(tab1, "nonAppFrame=6"));
113 EXPECT_FALSE(HasCookie(tab3, "nonAppFrame")); 113 EXPECT_FALSE(HasCookie(tab3, "nonAppFrame"));
114 114
115 // Check that isolation persists even if the tab crashes and is reloaded. 115 // Check that isolation persists even if the tab crashes and is reloaded.
116 browser()->SelectNumberedTab(1); 116 browser()->SelectNumberedTab(1);
117 ui_test_utils::CrashTab(tab1); 117 ui_test_utils::CrashTab(tab1);
118 ui_test_utils::WindowedNotificationObserver observer( 118 ui_test_utils::WindowedNotificationObserver observer(
119 content::NOTIFICATION_LOAD_STOP, 119 content::NOTIFICATION_LOAD_STOP,
120 content::Source<NavigationController>( 120 content::Source<NavigationController>(
121 &browser()->GetSelectedTabContentsWrapper()->controller())); 121 &browser()->GetSelectedTabContentsWrapper()->tab_contents()->
122 controller()));
122 browser()->Reload(CURRENT_TAB); 123 browser()->Reload(CURRENT_TAB);
123 observer.Wait(); 124 observer.Wait();
124 EXPECT_TRUE(HasCookie(tab1, "app1=3")); 125 EXPECT_TRUE(HasCookie(tab1, "app1=3"));
125 EXPECT_FALSE(HasCookie(tab1, "app2")); 126 EXPECT_FALSE(HasCookie(tab1, "app2"));
126 EXPECT_FALSE(HasCookie(tab1, "normalPage")); 127 EXPECT_FALSE(HasCookie(tab1, "normalPage"));
127 } 128 }
128 129
129 // Ensure that cookies are not isolated if the isolated apps are not installed. 130 // Ensure that cookies are not isolated if the isolated apps are not installed.
130 IN_PROC_BROWSER_TEST_F(IsolatedAppTest, NoCookieIsolationWithoutApp) { 131 IN_PROC_BROWSER_TEST_F(IsolatedAppTest, NoCookieIsolationWithoutApp) {
131 host_resolver()->AddRule("*", "127.0.0.1"); 132 host_resolver()->AddRule("*", "127.0.0.1");
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
288 EXPECT_NE(hosted1_host, web1_host); 289 EXPECT_NE(hosted1_host, web1_host);
289 EXPECT_NE(hosted1_host, extension1_host); 290 EXPECT_NE(hosted1_host, extension1_host);
290 291
291 // Web pages only share with each other. 292 // Web pages only share with each other.
292 EXPECT_EQ(web1_host, web2_host); 293 EXPECT_EQ(web1_host, web2_host);
293 EXPECT_NE(web1_host, extension1_host); 294 EXPECT_NE(web1_host, extension1_host);
294 295
295 // Extensions only share with each other. 296 // Extensions only share with each other.
296 EXPECT_EQ(extension1_host, extension2_host); 297 EXPECT_EQ(extension1_host, extension2_host);
297 } 298 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_tabs_module.cc ('k') | chrome/browser/external_tab_container_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698