| OLD | NEW |
| 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/browser/extensions/extension_apitest.h" | 5 #include "chrome/browser/extensions/extension_apitest.h" |
| 6 #include "chrome/browser/extensions/extension_host.h" | 6 #include "chrome/browser/extensions/extension_host.h" |
| 7 #include "chrome/browser/extensions/extension_service.h" | 7 #include "chrome/browser/extensions/extension_service.h" |
| 8 #include "chrome/browser/extensions/extension_system.h" | 8 #include "chrome/browser/extensions/extension_system.h" |
| 9 #include "chrome/browser/extensions/process_map.h" | 9 #include "chrome/browser/extensions/process_map.h" |
| 10 #include "chrome/browser/profiles/profile.h" | 10 #include "chrome/browser/profiles/profile.h" |
| (...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 271 DISABLED_AppProcessBackgroundInstances | 271 DISABLED_AppProcessBackgroundInstances |
| 272 #else | 272 #else |
| 273 #define MAYBE_AppProcessBackgroundInstances AppProcessBackgroundInstances | 273 #define MAYBE_AppProcessBackgroundInstances AppProcessBackgroundInstances |
| 274 #endif | 274 #endif |
| 275 IN_PROC_BROWSER_TEST_F(AppApiTest, MAYBE_AppProcessBackgroundInstances) { | 275 IN_PROC_BROWSER_TEST_F(AppApiTest, MAYBE_AppProcessBackgroundInstances) { |
| 276 TestAppInstancesHelper("app_process_background_instances"); | 276 TestAppInstancesHelper("app_process_background_instances"); |
| 277 } | 277 } |
| 278 | 278 |
| 279 // Tests that bookmark apps do not use the app process model and are treated | 279 // Tests that bookmark apps do not use the app process model and are treated |
| 280 // like normal web pages instead. http://crbug.com/104636. | 280 // like normal web pages instead. http://crbug.com/104636. |
| 281 IN_PROC_BROWSER_TEST_F(AppApiTest, BookmarkAppGetsNormalProcess) { | 281 // Timing out on Windows. http://crbug.com/238777 |
| 282 #if defined(OS_WIN) |
| 283 #define MAYBE_BookmarkAppGetsNormalProcess DISABLED_BookmarkAppGetsNormalProcess |
| 284 #else |
| 285 #define MAYBE_BookmarkAppGetsNormalProcess BookmarkAppGetsNormalProcess |
| 286 #endif |
| 287 IN_PROC_BROWSER_TEST_F(AppApiTest, MAYBE_BookmarkAppGetsNormalProcess) { |
| 282 ExtensionService* service = extensions::ExtensionSystem::Get( | 288 ExtensionService* service = extensions::ExtensionSystem::Get( |
| 283 browser()->profile())->extension_service(); | 289 browser()->profile())->extension_service(); |
| 284 extensions::ProcessMap* process_map = service->process_map(); | 290 extensions::ProcessMap* process_map = service->process_map(); |
| 285 | 291 |
| 286 host_resolver()->AddRule("*", "127.0.0.1"); | 292 host_resolver()->AddRule("*", "127.0.0.1"); |
| 287 ASSERT_TRUE(test_server()->Start()); | 293 ASSERT_TRUE(test_server()->Start()); |
| 288 GURL base_url = GetTestBaseURL("app_process"); | 294 GURL base_url = GetTestBaseURL("app_process"); |
| 289 | 295 |
| 290 // Load an app as a bookmark app. | 296 // Load an app as a bookmark app. |
| 291 std::string error; | 297 std::string error; |
| (...skipping 440 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 732 &browser()->tab_strip_model()->GetActiveWebContents()-> | 738 &browser()->tab_strip_model()->GetActiveWebContents()-> |
| 733 GetController())); | 739 GetController())); |
| 734 chrome::Reload(browser(), CURRENT_TAB); | 740 chrome::Reload(browser(), CURRENT_TAB); |
| 735 observer.Wait(); | 741 observer.Wait(); |
| 736 ASSERT_TRUE(content::ExecuteScriptAndExtractBool( | 742 ASSERT_TRUE(content::ExecuteScriptAndExtractBool( |
| 737 contents, | 743 contents, |
| 738 "window.domAutomationController.send(chrome.app.isInstalled)", | 744 "window.domAutomationController.send(chrome.app.isInstalled)", |
| 739 &is_installed)); | 745 &is_installed)); |
| 740 ASSERT_TRUE(is_installed); | 746 ASSERT_TRUE(is_installed); |
| 741 } | 747 } |
| OLD | NEW |