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

Side by Side Diff: chrome/browser/apps/app_browsertest.cc

Issue 2259773002: binding: Moves the check for the first access to the initial document into BindingSecurity. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2785
Patch Set: Created 4 years, 4 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 <stddef.h> 5 #include <stddef.h>
6 6
7 #include <memory> 7 #include <memory>
8 8
9 #include "apps/launcher.h" 9 #include "apps/launcher.h"
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 23 matching lines...) Expand all
34 #include "chrome/common/url_constants.h" 34 #include "chrome/common/url_constants.h"
35 #include "chrome/test/base/test_switches.h" 35 #include "chrome/test/base/test_switches.h"
36 #include "chrome/test/base/ui_test_utils.h" 36 #include "chrome/test/base/ui_test_utils.h"
37 #include "components/pref_registry/pref_registry_syncable.h" 37 #include "components/pref_registry/pref_registry_syncable.h"
38 #include "components/prefs/pref_service.h" 38 #include "components/prefs/pref_service.h"
39 #include "components/web_modal/web_contents_modal_dialog_manager.h" 39 #include "components/web_modal/web_contents_modal_dialog_manager.h"
40 #include "content/public/browser/devtools_agent_host.h" 40 #include "content/public/browser/devtools_agent_host.h"
41 #include "content/public/browser/host_zoom_map.h" 41 #include "content/public/browser/host_zoom_map.h"
42 #include "content/public/browser/render_process_host.h" 42 #include "content/public/browser/render_process_host.h"
43 #include "content/public/browser/render_widget_host_view.h" 43 #include "content/public/browser/render_widget_host_view.h"
44 #include "content/public/test/browser_test_utils.h"
44 #include "content/public/test/test_utils.h" 45 #include "content/public/test/test_utils.h"
45 #include "extensions/browser/app_window/app_window.h" 46 #include "extensions/browser/app_window/app_window.h"
46 #include "extensions/browser/app_window/app_window_registry.h" 47 #include "extensions/browser/app_window/app_window_registry.h"
47 #include "extensions/browser/app_window/native_app_window.h" 48 #include "extensions/browser/app_window/native_app_window.h"
48 #include "extensions/browser/event_router.h" 49 #include "extensions/browser/event_router.h"
49 #include "extensions/browser/extension_prefs.h" 50 #include "extensions/browser/extension_prefs.h"
50 #include "extensions/browser/extension_registry.h" 51 #include "extensions/browser/extension_registry.h"
51 #include "extensions/browser/extension_registry_observer.h" 52 #include "extensions/browser/extension_registry_observer.h"
52 #include "extensions/browser/pref_names.h" 53 #include "extensions/browser/pref_names.h"
53 #include "extensions/common/api/app_runtime.h" 54 #include "extensions/common/api/app_runtime.h"
(...skipping 397 matching lines...) Expand 10 before | Expand all | Expand 10 after
451 // TODO(lazyboy): non-external urls also succeed right now because of 452 // TODO(lazyboy): non-external urls also succeed right now because of
452 // http://crbug.com/585570 not being fixed. Fix the test once the bug is 453 // http://crbug.com/585570 not being fixed. Fix the test once the bug is
453 // fixed. 454 // fixed.
454 // const size_t kExpectedNumberOfTabs = 2u; 455 // const size_t kExpectedNumberOfTabs = 2u;
455 const size_t kExpectedNumberOfTabs = 6u; 456 const size_t kExpectedNumberOfTabs = 6u;
456 TabsAddedNotificationObserver observer(kExpectedNumberOfTabs); 457 TabsAddedNotificationObserver observer(kExpectedNumberOfTabs);
457 ASSERT_TRUE(RunPlatformAppTest("platform_apps/background_page_navigation")) << 458 ASSERT_TRUE(RunPlatformAppTest("platform_apps/background_page_navigation")) <<
458 message_; 459 message_;
459 observer.Wait(); 460 observer.Wait();
460 ASSERT_EQ(kExpectedNumberOfTabs, observer.tabs().size()); 461 ASSERT_EQ(kExpectedNumberOfTabs, observer.tabs().size());
462 content::WaitForLoadStop(observer.tabs()[kExpectedNumberOfTabs - 1]);
461 EXPECT_EQ(GURL(kChromiumURL), 463 EXPECT_EQ(GURL(kChromiumURL),
462 observer.tabs()[kExpectedNumberOfTabs - 1]->GetURL()); 464 observer.tabs()[kExpectedNumberOfTabs - 1]->GetURL());
465 content::WaitForLoadStop(observer.tabs()[kExpectedNumberOfTabs - 2]);
463 EXPECT_EQ(GURL(kChromiumURL), 466 EXPECT_EQ(GURL(kChromiumURL),
464 observer.tabs()[kExpectedNumberOfTabs - 2]->GetURL()); 467 observer.tabs()[kExpectedNumberOfTabs - 2]->GetURL());
465 } 468 }
466 469
467 // Failing on some Win and Linux buildbots. See crbug.com/354425. 470 // Failing on some Win and Linux buildbots. See crbug.com/354425.
468 #if defined(OS_WIN) || defined(OS_LINUX) 471 #if defined(OS_WIN) || defined(OS_LINUX)
469 #define MAYBE_Iframes DISABLED_Iframes 472 #define MAYBE_Iframes DISABLED_Iframes
470 #else 473 #else
471 #define MAYBE_Iframes Iframes 474 #define MAYBE_Iframes Iframes
472 #endif 475 #endif
(...skipping 916 matching lines...) Expand 10 before | Expand all | Expand 10 after
1389 // https://crbug.com/620194. 1392 // https://crbug.com/620194.
1390 #define MAYBE_AppWindowIframe DISABLED_AppWindowIframe 1393 #define MAYBE_AppWindowIframe DISABLED_AppWindowIframe
1391 // Sends chrome.test.sendMessage from chrome.app.window.create's callback. 1394 // Sends chrome.test.sendMessage from chrome.app.window.create's callback.
1392 // The app window also adds an <iframe> to the page during window.onload. 1395 // The app window also adds an <iframe> to the page during window.onload.
1393 IN_PROC_BROWSER_TEST_F(PlatformAppBrowserTest, MAYBE_AppWindowIframe) { 1396 IN_PROC_BROWSER_TEST_F(PlatformAppBrowserTest, MAYBE_AppWindowIframe) {
1394 LoadAndLaunchPlatformApp("app_window_send_message", 1397 LoadAndLaunchPlatformApp("app_window_send_message",
1395 "APP_WINDOW_CREATE_CALLBACK"); 1398 "APP_WINDOW_CREATE_CALLBACK");
1396 } 1399 }
1397 1400
1398 } // namespace extensions 1401 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698