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

Side by Side Diff: content/browser/site_per_process_browsertest.cc

Issue 2480903002: Enable overlay scrollbars on ChromeOS (Closed)
Patch Set: Fix site per process test Created 4 years, 1 month 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
« no previous file with comments | « no previous file | content/test/BUILD.gn » ('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 "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>
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 #include "testing/gtest/include/gtest/gtest.h" 62 #include "testing/gtest/include/gtest/gtest.h"
63 #include "third_party/WebKit/public/platform/WebInsecureRequestPolicy.h" 63 #include "third_party/WebKit/public/platform/WebInsecureRequestPolicy.h"
64 #include "third_party/WebKit/public/web/WebInputEvent.h" 64 #include "third_party/WebKit/public/web/WebInputEvent.h"
65 #include "third_party/WebKit/public/web/WebSandboxFlags.h" 65 #include "third_party/WebKit/public/web/WebSandboxFlags.h"
66 #include "ui/display/display_switches.h" 66 #include "ui/display/display_switches.h"
67 #include "ui/display/screen.h" 67 #include "ui/display/screen.h"
68 #include "ui/events/event.h" 68 #include "ui/events/event.h"
69 #include "ui/events/event_utils.h" 69 #include "ui/events/event_utils.h"
70 #include "ui/events/latency_info.h" 70 #include "ui/events/latency_info.h"
71 #include "ui/gfx/geometry/point.h" 71 #include "ui/gfx/geometry/point.h"
72 #include "ui/native_theme/native_theme_switches.h"
72 73
73 #if defined(USE_AURA) 74 #if defined(USE_AURA)
74 #include "content/browser/renderer_host/render_widget_host_view_aura.h" 75 #include "content/browser/renderer_host/render_widget_host_view_aura.h"
75 #endif 76 #endif
76 77
77 #if defined(OS_MACOSX) 78 #if defined(OS_MACOSX)
78 #include "ui/base/test/scoped_preferred_scroller_style_mac.h" 79 #include "ui/base/test/scoped_preferred_scroller_style_mac.h"
79 #endif 80 #endif
80 81
81 namespace content { 82 namespace content {
(...skipping 463 matching lines...) Expand 10 before | Expand all | Expand 10 after
545 SitePerProcessBrowserTest::SitePerProcessBrowserTest() { 546 SitePerProcessBrowserTest::SitePerProcessBrowserTest() {
546 }; 547 };
547 548
548 std::string SitePerProcessBrowserTest::DepictFrameTree(FrameTreeNode* node) { 549 std::string SitePerProcessBrowserTest::DepictFrameTree(FrameTreeNode* node) {
549 return visualizer_.DepictFrameTree(node); 550 return visualizer_.DepictFrameTree(node);
550 } 551 }
551 552
552 void SitePerProcessBrowserTest::SetUpCommandLine( 553 void SitePerProcessBrowserTest::SetUpCommandLine(
553 base::CommandLine* command_line) { 554 base::CommandLine* command_line) {
554 IsolateAllSitesForTesting(command_line); 555 IsolateAllSitesForTesting(command_line);
556 #if !defined(OS_ANDROID)
557 // TODO(bokan): Needed for scrollability check in
558 // FrameOwnerPropertiesPropagationScrolling. crbug.com/662196.
559 command_line->AppendSwitch(switches::kDisableOverlayScrollbar);
560 #endif
555 }; 561 };
556 562
557 void SitePerProcessBrowserTest::SetUpOnMainThread() { 563 void SitePerProcessBrowserTest::SetUpOnMainThread() {
558 host_resolver()->AddRule("*", "127.0.0.1"); 564 host_resolver()->AddRule("*", "127.0.0.1");
559 ASSERT_TRUE(embedded_test_server()->Start()); 565 ASSERT_TRUE(embedded_test_server()->Start());
560 SetupCrossSiteRedirector(embedded_test_server()); 566 SetupCrossSiteRedirector(embedded_test_server());
561 } 567 }
562 568
563 // 569 //
564 // SitePerProcessHighDPIBrowserTest 570 // SitePerProcessHighDPIBrowserTest
(...skipping 2394 matching lines...) Expand 10 before | Expand all | Expand 10 after
2959 navigation_observer.Wait(); 2965 navigation_observer.Wait();
2960 EXPECT_TRUE(observer.last_navigation_succeeded()); 2966 EXPECT_TRUE(observer.last_navigation_succeeded());
2961 EXPECT_EQ(cross_site_url, observer.last_navigation_url()); 2967 EXPECT_EQ(cross_site_url, observer.last_navigation_url());
2962 EXPECT_EQ(0U, child->child_count()); 2968 EXPECT_EQ(0U, child->child_count());
2963 } 2969 }
2964 } 2970 }
2965 2971
2966 // Verify that "scrolling" property on frame elements propagates to child frames 2972 // Verify that "scrolling" property on frame elements propagates to child frames
2967 // correctly. 2973 // correctly.
2968 // Does not work on android since android has scrollbars overlayed. 2974 // Does not work on android since android has scrollbars overlayed.
2975 // TODO(bokan): Pretty soon most/all platforms will use overlay scrollbars. This
2976 // test should find a better way to check for scrollability. crbug.com/662196.
2969 #if defined(OS_ANDROID) 2977 #if defined(OS_ANDROID)
2970 #define MAYBE_FrameOwnerPropertiesPropagationScrolling \ 2978 #define MAYBE_FrameOwnerPropertiesPropagationScrolling \
2971 DISABLED_FrameOwnerPropertiesPropagationScrolling 2979 DISABLED_FrameOwnerPropertiesPropagationScrolling
2972 #else 2980 #else
2973 #define MAYBE_FrameOwnerPropertiesPropagationScrolling \ 2981 #define MAYBE_FrameOwnerPropertiesPropagationScrolling \
2974 FrameOwnerPropertiesPropagationScrolling 2982 FrameOwnerPropertiesPropagationScrolling
2975 #endif 2983 #endif
2976 IN_PROC_BROWSER_TEST_F(SitePerProcessBrowserTest, 2984 IN_PROC_BROWSER_TEST_F(SitePerProcessBrowserTest,
2977 MAYBE_FrameOwnerPropertiesPropagationScrolling) { 2985 MAYBE_FrameOwnerPropertiesPropagationScrolling) {
2978 #if defined(OS_MACOSX) 2986 #if defined(OS_MACOSX)
(...skipping 5547 matching lines...) Expand 10 before | Expand all | Expand 10 after
8526 EXPECT_TRUE(NavigateToURL(shell(), b_url)); 8534 EXPECT_TRUE(NavigateToURL(shell(), b_url));
8527 8535
8528 base::string16 expected_title(base::UTF8ToUTF16("foo")); 8536 base::string16 expected_title(base::UTF8ToUTF16("foo"));
8529 TitleWatcher title_watcher(popup2->web_contents(), expected_title); 8537 TitleWatcher title_watcher(popup2->web_contents(), expected_title);
8530 EXPECT_TRUE(ExecuteScript( 8538 EXPECT_TRUE(ExecuteScript(
8531 shell(), "window.open('','popup2').postMessage('foo', '*');")); 8539 shell(), "window.open('','popup2').postMessage('foo', '*');"));
8532 EXPECT_EQ(expected_title, title_watcher.WaitAndGetTitle()); 8540 EXPECT_EQ(expected_title, title_watcher.WaitAndGetTitle());
8533 } 8541 }
8534 8542
8535 } // namespace content 8543 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/test/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698