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

Side by Side Diff: chrome/test/ppapi/ppapi_browsertest.cc

Issue 720633003: Revert of CL 722703002 due to build breakage (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: revert Created 6 years, 1 month 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
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/path_service.h" 5 #include "base/path_service.h"
6 #include "base/test/test_timeouts.h" 6 #include "base/test/test_timeouts.h"
7 #include "build/build_config.h" 7 #include "build/build_config.h"
8 #include "chrome/browser/extensions/extension_browsertest.h" 8 #include "chrome/browser/extensions/extension_browsertest.h"
9 #include "chrome/browser/profiles/profile.h" 9 #include "chrome/browser/profiles/profile.h"
10 #include "chrome/browser/ui/browser.h" 10 #include "chrome/browser/ui/browser.h"
11 #include "chrome/browser/ui/browser_navigator.h" 11 #include "chrome/browser/ui/browser_navigator.h"
12 #include "chrome/browser/ui/extensions/app_launch_params.h" 12 #include "chrome/browser/ui/extensions/app_launch_params.h"
13 #include "chrome/browser/ui/extensions/application_launch.h" 13 #include "chrome/browser/ui/extensions/application_launch.h"
14 #include "chrome/browser/ui/tabs/tab_strip_model.h" 14 #include "chrome/browser/ui/tabs/tab_strip_model.h"
15 #include "chrome/common/chrome_paths.h" 15 #include "chrome/common/chrome_paths.h"
16 #include "chrome/test/base/ui_test_utils.h" 16 #include "chrome/test/base/ui_test_utils.h"
17 #include "chrome/test/nacl/nacl_browsertest_util.h" 17 #include "chrome/test/nacl/nacl_browsertest_util.h"
18 #include "chrome/test/ppapi/ppapi_test.h" 18 #include "chrome/test/ppapi/ppapi_test.h"
19 #include "components/content_settings/core/browser/host_content_settings_map.h" 19 #include "components/content_settings/core/browser/host_content_settings_map.h"
20 #include "components/nacl/common/nacl_switches.h" 20 #include "components/nacl/common/nacl_switches.h"
21 #include "content/public/browser/web_contents.h" 21 #include "content/public/browser/web_contents.h"
22 #include "content/public/common/url_constants.h" 22 #include "content/public/common/url_constants.h"
23 #include "content/public/test/javascript_test_observer.h" 23 #include "content/public/test/javascript_test_observer.h"
24 #include "content/public/test/test_renderer_host.h" 24 #include "content/public/test/test_renderer_host.h"
25 #include "extensions/common/constants.h"
26 #include "extensions/test/extension_test_message_listener.h" 25 #include "extensions/test/extension_test_message_listener.h"
27 #include "ppapi/shared_impl/test_harness_utils.h" 26 #include "ppapi/shared_impl/test_harness_utils.h"
28 27
29 using content::RenderViewHost; 28 using content::RenderViewHost;
30 29
31 // This macro finesses macro expansion to do what we want. 30 // This macro finesses macro expansion to do what we want.
32 #define STRIP_PREFIXES(test_name) ppapi::StripTestPrefixes(#test_name) 31 #define STRIP_PREFIXES(test_name) ppapi::StripTestPrefixes(#test_name)
33 // Turn the given token into a string. This allows us to use precompiler stuff 32 // Turn the given token into a string. This allows us to use precompiler stuff
34 // to turn names into DISABLED_Foo, but still pass a string to RunTest. 33 // to turn names into DISABLED_Foo, but still pass a string to RunTest.
35 #define STRINGIFY(test_name) #test_name 34 #define STRINGIFY(test_name) #test_name
(...skipping 1412 matching lines...) Expand 10 before | Expand all | Expand 10 after
1448 ASSERT_TRUE(PathService::Get(chrome::DIR_GEN_TEST_DATA, &data_dir)); 1447 ASSERT_TRUE(PathService::Get(chrome::DIR_GEN_TEST_DATA, &data_dir));
1449 base::FilePath app_dir = data_dir.AppendASCII("ppapi") 1448 base::FilePath app_dir = data_dir.AppendASCII("ppapi")
1450 .AppendASCII("tests") 1449 .AppendASCII("tests")
1451 .AppendASCII("extensions") 1450 .AppendASCII("extensions")
1452 .AppendASCII("packaged_app") 1451 .AppendASCII("packaged_app")
1453 .AppendASCII(toolchain_); 1452 .AppendASCII(toolchain_);
1454 1453
1455 const extensions::Extension* extension = LoadExtension(app_dir); 1454 const extensions::Extension* extension = LoadExtension(app_dir);
1456 ASSERT_TRUE(extension); 1455 ASSERT_TRUE(extension);
1457 1456
1458 AppLaunchParams params(browser()->profile(), extension, 1457 AppLaunchParams params(browser()->profile(),
1459 extensions::LAUNCH_CONTAINER_NONE, NEW_WINDOW, 1458 extension,
1460 extensions::SOURCE_UNTRACKED); 1459 extensions::LAUNCH_CONTAINER_NONE,
1460 NEW_WINDOW);
1461 params.command_line = *CommandLine::ForCurrentProcess(); 1461 params.command_line = *CommandLine::ForCurrentProcess();
1462 OpenApplication(params); 1462 OpenApplication(params);
1463 } 1463 }
1464 1464
1465 void RunTests() { 1465 void RunTests() {
1466 ExtensionTestMessageListener listener("hello", true); 1466 ExtensionTestMessageListener listener("hello", true);
1467 LaunchTestingApp(); 1467 LaunchTestingApp();
1468 EXPECT_TRUE(listener.WaitUntilSatisfied()); 1468 EXPECT_TRUE(listener.WaitUntilSatisfied());
1469 } 1469 }
1470 protected: 1470 protected:
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
1509 1509
1510 IN_PROC_BROWSER_TEST_F(NonSfiPackagedAppTest, 1510 IN_PROC_BROWSER_TEST_F(NonSfiPackagedAppTest,
1511 MAYBE_PNACL_NONSFI(SuccessfulLoad)) { 1511 MAYBE_PNACL_NONSFI(SuccessfulLoad)) {
1512 RunTests(); 1512 RunTests();
1513 } 1513 }
1514 1514
1515 IN_PROC_BROWSER_TEST_F(TransitionalNonSfiPackagedAppTest, 1515 IN_PROC_BROWSER_TEST_F(TransitionalNonSfiPackagedAppTest,
1516 MAYBE_PNACL_TRANSITIONAL_NONSFI(SuccessfulLoad)) { 1516 MAYBE_PNACL_TRANSITIONAL_NONSFI(SuccessfulLoad)) {
1517 RunTests(); 1517 RunTests();
1518 } 1518 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/ntp/app_launcher_handler.cc ('k') | chrome/test/remoting/remote_desktop_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698