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

Side by Side Diff: content/browser/web_contents/web_contents_view_aura_browsertest.cc

Issue 12212114: overscroll: Disable overscroll by default. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 7 years, 10 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
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/web_contents/web_contents_view_aura.h" 5 #include "content/browser/web_contents/web_contents_view_aura.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/run_loop.h" 8 #include "base/run_loop.h"
9 #include "base/test/test_timeouts.h" 9 #include "base/test/test_timeouts.h"
10 #include "base/utf_string_conversions.h" 10 #include "base/utf_string_conversions.h"
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 RenderViewHost* screenshot_taken_for_; 59 RenderViewHost* screenshot_taken_for_;
60 NavigationControllerImpl* controller_; 60 NavigationControllerImpl* controller_;
61 61
62 DISALLOW_COPY_AND_ASSIGN(ScreenshotTracker); 62 DISALLOW_COPY_AND_ASSIGN(ScreenshotTracker);
63 }; 63 };
64 64
65 class WebContentsViewAuraTest : public ContentBrowserTest { 65 class WebContentsViewAuraTest : public ContentBrowserTest {
66 public: 66 public:
67 WebContentsViewAuraTest() {} 67 WebContentsViewAuraTest() {}
68 68
69 virtual void SetUpCommandLine(CommandLine* command_line) {
70 command_line->AppendSwitch(switches::kEnableOverscrollHistoryNavigation);
71 }
72
69 // Executes the javascript synchronously and makes sure the returned value is 73 // Executes the javascript synchronously and makes sure the returned value is
70 // freed properly. 74 // freed properly.
71 void ExecuteSyncJSFunction(RenderViewHost* rvh, const std::string& jscript) { 75 void ExecuteSyncJSFunction(RenderViewHost* rvh, const std::string& jscript) {
72 scoped_ptr<base::Value> value = 76 scoped_ptr<base::Value> value =
73 content::ExecuteScriptAndGetValue(rvh, jscript); 77 content::ExecuteScriptAndGetValue(rvh, jscript);
74 } 78 }
75 79
76 // Starts the test server and navigates to the given url. Sets a large enough 80 // Starts the test server and navigates to the given url. Sets a large enough
77 // size to the root window. Returns after the navigation to the url is 81 // size to the root window. Returns after the navigation to the url is
78 // complete. 82 // complete.
(...skipping 325 matching lines...) Expand 10 before | Expand all | Expand 10 after
404 web_contents->GetController().GetEntryAtOffset(-1)); 408 web_contents->GetController().GetEntryAtOffset(-1));
405 EXPECT_TRUE(entry->screenshot().get()); 409 EXPECT_TRUE(entry->screenshot().get());
406 410
407 entry = NavigationEntryImpl::FromNavigationEntry( 411 entry = NavigationEntryImpl::FromNavigationEntry(
408 web_contents->GetController().GetActiveEntry()); 412 web_contents->GetController().GetActiveEntry());
409 EXPECT_FALSE(entry->screenshot().get()); 413 EXPECT_FALSE(entry->screenshot().get());
410 } 414 }
411 } 415 }
412 416
413 } // namespace content 417 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/web_contents/web_contents_view_aura.cc ('k') | content/public/common/content_switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698