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 "base/utf_string_conversions.h" | 5 #include "base/utf_string_conversions.h" |
6 #include "chrome/browser/extensions/extension_apitest.h" | 6 #include "chrome/browser/extensions/extension_apitest.h" |
7 #include "chrome/browser/extensions/extension_host.h" | 7 #include "chrome/browser/extensions/extension_host.h" |
8 #include "chrome/browser/extensions/extension_service.h" | 8 #include "chrome/browser/extensions/extension_service.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 370 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
381 ASSERT_EQ(3, browser()->tab_count()); | 381 ASSERT_EQ(3, browser()->tab_count()); |
382 EXPECT_EQ("/files/extensions/api_test/app_process/path1/empty.html", | 382 EXPECT_EQ("/files/extensions/api_test/app_process/path1/empty.html", |
383 browser()->GetWebContentsAt(2)->GetController(). | 383 browser()->GetWebContentsAt(2)->GetController(). |
384 GetLastCommittedEntry()->GetURL().path()); | 384 GetLastCommittedEntry()->GetURL().path()); |
385 EXPECT_EQ(browser()->GetWebContentsAt(1)->GetRenderProcessHost(), | 385 EXPECT_EQ(browser()->GetWebContentsAt(1)->GetRenderProcessHost(), |
386 browser()->GetWebContentsAt(2)->GetRenderProcessHost()); | 386 browser()->GetWebContentsAt(2)->GetRenderProcessHost()); |
387 } | 387 } |
388 | 388 |
389 // Ensure that reloading a URL after installing or uninstalling it as an app | 389 // Ensure that reloading a URL after installing or uninstalling it as an app |
390 // correctly swaps the process. (http://crbug.com/80621) | 390 // correctly swaps the process. (http://crbug.com/80621) |
391 // Disabled until we get a correct fix for 80621. See http://crbug.com/102408. | 391 IN_PROC_BROWSER_TEST_F(AppApiTest, ReloadIntoAppProcess) { |
392 IN_PROC_BROWSER_TEST_F(AppApiTest, DISABLED_ReloadIntoAppProcess) { | |
393 CommandLine::ForCurrentProcess()->AppendSwitch( | 392 CommandLine::ForCurrentProcess()->AppendSwitch( |
394 switches::kDisablePopupBlocking); | 393 switches::kDisablePopupBlocking); |
395 | 394 |
396 extensions::ProcessMap* process_map = | 395 extensions::ProcessMap* process_map = |
397 browser()->profile()->GetExtensionService()->process_map(); | 396 browser()->profile()->GetExtensionService()->process_map(); |
398 | 397 |
399 host_resolver()->AddRule("*", "127.0.0.1"); | 398 host_resolver()->AddRule("*", "127.0.0.1"); |
400 ASSERT_TRUE(test_server()->Start()); | 399 ASSERT_TRUE(test_server()->Start()); |
401 | 400 |
402 // The app under test acts on URLs whose host is "localhost", | 401 // The app under test acts on URLs whose host is "localhost", |
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
660 &browser()->GetSelectedTabContentsWrapper()->web_contents()-> | 659 &browser()->GetSelectedTabContentsWrapper()->web_contents()-> |
661 GetController())); | 660 GetController())); |
662 browser()->Reload(CURRENT_TAB); | 661 browser()->Reload(CURRENT_TAB); |
663 observer.Wait(); | 662 observer.Wait(); |
664 ASSERT_TRUE(ui_test_utils::ExecuteJavaScriptAndExtractBool( | 663 ASSERT_TRUE(ui_test_utils::ExecuteJavaScriptAndExtractBool( |
665 contents->GetRenderViewHost(), L"", | 664 contents->GetRenderViewHost(), L"", |
666 L"window.domAutomationController.send(chrome.app.isInstalled)", | 665 L"window.domAutomationController.send(chrome.app.isInstalled)", |
667 &is_installed)); | 666 &is_installed)); |
668 ASSERT_TRUE(is_installed); | 667 ASSERT_TRUE(is_installed); |
669 } | 668 } |
OLD | NEW |