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

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

Issue 49253005: Fetch extension blacklist states from SafeBrowsing server (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years 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/blacklist.h » ('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 "base/command_line.h" 5 #include "base/command_line.h"
6 #include "chrome/browser/chrome_notification_types.h" 6 #include "chrome/browser/chrome_notification_types.h"
7 #include "chrome/browser/extensions/extension_apitest.h" 7 #include "chrome/browser/extensions/extension_apitest.h"
8 #include "chrome/browser/extensions/extension_host.h" 8 #include "chrome/browser/extensions/extension_host.h"
9 #include "chrome/browser/extensions/extension_service.h" 9 #include "chrome/browser/extensions/extension_service.h"
10 #include "chrome/browser/extensions/extension_system.h" 10 #include "chrome/browser/extensions/extension_system.h"
(...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after
303 // Load an app as a bookmark app. 303 // Load an app as a bookmark app.
304 std::string error; 304 std::string error;
305 scoped_refptr<const Extension> extension(extension_file_util::LoadExtension( 305 scoped_refptr<const Extension> extension(extension_file_util::LoadExtension(
306 test_data_dir_.AppendASCII("app_process"), 306 test_data_dir_.AppendASCII("app_process"),
307 extensions::Manifest::UNPACKED, 307 extensions::Manifest::UNPACKED,
308 Extension::FROM_BOOKMARK, 308 Extension::FROM_BOOKMARK,
309 &error)); 309 &error));
310 service->OnExtensionInstalled(extension.get(), 310 service->OnExtensionInstalled(extension.get(),
311 syncer::StringOrdinal::CreateInitialOrdinal(), 311 syncer::StringOrdinal::CreateInitialOrdinal(),
312 false /* no requirement errors */, 312 false /* no requirement errors */,
313 extensions::Blacklist::NOT_BLACKLISTED, 313 extensions::NOT_BLACKLISTED,
314 false /* don't wait for idle */); 314 false /* don't wait for idle */);
315 ASSERT_TRUE(extension.get()); 315 ASSERT_TRUE(extension.get());
316 ASSERT_TRUE(extension->from_bookmark()); 316 ASSERT_TRUE(extension->from_bookmark());
317 317
318 // Test both opening a URL in a new tab, and opening a tab and then navigating 318 // Test both opening a URL in a new tab, and opening a tab and then navigating
319 // it. Either way, bookmark app tabs should be considered normal processes 319 // it. Either way, bookmark app tabs should be considered normal processes
320 // with no elevated privileges and no WebUI bindings. 320 // with no elevated privileges and no WebUI bindings.
321 ui_test_utils::NavigateToURLWithDisposition( 321 ui_test_utils::NavigateToURLWithDisposition(
322 browser(), base_url.Resolve("path1/empty.html"), NEW_FOREGROUND_TAB, 322 browser(), base_url.Resolve("path1/empty.html"), NEW_FOREGROUND_TAB,
323 ui_test_utils::BROWSER_TEST_WAIT_FOR_NAVIGATION); 323 ui_test_utils::BROWSER_TEST_WAIT_FOR_NAVIGATION);
(...skipping 541 matching lines...) Expand 10 before | Expand all | Expand 10 after
865 // Navigate the popup to another process outside the app. 865 // Navigate the popup to another process outside the app.
866 GURL non_app_url(base_url.Resolve("path3/empty.html")); 866 GURL non_app_url(base_url.Resolve("path3/empty.html"));
867 ui_test_utils::NavigateToURL(active_browser_list->get(1), non_app_url); 867 ui_test_utils::NavigateToURL(active_browser_list->get(1), non_app_url);
868 SiteInstance* new_instance = popup_contents->GetSiteInstance(); 868 SiteInstance* new_instance = popup_contents->GetSiteInstance();
869 EXPECT_NE(app_instance, new_instance); 869 EXPECT_NE(app_instance, new_instance);
870 870
871 // It should still be in the same BrowsingInstance, allowing postMessage to 871 // It should still be in the same BrowsingInstance, allowing postMessage to
872 // work. 872 // work.
873 EXPECT_TRUE(app_instance->IsRelatedSiteInstance(new_instance)); 873 EXPECT_TRUE(app_instance->IsRelatedSiteInstance(new_instance));
874 } 874 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/extensions/blacklist.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698