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

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

Issue 10447055: Move fileapi into its own component (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixes and use FILEAPI_EXPORT_PRIVATE Created 8 years, 6 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 "base/command_line.h" 5 #include "base/command_line.h"
6 #include "base/stringprintf.h" 6 #include "base/stringprintf.h"
7 #include "base/string_util.h" 7 #include "base/string_util.h"
8 #include "base/values.h" 8 #include "base/values.h"
9 #include "chrome/browser/automation/automation_util.h" 9 #include "chrome/browser/automation/automation_util.h"
10 #include "chrome/browser/extensions/extension_apitest.h" 10 #include "chrome/browser/extensions/extension_apitest.h"
(...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after
291 // There are two total shell windows, but each app can only see its own. 291 // There are two total shell windows, but each app can only see its own.
292 ASSERT_EQ(2U, GetShellWindowCount()); 292 ASSERT_EQ(2U, GetShellWindowCount());
293 ASSERT_EQ(1U, RunGetWindowsFunctionForExtension(platform_app)); 293 ASSERT_EQ(1U, RunGetWindowsFunctionForExtension(platform_app));
294 ASSERT_EQ(1U, RunGetWindowsFunctionForExtension(platform_app2)); 294 ASSERT_EQ(1U, RunGetWindowsFunctionForExtension(platform_app2));
295 } 295 }
296 296
297 // TODO(benwells): fix these tests for ChromeOS. 297 // TODO(benwells): fix these tests for ChromeOS.
298 #if !defined(OS_CHROMEOS) 298 #if !defined(OS_CHROMEOS)
299 // Tests that command line parameters get passed through to platform apps 299 // Tests that command line parameters get passed through to platform apps
300 // via launchData correctly when launching with a file. 300 // via launchData correctly when launching with a file.
301 // TODO(benwells): fix this test for Linux (http://crbug.com/129885).
302 #if !defined(OS_LINUX)
benwells 2012/05/29 10:23:00 This was working on linux but not linux_shared.
303 IN_PROC_BROWSER_TEST_F(PlatformAppBrowserTest, LaunchWithFile) { 301 IN_PROC_BROWSER_TEST_F(PlatformAppBrowserTest, LaunchWithFile) {
304 SetCommandLineArg( "platform_apps/launch_files/test.txt"); 302 SetCommandLineArg( "platform_apps/launch_files/test.txt");
305 ASSERT_TRUE(RunPlatformAppTest("platform_apps/launch_file")) 303 ASSERT_TRUE(RunPlatformAppTest("platform_apps/launch_file"))
306 << message_; 304 << message_;
307 } 305 }
308 #endif // defined(OS_LINUX)
309 306
310 // Tests that no launch data is sent through if the platform app provides 307 // Tests that no launch data is sent through if the platform app provides
311 // an intent with the wrong action. 308 // an intent with the wrong action.
312 IN_PROC_BROWSER_TEST_F(PlatformAppBrowserTest, LaunchWithWrongIntent) { 309 IN_PROC_BROWSER_TEST_F(PlatformAppBrowserTest, LaunchWithWrongIntent) {
313 SetCommandLineArg("platform_apps/launch_files/test.txt"); 310 SetCommandLineArg("platform_apps/launch_files/test.txt");
314 ASSERT_TRUE(RunPlatformAppTest("platform_apps/launch_wrong_intent")) 311 ASSERT_TRUE(RunPlatformAppTest("platform_apps/launch_wrong_intent"))
315 << message_; 312 << message_;
316 } 313 }
317 314
318 // Tests that no launch data is sent through if the file is of the wrong MIME 315 // Tests that no launch data is sent through if the file is of the wrong MIME
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
354 } 351 }
355 352
356 // Tests that no launch data is sent through if there are no arguments passed 353 // Tests that no launch data is sent through if there are no arguments passed
357 // on the command line 354 // on the command line
358 IN_PROC_BROWSER_TEST_F(PlatformAppBrowserTest, LaunchWithNothing) { 355 IN_PROC_BROWSER_TEST_F(PlatformAppBrowserTest, LaunchWithNothing) {
359 ClearCommandLineArgs(); 356 ClearCommandLineArgs();
360 ASSERT_TRUE(RunPlatformAppTest("platform_apps/launch_nothing")) 357 ASSERT_TRUE(RunPlatformAppTest("platform_apps/launch_nothing"))
361 << message_; 358 << message_;
362 } 359 }
363 #endif // defined(OS_CHROMEOS) 360 #endif // defined(OS_CHROMEOS)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698