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