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

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

Issue 10977048: Fix bug in disabling sync for default apps (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Fix browser and integration tests, which got broken Created 8 years, 2 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
« no previous file with comments | « no previous file | chrome/browser/extensions/crx_installer.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "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/process_map.h" 8 #include "chrome/browser/extensions/process_map.h"
9 #include "chrome/browser/profiles/profile.h" 9 #include "chrome/browser/profiles/profile.h"
10 #include "chrome/browser/ui/blocked_content/blocked_content_tab_helper.h" 10 #include "chrome/browser/ui/blocked_content/blocked_content_tab_helper.h"
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after
256 ASSERT_TRUE(test_server()->Start()); 256 ASSERT_TRUE(test_server()->Start());
257 GURL base_url = GetTestBaseURL("app_process"); 257 GURL base_url = GetTestBaseURL("app_process");
258 258
259 // Load an app as a bookmark app. 259 // Load an app as a bookmark app.
260 std::string error; 260 std::string error;
261 scoped_refptr<const Extension> extension(extension_file_util::LoadExtension( 261 scoped_refptr<const Extension> extension(extension_file_util::LoadExtension(
262 test_data_dir_.AppendASCII("app_process"), 262 test_data_dir_.AppendASCII("app_process"),
263 Extension::LOAD, 263 Extension::LOAD,
264 Extension::FROM_BOOKMARK, 264 Extension::FROM_BOOKMARK,
265 &error)); 265 &error));
266 service->OnExtensionInstalled(extension, false, 266 service->OnExtensionInstalled(extension,
267 syncer::StringOrdinal::CreateInitialOrdinal(), 267 syncer::StringOrdinal::CreateInitialOrdinal(),
268 false /* no requirement errors */); 268 false /* no requirement errors */);
269 ASSERT_TRUE(extension.get()); 269 ASSERT_TRUE(extension.get());
270 ASSERT_TRUE(extension->from_bookmark()); 270 ASSERT_TRUE(extension->from_bookmark());
271 271
272 // Test both opening a URL in a new tab, and opening a tab and then navigating 272 // Test both opening a URL in a new tab, and opening a tab and then navigating
273 // it. Either way, bookmark app tabs should be considered normal processes 273 // it. Either way, bookmark app tabs should be considered normal processes
274 // with no elevated privileges and no WebUI bindings. 274 // with no elevated privileges and no WebUI bindings.
275 ui_test_utils::NavigateToURLWithDisposition( 275 ui_test_utils::NavigateToURLWithDisposition(
276 browser(), base_url.Resolve("path1/empty.html"), NEW_FOREGROUND_TAB, 276 browser(), base_url.Resolve("path1/empty.html"), NEW_FOREGROUND_TAB,
(...skipping 351 matching lines...) Expand 10 before | Expand all | Expand 10 after
628 content::Source<NavigationController>( 628 content::Source<NavigationController>(
629 &chrome::GetActiveWebContents(browser())->GetController())); 629 &chrome::GetActiveWebContents(browser())->GetController()));
630 chrome::Reload(browser(), CURRENT_TAB); 630 chrome::Reload(browser(), CURRENT_TAB);
631 observer.Wait(); 631 observer.Wait();
632 ASSERT_TRUE(content::ExecuteJavaScriptAndExtractBool( 632 ASSERT_TRUE(content::ExecuteJavaScriptAndExtractBool(
633 contents->GetRenderViewHost(), L"", 633 contents->GetRenderViewHost(), L"",
634 L"window.domAutomationController.send(chrome.app.isInstalled)", 634 L"window.domAutomationController.send(chrome.app.isInstalled)",
635 &is_installed)); 635 &is_installed));
636 ASSERT_TRUE(is_installed); 636 ASSERT_TRUE(is_installed);
637 } 637 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/extensions/crx_installer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698