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

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

Issue 10702029: Move tab functions off Browser into browser_tabstrip and browser_tabrestore. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 5 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
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 "chrome/app/chrome_command_ids.h" 5 #include "chrome/app/chrome_command_ids.h"
6 #include "chrome/browser/automation/automation_util.h" 6 #include "chrome/browser/automation/automation_util.h"
7 #include "chrome/browser/tab_contents/render_view_context_menu.h" 7 #include "chrome/browser/tab_contents/render_view_context_menu.h"
8 #include "chrome/browser/extensions/extension_test_message_listener.h" 8 #include "chrome/browser/extensions/extension_test_message_listener.h"
9 #include "chrome/browser/extensions/platform_app_browsertest_util.h" 9 #include "chrome/browser/extensions/platform_app_browsertest_util.h"
10 #include "chrome/browser/extensions/shell_window_registry.h" 10 #include "chrome/browser/extensions/shell_window_registry.h"
11 #include "chrome/browser/ui/browser.h" 11 #include "chrome/browser/ui/browser.h"
12 #include "chrome/browser/ui/browser_tabstrip.h"
12 #include "chrome/browser/ui/extensions/shell_window.h" 13 #include "chrome/browser/ui/extensions/shell_window.h"
13 #include "chrome/common/chrome_notification_types.h" 14 #include "chrome/common/chrome_notification_types.h"
14 #include "chrome/test/base/ui_test_utils.h" 15 #include "chrome/test/base/ui_test_utils.h"
15 16
16 using content::WebContents; 17 using content::WebContents;
17 using extensions::Extension; 18 using extensions::Extension;
18 19
19 namespace { 20 namespace {
20 // Non-abstract RenderViewContextMenu class. 21 // Non-abstract RenderViewContextMenu class.
21 class PlatformAppContextMenu : public RenderViewContextMenu { 22 class PlatformAppContextMenu : public RenderViewContextMenu {
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 139
139 ui_test_utils::NavigateToURLWithDisposition( 140 ui_test_utils::NavigateToURLWithDisposition(
140 browser(), set_cookie_url, 141 browser(), set_cookie_url,
141 CURRENT_TAB, ui_test_utils::BROWSER_TEST_WAIT_FOR_NAVIGATION); 142 CURRENT_TAB, ui_test_utils::BROWSER_TEST_WAIT_FOR_NAVIGATION);
142 143
143 // Make sure the cookie is set. 144 // Make sure the cookie is set.
144 int cookie_size; 145 int cookie_size;
145 std::string cookie_value; 146 std::string cookie_value;
146 automation_util::GetCookies( 147 automation_util::GetCookies(
147 set_cookie_url, 148 set_cookie_url,
148 browser()->GetWebContentsAt(0), 149 chrome::GetWebContentsAt(browser(), 0),
149 &cookie_size, 150 &cookie_size,
150 &cookie_value); 151 &cookie_value);
151 ASSERT_EQ("testCookie=1", cookie_value); 152 ASSERT_EQ("testCookie=1", cookie_value);
152 153
153 // Let the platform app request the same URL, and make sure that it doesn't 154 // Let the platform app request the same URL, and make sure that it doesn't
154 // see the cookie. 155 // see the cookie.
155 ASSERT_TRUE(RunPlatformAppTest("platform_apps/isolation")) << message_; 156 ASSERT_TRUE(RunPlatformAppTest("platform_apps/isolation")) << message_;
156 } 157 }
157 158
158 IN_PROC_BROWSER_TEST_F(PlatformAppBrowserTest, ExtensionWindowingApis) { 159 IN_PROC_BROWSER_TEST_F(PlatformAppBrowserTest, ExtensionWindowingApis) {
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
270 271
271 IN_PROC_BROWSER_TEST_F(PlatformAppBrowserTest, OpenLink) { 272 IN_PROC_BROWSER_TEST_F(PlatformAppBrowserTest, OpenLink) {
272 ASSERT_TRUE(StartTestServer()); 273 ASSERT_TRUE(StartTestServer());
273 ui_test_utils::WindowedNotificationObserver observer( 274 ui_test_utils::WindowedNotificationObserver observer(
274 chrome::NOTIFICATION_TAB_ADDED, 275 chrome::NOTIFICATION_TAB_ADDED,
275 content::Source<content::WebContentsDelegate>(browser())); 276 content::Source<content::WebContentsDelegate>(browser()));
276 LoadAndLaunchPlatformApp("open_link"); 277 LoadAndLaunchPlatformApp("open_link");
277 observer.Wait(); 278 observer.Wait();
278 ASSERT_EQ(2, browser()->tab_count()); 279 ASSERT_EQ(2, browser()->tab_count());
279 } 280 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/page_action_browsertest.cc ('k') | chrome/browser/extensions/plugin_apitest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698