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

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

Issue 10253021: Restore context menus to hosted app sites. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix tests Created 8 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/tab_contents/render_view_context_menu.h » ('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 #include "base/command_line.h" 5 #include "base/command_line.h"
6 #include "base/stringprintf.h" 6 #include "base/stringprintf.h"
7 #include "base/utf_string_conversions.h" 7 #include "base/utf_string_conversions.h"
8 #include "chrome/browser/extensions/extension_apitest.h" 8 #include "chrome/browser/extensions/extension_apitest.h"
9 #include "chrome/browser/extensions/extension_browsertest.h" 9 #include "chrome/browser/extensions/extension_browsertest.h"
10 #include "chrome/browser/extensions/extension_host.h" 10 #include "chrome/browser/extensions/extension_host.h"
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 // platform app shell window that is found (most tests only deal with one 102 // platform app shell window that is found (most tests only deal with one
103 // platform app window, so this is good enough). 103 // platform app window, so this is good enough).
104 WebContents* GetFirstPlatformAppShellWindowWebContents() { 104 WebContents* GetFirstPlatformAppShellWindowWebContents() {
105 ExtensionProcessManager* process_manager = 105 ExtensionProcessManager* process_manager =
106 browser()->profile()->GetExtensionProcessManager(); 106 browser()->profile()->GetExtensionProcessManager();
107 ExtensionProcessManager::const_iterator iter; 107 ExtensionProcessManager::const_iterator iter;
108 ExtensionProcessManager::ExtensionHostSet platform_app_hosts = 108 ExtensionProcessManager::ExtensionHostSet platform_app_hosts =
109 process_manager->platform_app_hosts(); 109 process_manager->platform_app_hosts();
110 for (iter = platform_app_hosts.begin(); iter != platform_app_hosts.end(); 110 for (iter = platform_app_hosts.begin(); iter != platform_app_hosts.end();
111 ++iter) { 111 ++iter) {
112 return (*iter)->host_contents(); 112 if ((*iter)->extension_host_type() == chrome::VIEW_TYPE_APP_SHELL)
113 return (*iter)->host_contents();
113 } 114 }
114 115
115 return NULL; 116 return NULL;
116 } 117 }
117 }; 118 };
118 119
119 // Tests that platform apps received the "launch" event when launched. 120 // Tests that platform apps received the "launch" event when launched.
120 IN_PROC_BROWSER_TEST_F(PlatformAppBrowserTest, OnLaunchedEvent) { 121 IN_PROC_BROWSER_TEST_F(PlatformAppBrowserTest, OnLaunchedEvent) {
121 ASSERT_TRUE(RunPlatformAppTest("platform_apps/launch")) << message_; 122 ASSERT_TRUE(RunPlatformAppTest("platform_apps/launch")) << message_;
122 } 123 }
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 } 172 }
172 173
173 IN_PROC_BROWSER_TEST_F(PlatformAppBrowserTest, Restrictions) { 174 IN_PROC_BROWSER_TEST_F(PlatformAppBrowserTest, Restrictions) {
174 ASSERT_TRUE(RunPlatformAppTest("platform_apps/restrictions")) << message_; 175 ASSERT_TRUE(RunPlatformAppTest("platform_apps/restrictions")) << message_;
175 } 176 }
176 177
177 // Tests that platform apps can use the chrome.windows.* API. 178 // Tests that platform apps can use the chrome.windows.* API.
178 IN_PROC_BROWSER_TEST_F(PlatformAppBrowserTest, WindowsApi) { 179 IN_PROC_BROWSER_TEST_F(PlatformAppBrowserTest, WindowsApi) {
179 ASSERT_TRUE(RunPlatformAppTest("platform_apps/windows_api")) << message_; 180 ASSERT_TRUE(RunPlatformAppTest("platform_apps/windows_api")) << message_;
180 } 181 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/tab_contents/render_view_context_menu.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698