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

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

Issue 10387074: Only disallow top-level navigations in platform apps (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Nits 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/external_tab/external_tab_container_win.cc » ('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/automation/automation_util.h" 8 #include "chrome/browser/automation/automation_util.h"
9 #include "chrome/browser/extensions/extension_apitest.h" 9 #include "chrome/browser/extensions/extension_apitest.h"
10 #include "chrome/browser/extensions/extension_browsertest.h" 10 #include "chrome/browser/extensions/extension_browsertest.h"
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 // TODO(benwells): Remove the constant below. Instead of checking the 142 // TODO(benwells): Remove the constant below. Instead of checking the
143 // number of menu items check certain item's absense and presence. 143 // number of menu items check certain item's absense and presence.
144 ASSERT_EQ(4, menu->menu_model().GetItemCount()); 144 ASSERT_EQ(4, menu->menu_model().GetItemCount());
145 } 145 }
146 146
147 IN_PROC_BROWSER_TEST_F(PlatformAppBrowserTest, DisallowNavigation) { 147 IN_PROC_BROWSER_TEST_F(PlatformAppBrowserTest, DisallowNavigation) {
148 ASSERT_TRUE(StartTestServer()); 148 ASSERT_TRUE(StartTestServer());
149 ASSERT_TRUE(RunPlatformAppTest("platform_apps/navigation")) << message_; 149 ASSERT_TRUE(RunPlatformAppTest("platform_apps/navigation")) << message_;
150 } 150 }
151 151
152 IN_PROC_BROWSER_TEST_F(PlatformAppBrowserTest, Iframes) {
153 ASSERT_TRUE(StartTestServer());
154 ASSERT_TRUE(RunPlatformAppTest("platform_apps/iframes")) << message_;
155 }
156
152 // Tests that localStorage and WebSQL are disabled for platform apps. 157 // Tests that localStorage and WebSQL are disabled for platform apps.
153 IN_PROC_BROWSER_TEST_F(PlatformAppBrowserTest, DisallowStorage) { 158 IN_PROC_BROWSER_TEST_F(PlatformAppBrowserTest, DisallowStorage) {
154 ASSERT_TRUE(RunPlatformAppTest("platform_apps/storage")) << message_; 159 ASSERT_TRUE(RunPlatformAppTest("platform_apps/storage")) << message_;
155 } 160 }
156 161
157 IN_PROC_BROWSER_TEST_F(PlatformAppBrowserTest, Restrictions) { 162 IN_PROC_BROWSER_TEST_F(PlatformAppBrowserTest, Restrictions) {
158 ASSERT_TRUE(RunPlatformAppTest("platform_apps/restrictions")) << message_; 163 ASSERT_TRUE(RunPlatformAppTest("platform_apps/restrictions")) << message_;
159 } 164 }
160 165
161 // Tests that platform apps can use the chrome.windows.* API. 166 // Tests that platform apps can use the chrome.windows.* API.
(...skipping 24 matching lines...) Expand all
186 set_cookie_url, 191 set_cookie_url,
187 browser()->GetWebContentsAt(0), 192 browser()->GetWebContentsAt(0),
188 &cookie_size, 193 &cookie_size,
189 &cookie_value); 194 &cookie_value);
190 ASSERT_EQ("testCookie=1", cookie_value); 195 ASSERT_EQ("testCookie=1", cookie_value);
191 196
192 // Let the platform app request the same URL, and make sure that it doesn't 197 // Let the platform app request the same URL, and make sure that it doesn't
193 // see the cookie. 198 // see the cookie.
194 ASSERT_TRUE(RunPlatformAppTest("platform_apps/isolation")) << message_; 199 ASSERT_TRUE(RunPlatformAppTest("platform_apps/isolation")) << message_;
195 } 200 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/external_tab/external_tab_container_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698