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 "content/browser/site_per_process_browsertest.h" | 5 #include "content/browser/site_per_process_browsertest.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <algorithm> | 10 #include <algorithm> |
11 #include <map> | 11 #include <map> |
12 #include <set> | 12 #include <set> |
13 #include <vector> | 13 #include <vector> |
14 | 14 |
15 #include "base/bind.h" | 15 #include "base/bind.h" |
16 #include "base/callback.h" | 16 #include "base/callback.h" |
17 #include "base/command_line.h" | 17 #include "base/command_line.h" |
18 #include "base/feature_list.h" | |
19 #include "base/location.h" | 18 #include "base/location.h" |
20 #include "base/memory/ptr_util.h" | 19 #include "base/memory/ptr_util.h" |
21 #include "base/path_service.h" | 20 #include "base/path_service.h" |
22 #include "base/sequenced_task_runner.h" | 21 #include "base/sequenced_task_runner.h" |
23 #include "base/single_thread_task_runner.h" | 22 #include "base/single_thread_task_runner.h" |
24 #include "base/strings/pattern.h" | 23 #include "base/strings/pattern.h" |
25 #include "base/strings/stringprintf.h" | 24 #include "base/strings/stringprintf.h" |
26 #include "base/strings/utf_string_conversions.h" | 25 #include "base/strings/utf_string_conversions.h" |
27 #include "base/test/test_timeouts.h" | 26 #include "base/test/test_timeouts.h" |
28 #include "base/threading/sequenced_task_runner_handle.h" | 27 #include "base/threading/sequenced_task_runner_handle.h" |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
81 #include "third_party/WebKit/public/platform/WebInputEvent.h" | 80 #include "third_party/WebKit/public/platform/WebInputEvent.h" |
82 #include "third_party/WebKit/public/platform/WebInsecureRequestPolicy.h" | 81 #include "third_party/WebKit/public/platform/WebInsecureRequestPolicy.h" |
83 #include "third_party/WebKit/public/web/WebSandboxFlags.h" | 82 #include "third_party/WebKit/public/web/WebSandboxFlags.h" |
84 #include "ui/display/display_switches.h" | 83 #include "ui/display/display_switches.h" |
85 #include "ui/display/screen.h" | 84 #include "ui/display/screen.h" |
86 #include "ui/events/base_event_utils.h" | 85 #include "ui/events/base_event_utils.h" |
87 #include "ui/events/event.h" | 86 #include "ui/events/event.h" |
88 #include "ui/events/event_utils.h" | 87 #include "ui/events/event_utils.h" |
89 #include "ui/gfx/geometry/point.h" | 88 #include "ui/gfx/geometry/point.h" |
90 #include "ui/latency/latency_info.h" | 89 #include "ui/latency/latency_info.h" |
91 #include "ui/native_theme/native_theme_features.h" | 90 #include "ui/native_theme/native_theme_switches.h" |
92 | 91 |
93 #if defined(USE_AURA) | 92 #if defined(USE_AURA) |
94 #include "content/browser/renderer_host/render_widget_host_view_aura.h" | 93 #include "content/browser/renderer_host/render_widget_host_view_aura.h" |
95 #endif | 94 #endif |
96 | 95 |
97 #if defined(OS_MACOSX) | 96 #if defined(OS_MACOSX) |
98 #include "ui/base/test/scoped_preferred_scroller_style_mac.h" | 97 #include "ui/base/test/scoped_preferred_scroller_style_mac.h" |
99 #endif | 98 #endif |
100 | 99 |
101 #if defined(OS_ANDROID) | 100 #if defined(OS_ANDROID) |
(...skipping 511 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
613 SitePerProcessBrowserTest::SitePerProcessBrowserTest() { | 612 SitePerProcessBrowserTest::SitePerProcessBrowserTest() { |
614 }; | 613 }; |
615 | 614 |
616 std::string SitePerProcessBrowserTest::DepictFrameTree(FrameTreeNode* node) { | 615 std::string SitePerProcessBrowserTest::DepictFrameTree(FrameTreeNode* node) { |
617 return visualizer_.DepictFrameTree(node); | 616 return visualizer_.DepictFrameTree(node); |
618 } | 617 } |
619 | 618 |
620 void SitePerProcessBrowserTest::SetUpCommandLine( | 619 void SitePerProcessBrowserTest::SetUpCommandLine( |
621 base::CommandLine* command_line) { | 620 base::CommandLine* command_line) { |
622 IsolateAllSitesForTesting(command_line); | 621 IsolateAllSitesForTesting(command_line); |
623 } | |
624 | |
625 void SitePerProcessBrowserTest::SetUpOnMainThread() { | |
626 #if !defined(OS_ANDROID) | 622 #if !defined(OS_ANDROID) |
627 // TODO(bokan): Needed for scrollability check in | 623 // TODO(bokan): Needed for scrollability check in |
628 // FrameOwnerPropertiesPropagationScrolling. crbug.com/662196. | 624 // FrameOwnerPropertiesPropagationScrolling. crbug.com/662196. |
629 feature_list_.InitAndDisableFeature(features::kOverlayScrollbar); | 625 command_line->AppendSwitch(switches::kDisableOverlayScrollbar); |
630 #endif | 626 #endif |
| 627 }; |
631 | 628 |
| 629 void SitePerProcessBrowserTest::SetUpOnMainThread() { |
632 host_resolver()->AddRule("*", "127.0.0.1"); | 630 host_resolver()->AddRule("*", "127.0.0.1"); |
633 SetupCrossSiteRedirector(embedded_test_server()); | 631 SetupCrossSiteRedirector(embedded_test_server()); |
634 ASSERT_TRUE(embedded_test_server()->Start()); | 632 ASSERT_TRUE(embedded_test_server()->Start()); |
635 } | 633 } |
636 | 634 |
637 // | 635 // |
638 // SitePerProcessHighDPIBrowserTest | 636 // SitePerProcessHighDPIBrowserTest |
639 // | 637 // |
640 | 638 |
641 | 639 |
(...skipping 9293 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
9935 names.insert(root->children[0]->frame_entry->frame_unique_name()); | 9933 names.insert(root->children[0]->frame_entry->frame_unique_name()); |
9936 } | 9934 } |
9937 | 9935 |
9938 // More than one entry in the set means that the subframe frame navigation | 9936 // More than one entry in the set means that the subframe frame navigation |
9939 // entries didn't have a consistent unique name. This will break history | 9937 // entries didn't have a consistent unique name. This will break history |
9940 // navigations =( | 9938 // navigations =( |
9941 EXPECT_THAT(names, SizeIs(1)) << "Mismatched names for subframe!"; | 9939 EXPECT_THAT(names, SizeIs(1)) << "Mismatched names for subframe!"; |
9942 } | 9940 } |
9943 | 9941 |
9944 } // namespace content | 9942 } // namespace content |
OLD | NEW |